Dexter The Bot

::Description

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.

::Screenshots

1. Twitter Profile 2. Response Example 3. Response Example
4. Response Example 5. Music Database (Spotify)

::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.

::Contributions

- 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

::Collaborators

  • Carlos Roman : Researcher and Developer
  • Jessy Guju : Sentiment Playlist Curator
  • Carlos Aguilar Nuño : Sentiment Playlist Curator
  • Paola Díaz : Sentiment Playlist Curator
  • Pedro Vélez : Sentiment Playlist Curator
  • Claudia Loyo : Sentiment Playlist Curator
  • Luz Giovannetti : Sentiment Playlist Curator
  • Andrea Celis : Sentiment Playlist Curator
  • María Dobler : Sentiment Playlist Curator
  • Rodolfo Martínez : Sentiment Playlist Curator
  • María Belen Castillo : Sentiment Playlist Curator
  • Daniel Amezcua : Sentiment Playlist Curator
  • Alejandra Becerra : Sentiment Playlist Curator
  • Andrea Torres : Sentiment Playlist Curator
  • Ceci S. Ramírez : Sentiment Playlist Curator
  • Marco Mancha : Sentiment Playlist Curator
  • Santiago Valencia : Sentiment Playlist Curator
  • Noé Loyola : Sentiment Playlist Curator
  • Alfonso Diaz : Sentiment Playlist Curator
  • Valter Núñez : Sentiment Playlist Curator