I got following error.
if form in exceptions: TypeError: unhashable type: 'list'
Following is my code.
from nltk.tokenize import word_tokenize
from nltk.stem.wordnet import WordNetLemmatizer
sentence = 'missed you'
w_tokenize = (word_tokenize(sentence))
for word in w_tokenize:
print WordNetLemmatizer().lemmatize(w_tokenize,'v')
Can anyone tell me how can I fix this error.
Seems like you have the variables mixed up, it should be
for word in w_tokenize:
print WordNetLemmatizer().lemmatize(word,'v')