py-corenlp
py-corenlp copied to clipboard
Weird error: py-corenlp or CoreNLP problem?
Many thanks for your excellent library! It helped me quite a lot.
I have recently started to run into this error (after update to CoreNLP 3.7.0):
[pool-2-thread-3] ERROR edu.stanford.nlp.pipeline.StanfordCoreNLP - Attempted to fetch annotator "parse" before the annotator pool was created! java.util.concurrent.ExecutionException: java.lang.AssertionError: Failed to get parser - this should not be possible
Can this be a py-corenlp problem or is it a Stanford CoreNLP problem?
Getting the same error as above.
This is the code I'm running.
import json
from pycorenlp import StanfordCoreNLP
import pickle
import codecs
nlp = StanfordCoreNLP('http://localhost:9000')
lines = "Carrie would sneak rides on her sister Dan's bike . "
ans = nlp.annotate(lines, properties={'annotators':'tokenize,ssplit,pos,lemma,ner,parse,mention,coref','coref.algorithm':'neural'})
Using CoreNLP 3.7.0.
If anyone knows what causes the error, would you be so kind to reply in this thread?
I've met this same kind of error. When I ran it on Windows 10 OS, it was OK, but when I ran it on Ubuntu 16.04 Server, It was an error.
Try to use 'annotators':'tokenize,ssplit,pos,depparse,parse' instead of 'annotators':'tokenize,ssplit,pos,lemma,ner,parse,mention,coref'. It ran well.
If you really need 'coref', you'd better try some methods else.
Could it be that you're attempting to call CoreNLP before the server is fully started? It takes a few seconds for the server to boot up.