Skip to content
Snippets Groups Projects
Commit 41b6a3c0 authored by Christy Tran's avatar Christy Tran
Browse files

message

parent b568d09c
No related branches found
No related tags found
No related merge requests found
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<div class="description"> <div class="description">
<h2>Christy Tran</h2> <h2>Christy Tran</h2>
<p>Developer</p> <p>Developer</p>
<p>Computer Science</p> <p>Software Engineerings</p>
<p>ctt57@drexel.edu</p> <p>ctt57@drexel.edu</p>
</div> </div>
</div> </div>
......
...@@ -24,20 +24,41 @@ ...@@ -24,20 +24,41 @@
# If score is neutral (zero) then display image of middle cat # If score is neutral (zero) then display image of middle cat
# #
from textblob import TextBlob
from newspaper import Article
url = "FIXME"
article = Article(url)
article.download() from textblob import TextBlob
article.parse()
article.nlp()
text = article.summary
print(text)
with open('mytext.txt','r') as f:
text=f.read()
blob=TextBlob(text) blob=TextBlob(text)
sentiment = blob.sentiment.polarity_# -1 to 1 sentiment = blob.sentiment.polarity #-1-1
print(sentiment) print(sentiment)
#simple sentiment text analysis (https://www.youtube.com/watch?v=tXuvh5_Xyrw&t=610s)
#if sentmient>1:
# figure out how to get images to appear
# elif sentiment<1:
# figure out how to get image to appear
# else:
# last image
#from textblob import TextBlob
#from newspaper import Article
#url = "FIXME"
#article = Article(url)
#article.download()
#article.parse()
#article.nlp()
#text = article.summary
#print(text)
#blob = TextBlob(text)
#sentiment = blob.sentiment.polarity_# -1 to 1
#print(sentiment)
I hate hate hate lots of things
I am so negitive!!
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment