Complete the code to create a Porter stemmer object.
from nltk.stem import [1] porter = [1]()
The PorterStemmer class from nltk.stem is used to create a Porter stemmer object.
Complete the code to stem the word 'running' using the Porter stemmer.
word = 'running' stemmed_word = porter.[1](word) print(stemmed_word)
The stem() method is used to get the stem of a word using the Porter stemmer.
Fix the error in the code to create a Snowball stemmer for English.
from nltk.stem import SnowballStemmer stemmer = SnowballStemmer('[1]')
The SnowballStemmer requires the language name as a lowercase string. For English, use 'english'.
Fill both blanks to stem the word 'happiness' using SnowballStemmer for English.
from nltk.stem import [1] stemmer = [1]('[2]') print(stemmer.stem('happiness'))
Use SnowballStemmer and specify the language as 'english' to stem English words.
Fill all three blanks to create a dictionary of stemmed words from a list using PorterStemmer.
from nltk.stem import [1] porter = [1]() words = ['running', 'jumps', 'easily'] stemmed = {word: porter.[2](word) for word in [3] print(stemmed)
Import and create a PorterStemmer object, then use its stem() method to stem each word in the list words.