Detecting Misogynistic Hate Speech in Portuguese
Palavras-chave:
Natural Language Processing,, Text Classification,, Imbalanced datasetResumo
Misogynistic hate speech targets women with language that promotes discrimination and hostility. In Brazil, the scarcity of annotated datasets in Portuguese presents additional challenges for automated detection. This study evaluates supervised machine learning models for classifying misogynistic hate speech using the MINA-BR dataset, which contains over 2,000 manually labeled comments. Four experimental scenarios were considered: (1) Bag of Words, (2) TF-IDF (Term Frequency-Inverse Document Frequency) with unigrams, (3) TF-IDF with bigrams, and (4) TF-IDF with SMOTE (Synthetic Minority Over-sampling Technique) for class balancing. Text preprocessing included lemmatization and stopword removal. Feature vectors were used as input for six classifiers: Naive Bayes (NB), Support Vector Machines (SVM), Logistic Regression (LR), Multilayer Perceptron (MLP), Random Forest (RF), and XGBoost. Model evaluation was performed using 5-fold cross-validation to ensure robustness and generalization of results. Among the models tested, Random Forest with TF-IDF and SMOTE representation achieved the highest accuracy on the test set, reaching 86.8%. However, the best F1-score was obtained by LR with TF-IDF and SMOTE, achieving a score of 0.565, indicating a more balanced performance between precision and recall. Additionally, the use of SMOTE notably improved recall in models such as NB and LR, enhancing the detection of the minority class (“Hate”). These results highlight the importance of combining appropriate text representation techniques with class-balancing strategies to develop effective hate speech detection systems in Portuguese-language content.