Skip to content

Instantly share code, notes, and snippets.

@prafulgondane
Last active June 20, 2022 17:15
Show Gist options
  • Save prafulgondane/66ffbef3ca322feae5502cddff3aea4d to your computer and use it in GitHub Desktop.
Save prafulgondane/66ffbef3ca322feae5502cddff3aea4d to your computer and use it in GitHub Desktop.
# Lemmatization
from nltk.stem import WordNetLemmatizer
wordnet_lemmatizer = WordNetLemmatizer()
def lemmatizer(text):
lemm_text = [wordnet_lemmatizer.lemmatize(word) for word in text]
return lemm_text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment