diff --git a/src/tweets/collector.py b/src/tweets/collector.py index b298db5..5e18567 100644 --- a/src/tweets/collector.py +++ b/src/tweets/collector.py @@ -110,9 +110,10 @@ class Listener(StreamListener): if callSpamFilter(cleanedTweet) != 'spam': 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):