Hi my country's language is not in nltk in python. I have a wordlist that contains word and part of speech (noun, verd adj etc.) in excel. But I don't know how to build a corpus. My language is not in python nltk. How to build tag pos for my language in nltk in python?
Chapter 5 of the online NLTK book explains the concepts and procedures you would use to create a tagged corpus.
There are several taggers which can use a tagged corpus to build a tagger for a new language. You will probably want to experiment with at least a few of them.
A tagged corpus is better than just a list of words because many languages have ambiguities, and working with a large enough collection of representative samples allows you to cope with this.
For example, an English lexicon would simply tell you that "to" has two possible POS tags (infinitive marker or preposition) but given enough examples in context, training a tagger hopefully sorts out which reading is correct in which context. The training might establish that "to" before an uninflected verb gets the
INF tag, and assign
PREP elsewhere (though reality is somewhat more complex than that).
If your language has a radically different orthography than the NLTK taggers are constructed to cope with, this is probably too simplistic, but assuming you are dealing with something resembling Latin or Cyrillic script, the examples in the book should be straightforward to apply to your language.
See also chapter 11 which focuses more on the collection and management side of the corpus process.