Search code examples
pythontagsnltkpos-tagger

Python NLTK Brill Tagger does not have SymmetricProximateTokensTemplate, ProximateTokensTemplate, ProximateTagsRule, ProximateWordsRule


When i try importing,

from nltk.tag.brill import SymmetricProximateTokensTemplate, ProximateTokensTemplate from nltk.tag.brill import ProximateTagsRule, ProximateWordsRule

Python Throws Import Error,

ImportError: cannot import name 'SymmetricProximateTokensTemplate'

What's the problem?

but this works

from nltk.tag import brill


Solution

  • The Brill part of NLTK has been redesigned in NLTK 3. So all those classes you try to import do not exist any more.
    See https://github.com/nltk/nltk/pull/549

    I'm looking for an example how to use the Brill Tagger but till now, I didn't find anything.