The stemming procedure involves creating a suitable word with reduced letters for the words of the tokenizer.
Stemming text data
How to do it...
- Initialize the stemming process with a new Python file:
from nltk.stem.porter import PorterStemmer from nltk.stem.lancaster import LancasterStemmer from nltk.stem.snowball import SnowballStemmer
- Let's describe some words to consider, as follows:
words = ['ability', 'baby', 'college', 'playing', 'is', 'dream', 'election', 'beaches', 'image', 'group', 'happy']
- Identify a group of stemmers to be used:
stemmers = ['PORTER', 'LANCASTER', &apos...