Python Forum

Full Version: python - Custom POS tagging with NLTK
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Please HELP me,

I want to build custom pos tagging with nltk 3.2.2,  I have tried with the following code but I am getting following errors .......

import nltk.tag, nltk.data

default_tagger = nltk.data.load(nltk.tag._POS_TAGGER)
model = {'example_one': 'VB' 'example_two': 'NN'}
tagger = nltk.tag.UnigramTagger(model=model, backoff=default_tagger)
Error:
File "nltk_test.py", line 24, in <module>    default_tagger = nltk.data.load(nltk.tag._POS_TAGGER)  AttributeError: 'module' object has no attribute '_POS_TAGGER'