Mac安装crfpp

步骤

git clone https://github.com/taku910/crfpp.git
./configure
make
sudo make install
cd python
python setup.py install
python test.py

问题

  1. 如果提示找不到winmain.h,去 https://raw.githubusercontent.com/taku910/crfpp/37ec31fd1a128db09eca8203030c3547b8f8df4b/winmain.h 下载放到主目录下面

  2. 运行test.py提示没有_CRFPP模块,可以运行

chmod 755 /usr/local/lib/python2.7/dist- packages/*.so

或者是应该没有装好,重新检查问题,重新安装。

  1. 运行test.py提示,引入model失败,去example/basenp下,找exec.sh文件,注释掉rm -f model,运行 exec.sh,生成model文件,将其移动到test.py的上层目录,随后运行即可。

  2. 注意,系统中如果存在多个版本的python,尽量切换为2.7版本,不然可能会遇到奇怪的问题。

参考

相关文章:

  • 2021-09-13
  • 2021-07-01
  • 2021-08-21
  • 2021-08-19
  • 2022-12-23
  • 2021-12-02
  • 2021-12-02
  • 2021-12-04
猜你喜欢
  • 2021-10-13
  • 2021-08-11
  • 2021-04-02
  • 2021-10-28
  • 2022-12-23
  • 2021-08-19
  • 2022-12-23
相关资源
相似解决方案