Skip to content

Instantly share code, notes, and snippets.

@letthedataconfess
Created January 27, 2021 06:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save letthedataconfess/3be789b4f3f21d65182902c42dad123c to your computer and use it in GitHub Desktop.
Save letthedataconfess/3be789b4f3f21d65182902c42dad123c to your computer and use it in GitHub Desktop.
sentiment analysis
nltk.download('wordnet')
lemmatizer=WordNetLemmatizer()
df['review']=df.review.apply(lambda x:[lemmatizer.lemmatize(word) for word in x])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment