Skip to content

Instantly share code, notes, and snippets.

@siakon89
Created June 6, 2018 09:23
Show Gist options
  • Save siakon89/fdef57ee8420ca8887c3e03f110ad01a to your computer and use it in GitHub Desktop.
Save siakon89/fdef57ee8420ca8887c3e03f110ad01a to your computer and use it in GitHub Desktop.
# Import the TextBlob package
from textblob import TextBlob
# A simple sentiment analysis test
# Create a TextBlob from a string or a text
test_blob = TextBlob("This is an awesome day!")
# Extract sentiment from blob
print(test_blob.sentiment)
# Printed: Sentiment(polarity=1.0, subjectivity=1.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment