我正在使用由philipperemy在这里创建的Stanford openIE的python包装器:https://github.com/philipperemy/Stanford-OpenIE-Python。但是,我使用的是窗口系统,因此我使用Cygwin运行以下代码:
git clone https://github.com/philipperemy/Stanford-OpenIE-Python.git
cd Stanford-OpenIE-Python
echo "Barack Obama was born in Hawaii." > samples.txt
python main.py -f samples.txt
但是,我遇到错误说
AssertionError: ERROR: Call to stanford_ie exited with a non-zero code status.
我不确定如何修复它。我使用了1.8.0_121的java版本,我检查了是否使用$ git pull origin master
使用了此Github文件的更新版本。
有谁知道如何解决这个问题?
提前致谢!
更具体地说,这里有完整的错误消息:
$ python main.py -f samples.txt
Namespace(filename='samples.txt', generate_graph=False, verbose=False)
Traceback (most recent call last):
File "main.py", line 147, in <module>
exit(main(argv))
File "main.py", line 142, in main
entities_relations = stanford_ie(filename, verbose, generate_graphviz)
File "main.py", line 118, in stanford_ie
assert not java_process.returncode, 'ERROR: Call to stanford_ie exited with a non-zero code status.'
AssertionError: ERROR: Call to stanford_ie exited with a non-zero code status.