Implement Word Lemmatization with NLTK for Beginner – NLTK Tutorial

By | August 29, 2019

Word lemmatization can help us to improve the similarity of sentences. In this tutorial, we will introduce on how to implement word lemmatization with nltk. You can learn how to do by following our tutorial.

Implement Word Lemmatization with NLTK

What is word lemmatization?

Here we use some words to show you word lemmatization.

cats : cat

books : book

To get word lemmatization with ntlk, we can do like this:

Import library

import nltk
from nltk.stem import WordNetLemmatizer

Download resources

nltk.download('wordnet')

Implement word lemmatization

lemmatizer = WordNetLemmatizer()
print(lemmatizer.lemmatize('books'))

The result is: book

Leave a Reply

Your email address will not be published. Required fields are marked *