preems / nltk-server

The missing REST Interface for NLTK.
MIT License
22 stars 12 forks source link

renamed Stanford taggers #1

Open fjenett opened 8 years ago

fjenett commented 8 years ago

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
preems commented 8 years ago

Thanks for reporting this. I will accept the pull request if you want to update the import.

Athaagra commented 5 years ago

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