[09.10.20] Filtering out neutral tweets

This commit is contained in:
andrewso 2020-10-09 20:11:04 +01:00
parent e19e1eac46
commit 0903b69b8e

View File

@ -110,9 +110,10 @@ class Listener(StreamListener):
if callSpamFilter(cleanedTweet) != 'spam': if callSpamFilter(cleanedTweet) != 'spam':
pos, neu, neg, compound = callSentimentAnalyser(cleanedTweet) pos, neu, neg, compound = callSentimentAnalyser(cleanedTweet)
hourTweet = {'pos': pos, 'neu': neu, 'neg': neg, 'compound': compound} if compound != 0.0:
hourTweet = {'pos': pos, 'neu': neu, 'neg': neg, 'compound': compound}
hourStack.append(hourTweet) hourStack.append(hourTweet)
def collector(hashtag): def collector(hashtag):