Lynten / stanford-corenlp

Python wrapper for Stanford CoreNLP.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Call to StanfordCoreNLP is getting stuck

souravsaha opened this issue · comments

Hi,
I tried calling StanfordCoreNLP from MacOS, however, it's getting stuck and it's not coming out after starting the server. Below is the log. Can anyone tell me the issue? Thanks in advance.

nlp = StanfordCoreNLP(r'stanford-corenlp-full-2018-10-05', quiet=False)
[main] INFO CoreNLP - --- StanfordCoreNLPServer#main() called ---
[main] INFO CoreNLP - setting default constituency parser
[main] INFO CoreNLP - warning: cannot find edu/stanford/nlp/models/srparser/englishSR.ser.gz
[main] INFO CoreNLP - using: edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz instead
[main] INFO CoreNLP - to use shift reduce parser download English models jar from:
[main] INFO CoreNLP - http://stanfordnlp.github.io/CoreNLP/download.html
[main] INFO CoreNLP - Threads: 4
[main] INFO CoreNLP - Starting server...
[main] INFO CoreNLP - StanfordCoreNLPServer listening at /0:0:0:0:0:0:0:0:9000

I've had this issue on and off for the past two years. I've found a clunky workaround. Let's call your script above script_1. Kill script_1, then elsewhere (in a separate python script -- let's call it script_2 -- or it could just be an interactive python session), run the same code to start the CoreNLP server and let it get stuck. While script_2 remains stuck, script_1 should work fine.

I don't understand this behavior and don't love my workaround, but maybe it will help you.

2020-09-07 11:34:20,888 : INFO : Server shell PID: 7029
2020-09-07 11:34:21,896 : INFO : Waiting until the server is available.
2020-09-07 11:34:22,901 : INFO : Waiting until the server is available.
and waiting...waiting....available, could you help me out of this issue? thanks

202107 and I still get stuck on mac.

2020-09-07 11:34:20,888 : INFO : Server shell PID: 7029 2020-09-07 11:34:21,896 : INFO : Waiting until the server is available. 2020-09-07 11:34:22,901 : INFO : Waiting until the server is available. and waiting...waiting....available, could you help me out of this issue? thanks

Have you solved this? 2022 I'm still stuck on mac