首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在python中使用FST库

在python中使用FST库
EN

Stack Overflow用户
提问于 2014-09-10 10:46:25
回答 1查看 2.3K关注 0票数 5

如何安装OpenFST

我一直是这样做的:

代码语言:javascript
复制
wget http://www.openfst.org/twiki/pub/FST/FstDownload/openfst-1.4.1.tar.gz
tar -zxvf openfst-1.4.1.tar.gz
cd openfst-1.4.1
./configure
make
make install

还有其他方法来安装这个吗?

实际上,我最终想要的是在python中使用OpenFST,我一直在使用这个包装器:https://github.com/vchahun/pyfst

在安装OpenFST之后,在安装pyfst时,我遇到了以下问题。有人知道怎么解决这个问题吗?

代码语言:javascript
复制
$ sudo pip install pyfst
 ....

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pyfst/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-O7BSyr-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/pyfst
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 9, in <module>
    load_entry_point('pip==1.5.5', 'console_scripts', 'pip')()
  File "/usr/local/lib/python2.7/dist-packages/pip-1.5.5-py2.7.egg/pip/__init__.py", line 185, in main
    return command.main(cmd_args)
  File "/usr/local/lib/python2.7/dist-packages/pip-1.5.5-py2.7.egg/pip/basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 42: ordinal not in range(128)

,但是有一个纯OpenFST?的python端口吗?

EN

回答 1

Stack Overflow用户

发布于 2016-07-23 05:51:15

自从Python1.5发布以来,它现在包含了一个OpenFST包装器。在1.5.3中,这个包装器比少数几个独立的OpenFST Python功能更全面。我不知道任何纯python实现。这个时候肯定没有什么有名的。

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25763425

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档