мне удалось закодировать его в NLTK. я должен разбить каждое предложение на новую строку. Благодарю. затем выполните эту команду ht.tag (file.readline (). split ())

кто-нибудь помочь мне с синтаксисом hunpos, помечающим корпус в nltk?

Что я импортирую дляhunpos.HunPosTagger модуль?

Как мне HunPosTag корпус? Смотрите код ниже.

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])

Ответы на вопрос(1)

Ваш ответ на вопрос