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.
Díaz et al. (Mon,) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: