nltk-server
nltk-server copied to clipboard
renamed Stanford taggers
From nltk:
POSTagger renamed StanfordPOSTagger, NERTagger renamed StanfordNERTagger
https://github.com/nltk/nltk/blob/develop/ChangeLog#L54
I think this causes what i'm currently seeing for your latest version:
root@f1da5e6dd850:/var/local/nltk-server# python wsgi.py
Traceback (most recent call last):
File "wsgi.py", line 4, in <module>
from nltkserver.stanfordner import tagger
File "/var/local/nltk-server/nltkserver/stanfordner.py", line 1, in <module>
from nltk.tag.stanford import NERTagger
ImportError: cannot import name NERTagger
Thanks for reporting this. I will accept the pull request if you want to update the import.
import nltk from nltk.tag.stanford import StanfordPOSTagger as POS_Tag spanish_postagger = POS_Tag('spanish.tagger', 'stanford-postagger.jar', encoding='utf8') Download the tagger from the site: https://nlp.stanford.edu/software/tagger.shtml Extract the file:stanford-postagger.jar the file:models/spanish.tagger