2017年9月25日星期一

安装openfst,pyfst

首先安装openfst,如果你想继续安装pyfst的话,你需要安装openfst1.3.3的版本,因为pyfst始终不跟新,只支持到openfst1.3.3
打开openfst主页,下载1.3.3的版本http://www.openfst.org/twiki/bin/view/FST/FstDownload

解压文件,运行
 ./configure
make
sudo make install
安装成功

 通过这里测试是否成功:http://blog.csdn.net/chinabing/article/details/50724575
如果编译失败,通过https://github.com/vchahun/fast_umorph/issues/1来修改interval-set.h文件

openfst需要c++11,安装链接如下:
http://blog.csdn.net/lisonglisonglisong/article/details/21947255

在~/.bashrc中添加:
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
到此,openfst差不多安装好了

接下来安装pyfst
sudo CFLAGS="-std=c++0x" pip install pyfst -i https://pypi.douban.com/simple
值得注意的是,镜像一定要用doubian的,因为pyfst一直没有更新,很多镜像已经没有pyfst的包了。
如果你看的时候,发现用豆瓣的镜像也会出现问题,请试用如下链接的镜像:
http://blog.csdn.net/d5224/article/details/52025897


没有评论:

发表评论

leetcode 17

17.   Letter Combinations of a Phone Number Medium Given a string containing digits from   2-9   inclusive, return all possible l...