Have you tried tagging POS in NLTK?
text = word_tokenize("And now for something completely different") nltk.pos_tag(text)
The answer is:
[('And', 'CC'), ('now', 'RB'), ('for', 'IN'), ('something', 'NN'),('completely', 'RB'), ('different', 'JJ')]
Here is an example here NLTK_chapter03
maverik_akagami Oct 24 '17 at 18:14 2017-10-24 18:14
source share