Twitter sentiment analysis - bottleneck #260
-
So we want to do some Twitter sentiment analysis for a bot. So what is the thing which takes too long? Fetching the tweets from Twitter seems to go pretty quickly, but after that it's stuck for a while. So what can we do to get a good sentiment graph (even with less features like the one from Finbrain) from Twitter in a short amount of time? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Fetching tweets from Twitter seems to go pretty quickly, but that is 10 tweets per 1 hour and 240 per day. Which isn't much when you think about it. When I tested like 60 tweets per hour it took ages! We'll look into https://github.com/twintproject/twint in the future as there's no API key required and is much faster retrieving data. I think the bottleneck may be on parsing each tweet, where we do:
There should be easier ways to do this processing, but my goal at the beginning was to have something working and then we could focus on optimisations. As the saying goes: "Premature optimization is the root of all evil" Plus, we are using a lighter version of Google's BERT model, which by itself should already make sentiment prediction faster. |
Beta Was this translation helpful? Give feedback.
-
@DidierRLopes A faster sentiment prediction would be great :) |
Beta Was this translation helpful? Give feedback.
Fetching tweets from Twitter seems to go pretty quickly, but that is 10 tweets per 1 hour and 240 per day. Which isn't much when you think about it. When I tested like 60 tweets per hour it took ages! We'll look into https://github.com/twintproject/twint in the future as there's no API key required and is much faster retrieving data.
I think the bottleneck may be on parsing each tweet, where we do:
There should be easier ways to do this processing, but my goal at the beginning was to have something working and then we could focus on opti…