Mobile Machine Learning Models for Emotion and Sarcasm Detection in Text: A Solution for Alexithymic Individuals
Tejas Goyal, Dev Hathi Rajeshbai, Neeraj Gopalkrishna, Md. Rafat Rahman Tushar, Mamatha HR · 2024
Alexithymia is a condition characterized by difficulty in identifying and expressing emotions, which can have a negative impact on social interactions and mental health. In this paper, we propose the use of mobile machine learning (ML) models for identifying emotions and sarcasm in text to provide real-time feedback and support for individuals with alexithymia. We developed five ML models, including a custom BERT model, a small-size BERT model, and a mobile BERT model for emotion detection, as well as an average word vector model and a mobile BERT model for sarcasm detection. We trained and evaluated these models on two datasets, a Twitter corpus for sarcasm detection and the GoEmotions dataset for emotion detection. Our results show that the mobile BERT models perform comparably to the larger BERT models, with an accuracy of up to 70% for emotion detection and 83% for sarcasm detection. These findings suggest that mobile ML models can be effective in identifying emotions and sarcasm in text and can be deployed on mobile devices to provide support for individuals with alexithymia.