NLTK WordNet Lemmatizer: Shouldn’t it lemmatize all inflections of a word?

The WordNet lemmatizer does take the POS tag into account, but it doesn’t magically determine it:

>>> nltk.stem.WordNetLemmatizer().lemmatize('loving')
'loving'
>>> nltk.stem.WordNetLemmatizer().lemmatize('loving', 'v')
u'love'

Without a POS tag, it assumes everything you feed it is a noun. So here it thinks you’re passing it the noun “loving” (as in “sweet loving”).

Leave a Comment