Skip to content

Instantly share code, notes, and snippets.

@saisyam
Created June 21, 2021 13:30
Show Gist options
  • Save saisyam/a06b57411041d92a1d66689b6304df7f to your computer and use it in GitHub Desktop.
Save saisyam/a06b57411041d92a1d66689b6304df7f to your computer and use it in GitHub Desktop.
Calculate sentiment
from nltk.sentiment.vader import SentimentIntensityAnalyzer
sia = SentimentIntensityAnalyzer()
text = "Pretty pricey but the lamb burger ($25) is beyond amazing. Definitely worth it. So, so good."
sia.polarity_scores(text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment