An ensemble approach for offensive and hate speech detection from Roman Urdu social media platforms

Online platforms increasingly host hate and offensive content, motivating reliable automatic detection for moderation and safety. This study evaluates classical machine learning (Naïve Bayes (NB), Random Forest (RF), Support Vector Machine (SVM), and Logistic Regression (LR)) and neural models (Long Short-Term Memory (LSTM) and Multi-Layer Perceptron (MLP)) on three Roman Urdu benchmarks: Roman Urdu Hate-speech and Offensive Language Detection (RUHSOLD), Violent Views Detection Dataset in Urdu (VVD-21), and Hate Speech Roman Urdu (HS-RU-20). Experiments were conducted at word and sentence levels, and performance was assessed using accuracy, precision, recall, and F1-score. On RUHSOLD, LSTM achieved the highest accuracy (90%) at both word- and sentence-levels. On VVD-21 and HS-RU-20, SVM attained the best sentence-level accuracy (83%), with strong hostile-class F1, but weak neutral-class recall. Overall, LSTM favored sequential inputs, whereas SVM performed effectively on structured representations. Neutral detection remained challenging, reflecting class imbalance and subtle contextual usage. The findings underscore the need for improved feature representations and context-aware models. Future work should incorporate transformer-based encoders and adversarial training to enhance robustness and reduce bias.

Authors

Institutions

Publication Details

Journal
PeerJ Computer Science
Published
2026-11-30
DOI
https://doi.org/10.7717/peerj-cs.4161
Primary Topic
Hate Speech and Cyberbullying Detection
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

An ensemble approach for offensive and hate speech detection from Roman Urdu social media platforms

Rashid Amin, Mohammed A. El-Meligy, Jaroslav Frnda, Nazia Khalid et al.
PeerJ Computer Science
Hate Speech and Cyberbullying Detection
article

An ensemble approach for offensive and hate speech detection from Roman Urdu social media platforms

Rashid Amin, Mohammed A. El-Meligy, Jaroslav Frnda, Nazia Khalid, Mohamed Abdel Fattah Sharaf, Hira Akhtar Butt, Zunaira Rashid
article en

Abstract

Online platforms increasingly host hate and offensive content, motivating reliable automatic detection for moderation and safety. This study evaluates classical machine learning (Naïve Bayes (NB), Random Forest (RF), Support Vector Machine (SVM), and Logistic Regression (LR)) and neural models (Long Short-Term Memory (LSTM) and Multi-Layer Perceptron (MLP)) on three Roman Urdu benchmarks: Roman Urdu Hate-speech and Offensive Language Detection (RUHSOLD), Violent Views Detection Dataset in Urdu (VVD-21), and Hate Speech Roman Urdu (HS-RU-20). Experiments were conducted at word and sentence levels, and performance was assessed using accuracy, precision, recall, and F1-score. On RUHSOLD, LSTM achieved the highest accuracy (90%) at both word- and sentence-levels. On VVD-21 and HS-RU-20, SVM attained the best sentence-level accuracy (83%), with strong hostile-class F1, but weak neutral-class recall. Overall, LSTM favored sequential inputs, whereas SVM performed effectively on structured representations. Neutral detection remained challenging, reflecting class imbalance and subtle contextual usage. The findings underscore the need for improved feature representations and context-aware models. Future work should incorporate transformer-based encoders and adversarial training to enhance robustness and reduce bias.

PeerJ Computer ScienceVol. 12
VSB - Technical University of Ostrava (CZ), University of Engineering and Technology Taxila (PK), University of Central Punjab (PK), Jadara University (JO), King Saud University (SA), University of Žilina (SK), University of Management and Technology (PK)
Hate Speech and Cyberbullying Detection
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon