-
Notifications
You must be signed in to change notification settings - Fork 910
Description
Greeting,
I am new to CoreNLP enviroment and trying run the example code given on documentation. However, I got two errors as follows;
First code:
from stanza.server import CoreNLPClient with CoreNLPClient( annotators=['tokenize','ssplit','pos',"ner"], timeout=30000, memory='2G',be_quiet=True) as client: anno = client.annotate(text)
2020-12-30 16:40:53 INFO: Writing properties to tmp file: corenlp_server-a15136448b834f79.props
2020-12-30 16:40:53 INFO: Starting server with command: java -Xmx2G -cp C:\Users\fatih\stanza_corenlp* edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000 -timeout 30000 -threads 5 -maxCharLength 100000 -quiet True -serverProperties corenlp_server-a15136448b834f79.props -annotators tokenize,ssplit,pos,ner -preload -outputFormat serialized
`Traceback (most recent call last):
File "C:\Users\fatih\anaconda3\lib\site-packages\stanza\server\client.py", line 446, in _request
r.raise_for_status()
File "C:\Users\fatih\anaconda3\lib\site-packages\requests\models.py", line 941, in raise_for_status
raise HTTPError(http_error_msg, response=self)
HTTPError: 500 Server Error: Internal Server Error for url: http://localhost:9000/?properties=%7B%27annotators%27%3A+%27tokenize%2Cssplit%2Cpos%2Cner%27%2C+%27outputFormat%27%3A+%27serialized%27%7D&resetDefault=false
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<ipython-input-6-2fbdcdb77b41>", line 6, in <module>
anno = client.annotate(text)
File "C:\Users\fatih\anaconda3\lib\site-packages\stanza\server\client.py", line 514, in annotate
r = self._request(text.encode('utf-8'), request_properties, reset_default, **kwargs)
File "C:\Users\fatih\anaconda3\lib\site-packages\stanza\server\client.py", line 452, in _request
raise AnnotationException(r.text)
AnnotationException: Could not handle incoming annotation`
What am I doing wrong? It's on windows, Anaconda, Spyder.