与pexpect的stanford corenlp python错误

时间:2017-10-24 21:52:32

标签: python stanford-nlp pexpect

我正在尝试从stanford corenlp python包运行corenlp.py。当我运行它时,我收到此错误:

Traceback (most recent call last):
File "corenlp.py", line 592, in <module>
main()
File "corenlp.py", line 580, in main
nlp = StanfordCoreNLP(options.corenlp, properties=options.properties, serving=True)
File "corenlp.py", line 435, in __init__
self._spawn_corenlp()
File "corenlp.py", line 424, in _spawn_corenlp
self.corenlp.expect("\nNLP> ")
File "/Library/Python/2.7/site-packages/pexpect-4.2.1-py2.7.egg/pexpect/spawnbase.py", line 321, in expect
timeout, searchwindowsize, async)
File "/Library/Python/2.7/site-packages/pexpect-4.2.1-py2.7.egg/pexpect/spawnbase.py", line 345, in expect_list
return exp.expect_loop(timeout)
File "/Library/Python/2.7/site-packages/pexpect-4.2.1-py2.7.egg/pexpect/expect.py", line 105, in expect_loop
return self.eof(e)
File "/Library/Python/2.7/site-packages/pexpect-4.2.1-py2.7.egg/pexpect/expect.py", line 50, in eof
raise EOF(msg)
pexpect.exceptions.EOF: End Of File (EOF). Empty string style platform.
<pexpect.pty_spawn.spawn object at 0x109febe10>
command: /usr/bin/java
args: ['/usr/bin/java', '-Xmx3g', '-cp', 'stanford-corenlp-full-2014-08-27/stanford-corenlp-3.4.1.jar:stanford-corenlp-full-2014-08-27/stanford-corenlp-3.4.1-models.jar:stanford-corenlp-full-2014-08-27/xom.jar:stanford-corenlp-full-2014-08-27/joda-time.jar:stanford-corenlp-full-2014-08-27/jollyday.jar:stanford-corenlp-full-2014-08-27/ejml-0.23.jar', 'edu.stanford.nlp.pipeline.StanfordCoreNLP', '-props', 'default.properties']
buffer (last 100 chars): ''
before (last 100 chars): 'aders.java:185)\r\n\tat 
java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)\r\n\t... 34 more\r\n'
after: <class 'pexpect.exceptions.EOF'>
match: None
match_index: None
exitstatus: None
flag_eof: True
pid: 9676
child_fd: 7
closed: False
timeout: 60
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 8192
ignorecase: False
searchwindowsize: 80
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
0: re.compile("
NLP> ")

你能帮我找出问题的原因吗? 我已经添加了pexpect包并设置了完整版stanford nlp的目录。它与某些包的版本有关吗? 最好

0 个答案:

没有答案