Detection of Negative Emotions in Short Texts Using Deep Neural Networks.
Journal:
Cyberpsychology, behavior and social networking
Published Date:
May 7, 2025
Abstract
Emotion detection is crucial in various domains, including psychology, health, social sciences, and marketing. Specifically, in psychology, identifying negative emotions in short Spanish texts, such as tweets, is vital for understanding individuals' emotional states. However, this process is challenging because of factors such as lack of context, cultural nuances, and ambiguous expressions. Although much research on emotion classification in tweets has focused on applications such as crisis analysis, mental health monitoring, and affective computing, most of it has been conducted in English, leaving a significant gap in addressing the emotional needs of Spanish-speaking communities. To address this gap, we used a corpus of 12,000 Spanish tweets tagged with Ekman's negative emotions (sadness, anger, fear, and disgust). Traditional features (n-grams of different types and sizes), syntactic n-grams, and combined features were evaluated. Different deep neural networks, including convolutional neural networks, Bidirectional Encoder Representations of Transformers (BERT), and the robust optimized BERT approach called RoBERTa, were implemented and compared with traditional machine learning methods to identify the most effective method. Extensive testing revealed that BERT achieved the best result, with a macro F1 score of 0.9973. Furthermore, we reported the carbon emissions generated during the training of each implemented method. This study makes a unique contribution by focusing on negative emotions in Spanish, leveraging one of the largest and highest-quality corpora available. It stands out for implementing advanced transformers such as RoBERTa and integrating combined and syntactic n-grams in traditional methods. Furthermore, it highlights how parameters, features, and preprocessing significantly influence performance.