Skip to content

Instantly share code, notes, and snippets.

View iamscotttaylor's full-sized avatar
🏗️
Building

Scott Taylor iamscotttaylor

🏗️
Building
View GitHub Profile
@iamscotttaylor
iamscotttaylor / main.py
Last active March 27, 2020 19:35
Sentiment Analysis
import string
from collections import Counter
from nltk.tokenize import word_tokenize
from nltk.corpus import stopwords
from nltk.sentiment.vader import SentimentIntensityAnalyzer
import matplotlib.pyplot as plt
text = open('read.txt', encoding='utf-8').read()
lower_case = text.lower()
cleaned_text = lower_case.translate(str.maketrans('', '', string.punctuation))