1. Learn
  2. /
  3. Courses
  4. /
  5. Natural Language Processing (NLP) in Python

Connected

Exercise

Stemming

Now that you've cleaned the review text and removed stop words and punctuation, you're ready to normalize the remaining words using stemming to reduce words to their root form. This helps group similar words together, making your analysis more consistent and efficient.

The PorterStemmer class has been provided, along with a list of clean_tokens.

Instructions

100 XP
  • Initialize the PorterStemmer().
  • Use a list comprehension to stem each token from the clean_tokens list.