From fe90e08191cea08b7c64e8ef0254e1fe766b5c1b Mon Sep 17 00:00:00 2001 From: andrewso <9V5f1FkzI2LD> Date: Mon, 12 Oct 2020 17:58:59 +0100 Subject: [PATCH] [12.10.20] Testing --- src/tweets/collector.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/tweets/collector.py b/src/tweets/collector.py index 5e4ab11..eda63f1 100644 --- a/src/tweets/collector.py +++ b/src/tweets/collector.py @@ -125,22 +125,32 @@ def processTweet(text, type): removedSpecialChars = cleanTweet(removedLines) removedSpacing = removeSpacing(removedSpecialChars[0]) tweetLength = checkLength(removedSpacing) + + log("Boop1", 'DEBUG') if tweetLength == True: checkIfEnglish = detectLaguage(removedSpecialChars[0]) + log("Boop2", 'DEBUG') if checkIfEnglish == True: tweetText = remove_non_ascii(removedSpacing) + log("Boop3", 'DEBUG') # log("Cleaned Tweet: {}".format(tweetText), 'INFO') cleanedTweet = tweetText + ' ' + removedSpecialChars[1] if callSpamFilter(cleanedTweet) != 'spam': + log("After spam call", 'DEBUG') + pos, neu, neg, compound = callSentimentAnalyser(cleanedTweet) + log("After Sentiment Call", 'DEBUG') + if compound != 0.0 | neu <= 0.8: + log("if not 0.0 or above 0.8", 'DEBUG') + hourTweet = {'pos': pos, 'neu': neu, 'neg': neg, 'compound': compound, 'type': type} hourStack.append(hourTweet)