Python Forum
python - Custom POS tagging with NLTK
Thread Rating:
  • 3 Vote(s) - 2.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python - Custom POS tagging with NLTK
#1
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'
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020