Author
Listed:
- Aymé Escobar Díaz
(Department of Computer Science, Universidad de las Fuerzas Armadas (ESPE), Av. General Rumiñahui, Quito 171103, Ecuador)
- Ricardo Rivadeneira
(Department of Computer Science, Universidad de las Fuerzas Armadas (ESPE), Av. General Rumiñahui, Quito 171103, Ecuador)
- Walter Fuertes
(Department of Computer Science, Universidad de las Fuerzas Armadas (ESPE), Av. General Rumiñahui, Quito 171103, Ecuador)
- Washington Loza
(Department of Computer Science, Universidad de las Fuerzas Armadas (ESPE), Av. General Rumiñahui, Quito 171103, Ecuador)
Abstract
Hate speech on social media reproduces norms of inequality and gender stereotypes, disproportionately affecting women. This study proposes a hybrid approach that integrates emotional tone classification with explicit hostility detection to strengthen preventive moderation. We constructed a corpus from three open data sets (1,236,371 records; 1,003,991 after ETL) and represented the text using TF-IDF and contextual RoBERTa embeddings . We trained individual models (RoBERTa fine-tuned , Random Forest, and XGBoost) and a stacking metamodel (Gradient Boosting) that combines their probabilities. On the test set, the ensemble outperformed the base classifiers, achieving accuracy of 0.93 in hate detection and 0.90 in emotion classification, with an AUC of 0.98 for emotion classification. We implemented a RESTful API and a web client to validate the moderation flow before publication, along with an administration panel for auditing. Performance tests in a prototype deployment (Google Colab exposed through an Ngrok tunnel) provided proof-of-concept validation, revealing concurrency limitations from around 300 users due to infrastructure constraints. In general, the results indicate that incorporating emotional tone analysis improves the model’s ability to identify implicit hostility and offers a practical way to promote safer digital environments. The probabilistic outputs produced by the ensemble model were subsequently analyzed using the Bayesian Calibration and Optimal Design under Asymmetric Risk (BACON-AR) framework, which serves as a mathematical post hoc decision layer for evaluating classification behaviour under unequal error costs. Rather than modifying the trained architecture or improving its predictive performance, the framework identifies a cost-sensitive operating threshold that minimizes the total expected risk under the selected asymmetric cost configuration. The experiments were conducted using an English-language data set; therefore, the findings of this study are limited to hate speech detection in English.
Suggested Citation
Aymé Escobar Díaz & Ricardo Rivadeneira & Walter Fuertes & Washington Loza, 2026.
"Classification Model of Emotional Tone in Hate Speech and Its Relationship with Inequality and Gender Stereotypes, Using NLP and Machine Learning Algorithms,"
Future Internet, MDPI, vol. 18(4), pages 1-43, April.
Handle:
RePEc:gam:jftint:v:18:y:2026:i:4:p:218-:d:1924238
Download full text from publisher
More about this item
Keywords
;
;
;
;
;
;
;
;
;
;
;
;
;
JEL classification:
- L2 - Industrial Organization - - Firm Objectives, Organization, and Behavior
Statistics
Access and download statistics
Corrections
All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jftint:v:18:y:2026:i:4:p:218-:d:1924238. See general information about how to correct material in RePEc.
If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.
We have no bibliographic references for this item. You can help adding them by using this form .
If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.
For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager The email address of this maintainer does not seem to be valid anymore. Please ask MDPI Indexing Manager to update the entry or send us the correct address
(email available below). General contact details of provider: https://www.mdpi.com .
Please note that corrections may take a couple of weeks to filter through
the various RePEc services.