<jupyter_start><jupyter_text>TnT<jupyter_code>import nltk
nltk.download('treebank')
train_data = nltk.corpus.treebank.tagged_sents()[:30]
test_data = nltk.corpus.treebank.tagged_sents()[3000:]
TnT = nltk.tag.tnt.TnT()
TnT.train(train_data)

'accuracy: ' + str(round(TnT.evaluate(test_data), 3))
TnT.tag(['the', 'men', 'attended', 'to', 'the', 'meetings'])<jupyter_output><empty_output>