This project was developped during StartHack.
Bringing non verbal communication to the virtual world
Empathy is missing in the virtual world
- Nowadays people are strongly connected but emotionally distant
- We looked at a more specific case of chat room
The assistant that processes anonymously each message, inferring what the users are feeling in real-time at a remarkable emotional depth.
- Very portable and reusable piece of software, which can be virtually integrated everywhere.
- ChatMo is privacy preserving, contrary to other invasive techniques like facial recognition.
You will need to create an API key for openAI to run our backend. More infos here.
- In backend directory, create a file
config.py
and add a variableopenAI_API_key = "YOUR OPENAI API KEY"
- From frontend directory, launch flutter with
flutter run -d chrome
- It opens only 1 chrome window representing your first user. Do
Alt + D
andAlt + Enter
to have your seconde user
- From backend directory, launch server with
python3 app.py
Message 1 | Message 2 |
---|---|
Message 3 | Message 4 |
---|---|
Message 5 |
---|
- We used GIFs to represent user's emotion as they are more expressive than smileys. The main drawback is that GIF are always a bit funny and it is not necessarly what you want to express feelings such as sadness, anger, ... Our aim was to use Telegram's animated smileys.
- User's feeling that are shown on the conversation are fully decided by the IA. Users have no control over it. What we wanted to do is ask the user if the feeling decided by the IA represents well how he feels.
- We could use user feedback to personalize our model and make it more accurate user-wise.
- If user A try to send profanitiesto user B, we could show a pop-up saying "Are you sure you want to send this message to B ?" .
- Extend the tool so it can be used in a group chat, not just a 1-to-1 conversation.
- In a group chat, if a user is beeing bullied, we could ask the bullied if he wants help and notify other participants to help him.
First, we began wit the very simple Text2emotion package. Text2emotion is a python package which will help to extract emotions from the content. Compatible with 5 different emotion categories as Happy, Angry, Sad, Surprise and Fear.
On top of Text2emotion, we added a profanity check with the profanity-check library. profanity-check is a fast, robust python library to check for profanity or offensive language in strings.
We then added sentiment analysis with TextBlob to improve our model. TextBlob is a simple library which supports complex analysis and operations on textual data. TextBlob return polarity and subjectivity of a sentence. Polarity lies between [-1, 1], where -1 indicates a negative sentiment and on the opposite, 1 defines a positive sentiment. Negation words reverse the polarity. Subjectivity quantifies the amount of personal opinion and factual information contained in the text. The higher subjectivity means that the text contains personal opinion rather than factual information.
After that, we extended our TextBlob utilisation with the Naive Bayes Analyzer.
Finally, we added a Sentiment Intensity Analyzer. NLTK already has a built-in, pretrained sentiment analyzer called VADER (Valence Aware Dictionary and sEntiment Reasoner). Since VADER is pretrained, we could get results quicker than the other analyzers we used before. Also, VADER is best suited for language used in social media, like short senteces with some slang and abbreviations, which would also correspond to what we could find in a group chat.
Very useful notebook to Compare sentiment analysis tools !