I am trying to run a very basic example as mentioned in the documentation, the CoreNLP server starts and is listening but nothing happens after it. I am not sure how to debug this.
Here is the code I am running:
import logging
from stanfordcorenlp import StanfordCoreNLP
nlp = StanfordCoreNLP(r'/Users/samarthbhandari/AuralAnalytics/text_metrics/textmetrics/stanford-corenlp-full-2018-10-05', quiet=False, logging_level=logging.DEBUG)
sentence = 'Guangdong University of Foreign Studies is located in Guangzhou.'
print('Tokenize:', nlp.word_tokenize(sentence))
nlp.close()
Here is my output log in DEBUG mode:
INFO:root:Initializing native server...
INFO:root:java -Xmx4g -cp "/Users/samarthbhandari/AuralAnalytics/text_metrics/textmetrics/stanford-corenlp-full-2018-10-05/*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9999
INFO:root:Server shell PID: 8589
[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: 8
[main] INFO CoreNLP - Starting server...
[main] INFO CoreNLP - StanfordCoreNLPServer listening at /0:0:0:0:0:0:0:0:9999
INFO:root:The server is available.
INFO:root:{'properties': "{'annotators': 'ssplit,tokenize', 'outputFormat': 'json'}", 'pipelineLanguage': 'en'}
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:9999
I am trying to run a very basic example as mentioned in the documentation, the CoreNLP server starts and is listening but nothing happens after it. I am not sure how to debug this.
Here is the code I am running:
Here is my output log in DEBUG mode:
OS: MacOS 10.15.4 Python: 3.7.6 Java: 1.8