Skip to content Skip to sidebar Skip to footer

Stanford Ner Tagger In Nltk

I am trying to import the Stanford Named Entity Recognizer in Python. This is already built in the NLTK package. However, my code below is not working: from nltk.tag.stanford impo

Solution 1:

That class has been renamed to StanfordNERTagger in version 3.0.3 (commit 190673c7).

So for nltk >= 3.0.3 you need to use this import instead:

from nltk.tagimportStanfordNERTagger

(You could also do from nltk.tag.stanford import StanfordNERTagger, but since they now also provide a convenience import in the nltk.tag module, that's probably what they want use to use, that import location should be less prone to future changes like this.)

Post a Comment for "Stanford Ner Tagger In Nltk"