Use of Bi-LSTM for Emotion Detection via Text Messaging in the Latin American Context
Jose Junior Cruz Mocarro A.; Smith Pariona Castillo B.; Oscar Cerda Garcia R. · Proceedings of the LACCEI international Multi-conference for Engineering, Education and Technology (2026) · DOI: 10.18687/laccei2026.1.1.273
Resumen
Emotional violence in digital environments represents a critical and growing challenge in Latin America, where regional slang, cultural expressions, and informal speech patterns make automated detection particularly difficult. Studies from Peru indicate alarming rates of domestic violence among adolescents and suicidal ideation in adult populations, underscoring the need for context-sensitive and locally adapted risk-detection tools. Most existing natural language processing models are trained on English or neutral Spanish corpora, limiting their ability to interpret the communicative nuances of local informal language. To address this gap, this study proposes a Bidirectional Long Short-Term Memory network trained on an 18,000-message dataset collected via automated web scraping from Twitter, capturing authentic Latin American informal speech. The dataset was built using a semi-automatic two-stage labeling strategy combining a pre-labeled English violence corpus translated into Spanish with keyword-defined classification of regional tweets. A balanced 50/50 class distribution was maintained across both training and validation splits to prevent any model bias. The complete pipeline spans data collection and cleaning through translation and binary classification of violent versus non-violent messages. The model achieves 90 percent accuracy and an F1-score of 0.89, outperforming standard LSTM and GRU baselines trained under identical conditions. It demonstrates semantic understanding by correctly classifying ambiguous regional expressions, distinguishing affectionate uses of violent language from genuine threats. Unlike keyword-based approaches, the model captures contextual intent rather than surface-level patterns, reducing false positives in everyday colloquial speech. Ethical safeguards including data anonymization and compliance with platform terms of service were applied throughout the research process.
Instituciones: Universidad Peruana de Ciencias Aplicadas