Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed start CoreNLP #1

Open
napakalas opened this issue May 25, 2021 · 0 comments
Open

Failed start CoreNLP #1

napakalas opened this issue May 25, 2021 · 0 comments

Comments

@napakalas
Copy link
Owner

napakalas commented May 25, 2021

When using CoreNLP parser, you may find the following error message:

```
...
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=9001): Max retries exceeded with url: /?properties=%7B%22outputFormat%22%3A+%22json%22%2C+%22annotators%22%3A+%22tokenize%2Cpos%2Clemma%2Cssplit%2Cparse%22%2C+%22ssplit.eolonly%22%3A+%22true%22%2C+%22tokenize.whitespace%22%3A+%22false%22%7D (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000215465682B0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))
```
The possible cause is:
- In some devices, CoreNLP local web services is slowly started, so it is not yet ready when directly utilise by NLIMED. You can wait for a minute then rerun your command or code.
- In Windows the JVM maximum memory space is between 1500 and 1600 MB, while CoreNLP is ideally run on 4GB heap memory space.

Solution:
You may also start the services manually on command line or terminal. Go to your CoreNLP folder and run:
```
java -Xmx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9001 -timeout 15000
```
Then check the services availability on your web browser through link: http://localhost:9001/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant