Python NLP
About Lesson

In this Python NLP lesson we are going to talk about Python NLP Stemming, so it is one of the important concepts in Natural Language Processing, now let’s talk about stemming.

 

 

What is Stemming in NLP ? 

Stemming is a process for removing affixes from a word, ending up with the stem. or in literal term we can say that stemming is the process of cutting down the branches to its stem, using stemming we can cut down a word or token to its stem or base word. for example the word eat will have variations like like eating, eaten,eats. Stemming is most commonly used by search engines for indexing words. Instead of storing all forms of a word, a search engine can store only the stems. there are different stemmers that you can use in NLTK for example we have PorterStemmer, LancasterStemmer , SnowballStemmer.

 

 

So first let’s create an example in PorterStemmer, and it is default stemmer that we can use.

 

 

basically in the above example we are going to stem drinking word and the result will be drink.

 

 

LancasterStemmer is another type of stemmer and it has the same functionality as PorterStemmer, but It is known to be slightly more aggressive than the PorterStemmer. in this example we want to stem the drinks word and the result will be drink.

 

 

 

The third one is SnowBallStemmer and the best thing about snowball stemmer is this , that it supports 13 language.

 

 

 

These are the available languages for SnowBallStemmer.

 

 

 

Now let’s stem a word using SnowBallStemmer. after creating the SnowBallStemmer object we need to specify the language that we want to use, as i have already said that you can use different languages in the SnowBallStemmer. in this example we want to stem eating and the result will be eat.

 

Thank you for visiting my website! If you enjoyed the free courses, please consider supporting my works on Patreon.
Exercise Files
No Attachment Found
No Attachment Found