Created
December 3, 2018 09:31
-
-
Save anmolj7/a393b5c2c661f995a223308bd7c11f21 to your computer and use it in GitHub Desktop.
This file contains 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
#this code was tested and working on python 3.6.5 | |
#The Module TextBlob Needs To Be Installed as it contains a predefined function that | |
#can calculate the polarities. It includes a list of words that has a list of certain value .. | |
from textblob import TextBlob | |
text = input("Enter The Text> ") | |
model = TextBlob(text) | |
print(model.sentiment.polarity) | |
#The Polarity ranges from -1 to 1 | |
#where 0 indicates neutral, -1 indicates negative and 1 indicates positive. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment