A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/machine-learning/python-lemmatization-with-textblob/ below:

Python | Lemmatization with TextBlob

Python | Lemmatization with TextBlob

Last Updated : 11 Jul, 2025

Lemmatization is the process of grouping together the different inflected forms of a word so they can be analyzed as a single item. Lemmatization is similar to stemming but it brings context to the words. So it links words with similar meanings to one word.
Text preprocessing includes both Stemming as well as Lemmatization. Many times people find these two terms confusing. Some treat these two as the same. Actually, lemmatization is preferred over Stemming because lemmatization does morphological analysis of the words.
Applications of lemmatization are: 
 

Examples of lemmatization :

-> rocks : rock
-> corpora : corpus
-> better : good


One major difference with stemming is that lemmatize takes a part of speech parameter, “pos” If not supplied, the default is “noun.”
Below is the implementation of lemmatization words using TextBlob: 
 

Python3
# from textblob lib import Word method
from textblob import Word

# create a Word object.
u = Word("rocks")

# apply lemmatization.
print("rocks :", u.lemmatize())

# create a Word object.
v = Word("corpora")

# apply lemmatization.
print("corpora :", v.lemmatize())

# create a Word object.
w = Word("better")
 
# apply lemmatization with 
# parameter "a", "a" denotes adjective.
print("better :", w.lemmatize("a"))

Output : 
 

rocks : rock
corpora : corpus
better : good


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4