Skip to content
Snippets Groups Projects
Commit 19335a3c authored by Maggie Kocorowski's avatar Maggie Kocorowski
Browse files

python tutorial code

parent e2aea5db
Branches
No related tags found
No related merge requests found
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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment