Including custom corpora before finding POS in NLTK

22 views
Skip to first unread message

Lenin Raj Rajasekaran

unread,
Jan 4, 2015, 2:49:55 AM1/4/15
to nltk-...@googlegroups.com

I am using TaggedCorpusReader to parse a file with my own data (words tagged with its POS).

Example content of my data:

dhoni_NNP virat_NNP kohli_NNP

If my input sentence is what is the best score of dhoni and I am parsing this as:

input = 'what is the best score of dhoni'
tokens = nltk.word_tokenize(self.input)
nltk.pos_tag(tokens)

I would like the word dhoni to be detected as NNP.

How do I ask NLTK to include the custom file while tagging POS?

Nigel Legg

unread,
Jan 6, 2015, 10:41:14 AM1/6/15
to nltk-...@googlegroups.com
If you are trying to train your PoS tagger, shouldn't the text read dhoni/NNP virat/NNP kohli/NNP??

Cheers, Nigel
07914 740972


--
You received this message because you are subscribed to the Google Groups "nltk-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nltk-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages