Dexter is a friendly Twitter bot that promotes sentiment expression by analyzing feelings from people he interacts with, building a response and sharing a song that might help them.
Once Dexter is tagged in a tweet, he analyzes the emotions that are present in the text using a Multichannel Convolutional Neural Network and then builds a response given a set of predefined answers and then tweets back to the user with a song that might express the same emotion.
::For my fellow nerds
In its first version, the bot analyzed tweets by breaking them into words and sending them through a set of rules written in prolog with the purpose to find a relationship between them and 6 possible sentiments. This algorithm was antique but pretty useful, it was really good at guessing the emotion in really straightforward tweets like "I feel...", "I am... " and similar ones, but it sucked at understanding complex context based phrases.
Therefore, for the second version, a multi-channel convolutional neural network was implemented. This trained model would analyse the sentence as a whole and return a percentage of likeliness of expressing certain emotion. This algorithm was the exact opposite than the one mentioned before, it was really good at recognising emotions in a heavily context based phrases, but not that good with small simple phrases.
Finally, the latest version of the bot would work with the best of both worlds. It would analyse the sentence with both algorithms and get to a consensus to decide which was the main sentiment and a possible secondary sentiment. This way if the CNN failed to get a percentage of certainty greater than 60% it would take in consideration the analysis made by the prolog algorithm.
Once sentiment analysis is done, the bot would construct a response by combining a pre-written set of possible phrases for each emotion with a random song, from the sentiment based database of songs, that reflected that emotion or combination of emotions.
- Designed Dexter the bot character
- State of the art research about sentiment analysis and neural networks
- Designed and Implemented sentiment analysis algorithm
- Developed the Twitter bot with Python
- Connected Spotify's API with Python