简体   繁体   中英

Cannot connect to port 8080 when using the python module for Stanford NER

I am a complete rookie at this (this might be the reason why I'm stuck), but I have spent 2 days trying to find an answer for my problem with no luck whatsoever. Here's the deal: I have downloaded the python module for Stanford NER, because I need to extract entities from text. In the readme file there was a suggestion on how it should be used, which was the following:

import ner

tagger = ner.HttpNER(host = 'localhost', port = 8080)
tagger.get_entities("University of California is located in California, United States")

The problem is that I have little (almost zero) experience with python and when executing it i get the following error message:
[Errno 10061] No connection could be made because the target machine actively refused it

I don't know why I get this message, since port 8080 is not used or blocked. I have even tried to disable the firewall and the antivirus, but nothing changed.

I assume my question is kind of a newbie question, but I have searched for almost two days to figure out what is wrong.

Thank you in advance!

这意味着什么都没有监听本地主机上的端口8080。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM