i have list of words like amazing, interesting, love, great, nice. And i want to check if word is adjective or verb , like "love" is verb and nice is adjective... How to do it using python, or nltk, any help ?
The only way to guess what a word is without having any context is to use WordNet, but it won't be 100% reliable since for example "love" can have different roles in a sentence.
from nltk.corpus import wordnet as wn
words = ['amazing', 'interesting', 'love', 'great', 'nice']
for w in words:
tmp = wn.synsets(w)[0].pos()
print w, ":", tmp
Will output:
amazing : v
interesting : v
love : n
great : n
nice : n