Can someone help me with the syntax for hunpos tagging a corpus in nltk?
What do I import for the
hunpos.HunPosTagger
module?How do I HunPosTag the corpus? See the code below.
import nltk
from nltk.corpus import PlaintextCorpusReader
from nltk.corpus.util import LazyCorpusLoader
corpus_root = './'
reader = PlaintextCorpusReader (corpus_root, '.*')
ntuen = LazyCorpusLoader ('ntumultien', PlaintextCorpusReader, reader)
ntuen.fileids()
isinstance (ntuen, PlaintextCorpusReader)
# So how do I hunpos tag `ntuen`? I can't get the following code to work.
# please help me to correct my python syntax errors, I'm new to python
# but i really need this to work. sorry
##from nltk.tag import hunpos.HunPosTagger
ht = HunPosTagger('english.model')
for sentence in ntu.sent() ##looping through the no. of sentence
ht.tag(ntusent()[i])