CRF++是一个分词利器,安装过程如下:
1.到官网http://code.google.com/p/crfpp/downloads/list下载对应的安装包,这里我下载的是0.53版本~
2.准备将gcc,g++,python-setuptools等工具先安装好
3.解压,到目录中执行:
sudo ./configure
sudo make
sudo make install
该过程会出现一些小问题,如果是缺少一些库文件,会提示到,补上去就可以了.这里说下我遇到的问题:
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
这个问题我直接补了一下库文件:
sudo apt-get install python-dev
sudo apt-get install libevent-dev
下一个问题:
In file included from node.h:13:0,
from node.cpp:9:
path.h:26:50: error: ‘size_t’ has not been declared
make[1]: *** [node.lo] Error

本文介绍了在Ubuntu系统中安装CRF++ 0.53版本的步骤,包括从官网下载安装包、安装依赖工具如gcc和g++,以及在编译python setup.py build过程中遇到的问题和解决方案。在Python环境中导入CRFPP模块时,出现UnboundLocalError和ImportError,通过修改CRFPP.py文件解决了这些问题。

2593

被折叠的 条评论
为什么被折叠?



