from nltk.stem.wordnet import WordNetLemmatizer l = WordNetLemmatizer() l.lemmatize('cars') # car l.lemmatize('women') # woman l.lemmatize('fantasized','v') # fantasizeSo, a word will be checked with wordnet to see its basic form according to part of speech.
No comments:
Post a Comment