Closed Romainpaulus closed 9 years ago
Hm, are you using a different version of the guava jar or something?
I am using guava version 13.0.1 as it appears in the README. Here is the full output of the socket initialization, I don't have any other guava version in my classpath:
INFO:StanfordSocketWrap:Starting pipe subprocess, and waiting for signal it's ready, with command: exec java -Xmx4g -cp stanford_corenlp_pywrapper-0.1.0-py2.7.egg/stanford_corenlp_pywrapper/lib/piperunner.jar:stanford_corenlp_pywrapper-0.1.0-py2.7.egg/stanford_corenlp_pywrapper/lib/guava-13.0.1.jar:stanford_corenlp_pywrapper-0.1.0-py2.7.egg/stanford_corenlp_pywrapper/lib/jackson-all-1.9.11.jar:stanford-corenlp-full-2014-06-16/stanford-corenlp-3.4.jar:/stanford-corenlp-full-2014-06-16/stanford-corenlp-3.4-models.jar:stanford-corenlp-full-2014-06-16/stanford-srparser-2014-07-01-models.jar corenlp.PipeCommandRunner --server 12340 --mode justparse
[Server] Using mode type: justparse
Adding annotator tokenize
Adding annotator ssplit
Adding annotator pos
Reading POS tagger model from edu/stanford/nlp/models/pos-tagger/english-left3words/english-left3words-distsim.tagger ... ^[[A^[[Adone [0,6 sec].
Adding annotator parse
Loading parser from serialized file edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz ...done [0,4 sec].
[Server] Started socket server on port 12340
INFO:StanfordSocketWrap:Successful ping. The server has started.
INFO:StanfordSocketWrap:Subprocess is ready.
Well, it seems like upgrading Guava from 13.0.1 to the latest one (18.0) fixed it. That's weird because I didn't have this problem on Ubuntu, only on Mac.
apart from ubuntu vs mac, do you know what java versions were involved with the two settings?
I don't really remember, sorry. I have java 1.8 on my mac, and I just noticed that it's not the recommended version for Stanford CoreNLP 3.4, so maybe that was the problem.
I am following the README instructions with the Stanford CoreNLP version 3.4. The sockwarp instantiation works well and doesn't give any error, but the command
p.parse_doc("hello world. how are you?")
crashes with the following error: