Open Access
ARTICLE
Using Hate Speech Detection Techniques to Prevent Violence and Foster Community Safety
1 Department of Information Technology, Lahore Leads University, Lahore, 42000, Pakistan
2 School of Electronics and Information Engineering, Taiyuan University of Science and Technology, Taiyuan, 030000, China
* Corresponding Author: Muhammad Hasnain. Email:
Journal on Artificial Intelligence 2025, 7, 485-498. https://doi.org/10.32604/jai.2025.071933
Received 15 August 2025; Accepted 20 October 2025; Issue published 17 November 2025
Abstract
Violent hate speech and scapegoating people against one another have emerged as a rising worldwide issue. But identifying and combating such content is crucial to create safer and more inclusive societies. The current study conducted research using Machine Learning models to classify hate speech and overcome the limitations posed in the existing detection techniques. Logistic Regression (LR), Random Forest (RF), K-Nearest Neighbour (KNN) and Decision Tree were used on top of a publicly available hate speech dataset. The data was preprocessed by cleaning the text and tokenization and using normalization techniques to efficiently train the model. The experimental results indicate that LR and RF achieved good performance compared to other models, with LR achieving the highest testing accuracy of 93.66 and RF providing good general performance. These results demonstrate that the state-of-the-art applications of deep learning models are surpassed by optimized, and traditional machine learning models for hate speech detection. The research also highlights the need for constant re-adaptation to a linguistic shift and new forms of intolerance, emphasizing the interest of machine learning to support the actions against prejudice and social injustice in digital environments. This study benchmarks optimized machine learning algorithms for hate speech detection, demonstrating that traditional models can rival deep learning performance.Keywords
Cite This Article
Copyright © 2025 The Author(s). Published by Tech Science Press.This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.


Submit a Paper
Propose a Special lssue
View Full Text
Download PDF
Downloads
Citation Tools