Inspiration

Due to the COVID-19 pandemic, more and more aspects of our daily lives (whether it’s work, school, or social interaction) are being conducted online. As a result, in the absence of the intonation, inflections, and emotions that are present in verbal speech, the tone of online text is an increasingly critical aspect of communication. However, it’s easy to misinterpret or not pick up on tone. This is a particularly prevalent issue for neurodivergent people (those with atypical cognitive variations like Autism and ADHD). With these problems in mind, we created Joy, a web application that detects the emotions and tone of inserted text.

What it does

Joy is a web application that is oriented toward helping neurodivergent people distinguish the tone in online text. The way it works is that users can copy and paste the text they want to interpret into the text box and hit submit. The machine learning backend takes this input and returns to the user: 1) whether or not the text contains a sarcastic or joking tone and 2) what emotion out of a list of 13 is behind it. The website also contains helpful information and resources to educate users about the significance of tone online and why it's an important issue to address.

How we built it

For Joy to be able to distinguish different tones in text, we built two models using natural language processing (specifically sentiment analysis): a sarcasm detection model and an emotion detection model. The former takes the input and determines whether or not the text is meant to be taken in a sarcastic/joking manner, and the latter categorizes the text as one of 13 emotions (e.g. happiness, enthusiasm, relief). To do this, we used standard data science and machine learning libraries like pandas, numpy, matplotlib, seaborn, tensorflow, and sci-kit learn. The first step was cleaning both datasets to ensure that they could be used properly without throwing errors or skewing the results. Then we split the data using train_test_split into a 70/30 ratio and created various models to find the best result. Our models ranged from Multinomial Naive Bayes to Support Vector Classification. We used Javascript and HTML/CSS to create the web application, with various features such as a carousel. Integration was done using flask.

Challenges we ran into

One major challenge we ran into was integrating the machine learning model with the web app. We split up the work and used separate tools to develop each part, so we had to spend a lot of time modifying our inputs and outputs to match others. In terms of backend, we had difficulties acquiring suitable datasets for natural language processing because most data was collected for businesses. We almost decided to scrape the data off social media sites, but we ended up finding sources that worked. These sources had their own issues that we had to work through. It was also challenging to create the web application itself because our experience with HTML was rusty. We very much were learning as we worked.

Accomplishments that we're proud of

We’re proud of creating a product that can potentially help people have a more accessible and comfortable experience on the internet. We’re also happy that we were able to learn and incorporate concepts we were unfamiliar with, like sentiment analysis.

What we learned

Each team member learned many new computer science skills, like how natural language processing can be applied to sentiment analysis and how to build websites with HTML/CSS. We also developed several soft skills throughout the process like time management, collaboration, and taking risks.

What's next for Joy: Detect the tone of text

Our next steps for Joy would be expanding it into the chrome extension so users can quickly highlight text and receive information on its tone. We would also like to improve the model’s accuracy, expand the range of emotions it can detect, and add more information and resources for users to the website.

Share this project:

Updates