Complete the code to import the WordNetLemmatizer from nltk.
from nltk.stem import [1]
The WordNetLemmatizer is the class used for lemmatization in nltk.
Complete the code to create a lemmatizer object.
lemmatizer = [1]()You create a lemmatizer by calling WordNetLemmatizer().
Fix the error in the code to lemmatize the word 'running'.
lemma = lemmatizer.[1]('running')
The method to get the lemma of a word is lemmatize().
Fill both blanks to lemmatize the word 'better' as an adjective.
lemma = lemmatizer.[1]('better', pos=[2])
Use lemmatize() with pos='a' to lemmatize adjectives like 'better'.
Fill all three blanks to create a dictionary of words and their lemmas for nouns only.
words = ['cars', 'geese', 'mice'] lemmas = {word: lemmatizer.[1](word, pos=[2]) for word in words if word.endswith([3])}
Use lemmatize() with pos='n' for nouns. The filter checks words ending with 's' to focus on plural nouns.
