July 2017
Beginner to intermediate
486 pages
13h 49m
English
As we saw in Chapter 3, Understanding Structure of Sentences, stemming is the process of converting each word of the sentence to its root form by deleting or replacing suffixes.
In this section, we will apply the Stemmer concept on the raw text.
Here, we have code where we are using the PorterStemmer available in nltk. Refer to Figure 4.5:

The output of the preceding code is:
stem is funnier than a bummer say the sushi love comput scientist. she realli want to buy cars. she told me angrily.
When you compare the preceding output with the original text, then we can see the following ...
Read now
Unlock full access