无法导入 edu.stanford.nlp - 斯坦福解析器存在 jython 问题
有人可以帮助我使用 http://nlp.stanford.edu/software 的 stanford 解析器吗/lex-parser.shtml?
我只下载并解压了解析器。 我还完全安装了 jython,但我无法解析句子,看起来我已经安装了一些模块或其他东西。 http://wiki.python.org/jython/InstallationInstructions
>>> import sys
>>> sys.path.append('~/standford-parser-2010-11-30/stanford-parser-2011-11-30.jar')
>>> from java.io import CharArrayReader
>>> from edu.stanford.nlp import *
Traceback (innermost last):
File "<console>", line 1, in ?
ImportError: no module named edu
除了解压之外还有更多的安装过程吗并将其导入到 jython 中?
Can someone help me out with the stanford parser from http://nlp.stanford.edu/software/lex-parser.shtml?
I've only downloaded and unzipped the parser.
I've also installed the jython fully but i cannot parse a sentence, it seems like i've installed some modules or something.
http://wiki.python.org/jython/InstallationInstructions
>>> import sys
>>> sys.path.append('~/standford-parser-2010-11-30/stanford-parser-2011-11-30.jar')
>>> from java.io import CharArrayReader
>>> from edu.stanford.nlp import *
Traceback (innermost last):
File "<console>", line 1, in ?
ImportError: no module named edu
Is there more installation procedures other than unzipping it and importing it in jython?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的
sys.append
语句中有拼写错误。文件名显示为2011
,而它应该是2010
:You have a typo in your
sys.append
statement. The filename says2011
when it should be2010
:您还可以在此处查看一些入门示例代码。
You might also look here for some starting off example code.