Skip to content

Instantly share code, notes, and snippets.

@letthedataconfess
Created January 27, 2021 06:34
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/3403b4586c6c66a766e30771c007e35b to your computer and use it in GitHub Desktop.
Save letthedataconfess/3403b4586c6c66a766e30771c007e35b to your computer and use it in GitHub Desktop.
Sentiment analysis
!pip install contractions
import contractions
# Expanding contractions
def con(text):
expand=contractions.fix(text)
return expand
df.review=df.review.apply(con)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment