satya kapoor
satya kapoor

Reputation: 47

How to lemmatise nouns?

I am trying to lemmatise words like "Escalation" to "Escalate" using NLTK.stem Wordlemmatizer.

word_lem = WordNetLemmatizer()

print( word_lem.lemmatize("escalation", pos = "n")

Which pos tag should be used to get result like "escalate"

Upvotes: 1

Views: 170

Answers (1)

OmG
OmG

Reputation: 18838

First, please notice that:

Stemming usually refers to a crude heuristic process that chops off the ends of words in the hope of achieving this goal correctly most of the time, and often includes the removal of derivational affixes. Lemmatization usually refers to doing things properly with the use of a vocabulary and morphological analysis of words, normally aiming to remove inflectional endings only and to return the base or dictionary form of a word, which is known as the lemma .

Now, if you desire to obtain a canonical form for both "escalation" and "escalate", you can use a summarizer, e.g., Porter stemmer.

from nltk.stem import PorterStemmer

ps = PorterStemmer()
print(ps.stem("escalate"))
print(ps.stem("escalation"))

Although the result is escal, but it is the same for both words.

Upvotes: 1

Related Questions