Skip to content

Instantly share code, notes, and snippets.

@emmagrimaldi
Created September 1, 2018 00:32
Show Gist options
  • Select an option

  • Save emmagrimaldi/33f86b28d0bef4fdf155b70d7f4868f3 to your computer and use it in GitHub Desktop.

Select an option

Save emmagrimaldi/33f86b28d0bef4fdf155b70d7f4868f3 to your computer and use it in GitHub Desktop.
wordnetlemmatizer
# importing the library needed in this section
from nltk.stem import WordNetLemmatizer
# instantiating the lemmaztizer object
lemmatizer = WordNetLemmatizer()
# lemmatizing each word through a list comprehension
[lemmatizer.lemmatize(token) for token in clean_tokens]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment