编译BLLIP Parser for Mac时出错

时间:2014-07-14 01:19:24

标签: parsing charniak-parser

作为NLTK的新手,我试图将句子解析为不同的短语(例如,NP,VP,ADJP ......)并选择我想要进一步分析的那些。我选择使用stat_parser,但是它太慢了。然后我在这里发现了一些东西(Quick NLTK parse into syntax tree),它显示了我想要做的事情。问题是我无法使用我可以在网上找到的所有方法安装bllip-parser(macports等)。当我试图在README中告知文件时,它显示以下错误:

In file included from best-parses.cc:50:
./popen.h:25:10: fatal error: 'ext/stdio_filebuf.h' file not found
#include <ext/stdio_filebuf.h>
         ^
1 error generated.
make[1]: *** [best-parses.o] Error 1
make: *** [reranker-runtime] Error 2

任何人都可以帮我解决这个错误或告诉我还有其他更好的方法来使用NLTK进行解析吗?谢谢!

1 个答案:

答案 0 :(得分:2)

目前,BLLIP Parser doesn't compile by default on Mac OS X Mavericks。幸运的是,吉姆怀特有一个branch of the parser instructions for how to compile on Mac OS X。这是他的分支direct download link

顺便说一句,我应该澄清BLLIP Parser是与NLTK分开的项目。以上说明仅适用于安装BLLIP Parser。从版本3.0.2开始,NLTK通过nltk.parse.bllip模块为BLLIP Parser提供了一个接口。