Hate Speech and Offensive Content: Harnessing Machine Learning for Reliable Analysis and Detection
Abstract
The escalating prevalence of hate speech on social media necessitates effective detection mechanisms to foster a safe and inclusive online community. This research paper aims to enhance hate speech detection accuracy by evaluating the performance of diverse machine learning algorithms: Random Forest (RF), Logistic Regression (LR), and K-Nearest Neighbors (KNN). A diverse dataset comprising text samples from various online platforms, encompassing a wide spectrum of hate speech instances, was meticulously collected. The data underwent careful preprocessing involving tokenization, stemming, and stop-word removal to enhance data quality. Additionally, feature extraction techniques such as TF-IDF (Term Frequency-Inverse Document Frequency) and word embeddings were employed to effectively represent the textual content. The dataset was divided into training and testing sets, and the selected machine learning algorithms were trained on the former. Fine-tuning of hyperparameters was performed using crossvalidation techniques to optimize their performance. Evaluation metrics, including accuracy, precision, recall, and F1-score, were employed to assess the models’ effectiveness. The experimental findings revealed promising outcomes for hate speech detection across all three algorithms. Notably, Count Vectorizer features demonstrated excellent performance, with Random Forest achieving an accuracy of 0.942 for binary hate speech analysis and Logistic Regression achieving an accuracy of 0.897 for multi-class hate speech analysis, followed by LR and KNN.DOI:
https://doi.org/10.31449/inf.v49i27.7202Downloads
Published
How to Cite
Issue
Section
License
I assign to Informatica, An International Journal of Computing and Informatics ("Journal") the copyright in the manuscript identified above and any additional material (figures, tables, illustrations, software or other information intended for publication) submitted as part of or as a supplement to the manuscript ("Paper") in all forms and media throughout the world, in all languages, for the full term of copyright, effective when and if the article is accepted for publication. This transfer includes the right to reproduce and/or to distribute the Paper to other journals or digital libraries in electronic and online forms and systems.
I understand that I retain the rights to use the pre-prints, off-prints, accepted manuscript and published journal Paper for personal use, scholarly purposes and internal institutional use.
In certain cases, I can ask for retaining the publishing rights of the Paper. The Journal can permit or deny the request for publishing rights, to which I fully agree.
I declare that the submitted Paper is original, has been written by the stated authors and has not been published elsewhere nor is currently being considered for publication by any other journal and will not be submitted for such review while under review by this Journal. The Paper contains no material that violates proprietary rights of any other person or entity. I have obtained written permission from copyright owners for any excerpts from copyrighted works that are included and have credited the sources in my article. I have informed the co-author(s) of the terms of this publishing agreement.
Copyright © Slovenian Society Informatika







