diff --git a/main.py b/main.py index 60aa99e8062947b86fccc5b06fa3bc8b36d45403..af39de31250e7279dbd479ddcf0b2d2d7a297563 100644 --- a/main.py +++ b/main.py @@ -1,26 +1,29 @@ -#Mission: Create a sentiment analysis extention that will take the users text and determine whether or not it is inclusive. -Depending on the users inclusivity it will display an approving/disapproving image. +# Mission: Create a sentiment analysis extention that will take the users text and determine whether or not it is inclusive. +# Depending on the users inclusivity it will display an approving/disapproving image. # -Steps: -Research Sentimental Analysis --Textblob -Create a Sentimental analysis program using Python +# Steps: +# Research Sentimental Analysis +# -Textblob +# Create a Sentimental analysis program using Python # -Research articles, hatespeech, etc... to use to train AI to determine what will be considered inclusive and exclusive. -Use Libaray to train AI +# Research articles, hatespeech, etc... to use to train AI to determine what will be considered inclusive and exclusive. +# Use Libaray to train AI # # -Pseudocode -Ask user for input (text from file/article/active typing) -Import libraries (TextBlob) -Libary (TextBlob) has API for tagging certain phrases -Check whether or not the text includes tagged phrase -If text includes tagged phrase, decrease the score -If text includes no tagged phrases, increase the score -Calculate the overall score of the user (difference) -If score is positive then display image of happy cat -If score is negitive then display image of angry cat -If score is neutral (zero) then display image of middle cat +# Pseudocode +# Ask user for input (text from file/article/active typing) +# Import libraries (TextBlob) +# Libary (TextBlob) has API for tagging certain phrases +# Check whether or not the text includes tagged phrase +# If text includes tagged phrase, decrease the score +# If text includes no tagged phrases, increase the score +# +# Calculate the overall score of the user (difference) +# If score is positive then display image of happy cat +# If score is negitive then display image of angry cat +# If score is neutral (zero) then display image of middle cat +# + from textblob import TextBlob from newspaper import Article @@ -37,3 +40,4 @@ print(text) blob = TextBlob(text) sentiment = blob.sentiment.polarity_# -1 to 1 print(sentiment) +