Open ghost opened 6 years ago
I think this is because the connection is not closed for checking whether the Stanford CoreNLP server is started:
Maybe add headers={'Connection': 'close'}
to
https://github.com/smilli/py-corenlp/blob/master/pycorenlp/corenlp.py#L19
# Checks that the Stanford CoreNLP server is started.
try:
requests.get(self.server_url)
except requests.exceptions.ConnectionError:
raise Exception('Check whether you have started the CoreNLP server e.g.\n'
'$ cd stanford-corenlp-full-2015-12-09/ \n'
'$ java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer')
or even better: remove that check entirely - it's not really necessary anyway.
Solved the problem by using python requests session instead of .post directly
Solved the problem by using python requests session instead of .post directly
Hi, could you please point out what modifications you made to which line? I am currently experiencing the same issues here. Thank you!
@huihanlhh it was long ago, can't find the code right now
I was mistaken and posted the issue here as I thought it's an issue with the CoreNLP server. Is there a chance that the problem comes from
pycorenlp
and that it's a similar issue thatstanza
had?My problem is that after sending a larger number of requests I am getting the following error: