I figured out how to read a text file and how to apply pos tags for the tokens. In a similar manner, I want to read text from a text file and evaluate the accuracy of different POS taggers. Print(unigram_tagger.evaluate(brown_tagged_sents)) Unigram_tagger = nltk.UnigramTagger(brown_tagged_sents) # We train a UnigramTagger by specifying tagged sentence data as a parameter from rpus import brownīrown_tagged_sents = brown.tagged_sents(categories='news')īrown_sents = nts(categories='news') I have found how to evaluate Unigram tag using brown corpus. I want to evaluate different POS tags in NLTK using a text file as an input.įor an example, I will take Unigram tagger.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |