Keeping tagged word within FreqDist in Python with NLTK package

125 views Asked by At

I would like to differentiate words that spell the SAME way but have different genres in my FreqDist count.

For instance in the sentence:

The dog seemed to dog the turtle.

I would like to have one count for the 'dog' as a noun, one for the 'dog' as a verb, and not two for the word 'dog'.

I thank you for your wise suggestions

1

There are 1 answers

0
AtAFork On

I would take a look into NLTK - Chapter 5 and think about creating part of speech pairs, and then using conditional frequency distributions