Created
February 10, 2019 15:33
-
-
Save rajacsp/4214c86b74c7b2cf24d1d31ba8fd65e5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nltk.sentiment.vader import SentimentIntensityAnalyzer | |
sid = SentimentIntensityAnalyzer() | |
def get_sentiment(sentence): | |
return sid.polarity_scores(sentence) | |
sentiment = get_sentiment("Hello Toronto") | |
print(sentiment) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment