Classification of Online Toxic Comments Using Machine Learning

The rapid growth of social media platforms, online discussion forums, and digital communication has significantly increased the volume of user-generated content. While these platforms promote communication and information sharing, they also face challenges due to toxic comments, including hate speech, cyberbullying, abusive language, threats, and offensive content. Such comments negatively impact users' mental well-being, discourage healthy discussions, and create unsafe online environments. Manual moderation of millions of online comments is time-consuming, expensive, and often inconsistent. This study proposes a machine learning-based online toxic comment classification system that automatically identifies and classifies toxic comments using Natural Language Processing (NLP) techniques. The textual data undergo preprocessing steps such as text cleaning, tokenization, stop-word removal, stemming, lemmatization, and TF-IDF vectorization before model training. Several supervised machine learning algorithms, including Logistic Regression, Naïve Bayes, Support Vector Machine (SVM), Decision Tree, Random Forest, and Extreme Gradient Boosting (XGBoost), are trained and evaluated using standard performance metrics such as accuracy, precision, recall, F1-score, and confusion matrix. Experimental results demonstrate that Logistic Regression and Support Vector Machine achieve high classification accuracy, while ensemble methods such as Random Forest provide robust performance. The proposed system offers an efficient and scalable solution for automated content moderation, helping social media platforms maintain respectful online communities and reduce the spread of harmful content.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-07-16
DOI
https://doi.org/10.5281/zenodo.21393333
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
article

Classification of Online Toxic Comments Using Machine Learning

Dr. Sangmesh Kalyane, Sneha
Zenodo (CERN European Organization for Nuclear Research)
Hate Speech and Cyberbullying Detection
article

Classification of Online Toxic Comments Using Machine Learning

Dr. Sangmesh Kalyane, Sneha
article en

Abstract

The rapid growth of social media platforms, online discussion forums, and digital communication has significantly increased the volume of user-generated content. While these platforms promote communication and information sharing, they also face challenges due to toxic comments, including hate speech, cyberbullying, abusive language, threats, and offensive content. Such comments negatively impact users' mental well-being, discourage healthy discussions, and create unsafe online environments. Manual moderation of millions of online comments is time-consuming, expensive, and often inconsistent. This study proposes a machine learning-based online toxic comment classification system that automatically identifies and classifies toxic comments using Natural Language Processing (NLP) techniques. The textual data undergo preprocessing steps such as text cleaning, tokenization, stop-word removal, stemming, lemmatization, and TF-IDF vectorization before model training. Several supervised machine learning algorithms, including Logistic Regression, Naïve Bayes, Support Vector Machine (SVM), Decision Tree, Random Forest, and Extreme Gradient Boosting (XGBoost), are trained and evaluated using standard performance metrics such as accuracy, precision, recall, F1-score, and confusion matrix. Experimental results demonstrate that Logistic Regression and Support Vector Machine achieve high classification accuracy, while ensemble methods such as Random Forest provide robust performance. The proposed system offers an efficient and scalable solution for automated content moderation, helping social media platforms maintain respectful online communities and reduce the spread of harmful content.

Zenodo (CERN European Organization for Nuclear Research)
Openalex Percentile: Top 6%
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.

Classification of Online Toxic Comments Using Machine Learning — Dr. Sangmesh Kalyane, Sneha · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS