Course Content
Introduction to NLP
Introduction to NLP
2. Stemming and Lemmatization
Challenge: Stemming the Tokens
Task
Swipe to show code editor
Your task is the following:
- Import Porter Stemmer.
- Convert
text
to lowercase. - Tokenize the
text
string. - Load English stop words.
- Filter out the stop words using list comprehension.
- Create a stemmer object.
- Stem the tokens using list comprehension.
Solution
Switch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?
Thanks for your feedback!
Section 2. Chapter 2
Challenge: Stemming the Tokens
Task
Swipe to show code editor
Your task is the following:
- Import Porter Stemmer.
- Convert
text
to lowercase. - Tokenize the
text
string. - Load English stop words.
- Filter out the stop words using list comprehension.
- Create a stemmer object.
- Stem the tokens using list comprehension.
Solution
Switch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?
Thanks for your feedback!
Section 2. Chapter 2
Switch to desktop for real-world practiceContinue from where you are using one of the options below