Hate Speech Detection in Nepali Social Media: A Comparative Analysis of Machine Learning and Transformer-based Approaches

Authors

  • Palisha Shakya Nepal College of Information Technology
  • Suraj Chand Nepal College of Information Technology
  • Lalit Buda Pal Nepal College of Information Technology
  • Manil Vaidhya Nepal College of Information Technology

DOI:

https://doi.org/10.65091/icicset.v2i1.3

Abstract

The growth of hate speech on social media presents
serious problems for low-resource languages like Nepali, as
automated detection systems for the Nepali language are underdeveloped.
This paper presents a comprehensive approach
for detecting hate speech in Nepali social media by combining
lexicon-based feature engineering with machine learning and
transformer-based models. The NEHATE dataset, which included
13,505 annotated tweets from Nepal’s municipal election discourse
in 2022, was used for this study along with a curated
lexicon of 1,077 offensive terms divided into classes such as
Politics (115 terms), Race (77), Vulgar (50), Disability (37), and
Gender (15). The lexicon includes 159 taboo terms and 158
severely offensive terms, with ratings ranging from 1 (mild) to 5
(severe). The methodology uses the lexicon for feature engineering
rather than training data, extracting offensive term counts, maximum
offensiveness scores, taboo presence, and category-specific
indicators. Two traditional machine learning models – Naive
Bayes and Gradient Boosting were applied using character-level
TF-IDF (n-grams 2–5) with lexical characteristics. Additionally,
three multilingual transformers—mBERT, XLM-RoBERTa, and
MuRIL were fine-tuned. The pre-processing pipeline handles
both Devanagari script and Romanized Nepali text common
on social media. Experimental results on an 80-20 train-test
split demonstrate that Random Forest Classifier achieves the
best performance among traditional machine learning models
(F1-score: 0.847, AUC-ROC: 0.912), while MuRIL outperforms
other transformer models (F1-score: 0.863). Also for the ablation
study lexicon enhanced features improve F1-score over TF-IDF
alone. This study demonstrates that lexicon-enhanced feature
engineering significantly improves hate speech detection in lowresource
languages and provides practical recommendations
for developing content moderation systems for Nepali-speaking
communities.

Downloads

Published

2026-01-19

How to Cite

[1]
P. Shakya, S. Chand, L. B. Pal, and M. Vaidhya, “Hate Speech Detection in Nepali Social Media: A Comparative Analysis of Machine Learning and Transformer-based Approaches”, ICICSET2025, vol. 2, no. 1, Jan. 2026.