Asse田:错误:调用stanford_ie与非零代码退出状态

问题描述 投票:0回答:1

我使用philipperemy创建了斯坦福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.
python unix sh stanford-nlp
1个回答
0
投票

直答案来自斯坦福大学OpenIE的Python的作者来是Windows操作系统并不库支持。详细here

© www.soinside.com 2019 - 2024. All rights reserved.