Machine Learning-Based Detection of Offensive Content in YouTube Comments

Offensive comments and hate speech have become a challenge for content moderation on virtual social networks, and research on automated moderation techniques for Brazilian Portuguese is still limited. In this context, this study aims to contribute to the development of an efficient system for detecting and classifying offensive comments in Brazilian Portuguese using natural language processing and machine learning techniques. The adopted approach explores a novel dataset composed of 4,139 comments in Brazilian Portuguese extracted from YouTube and manually labeled. The goal is to automatically detect and classify offensive comments. Four classical text classification algorithms — Naive Bayes, SVM, Random Forest, and GBM — were compared, applied to the vectorizers CountVectorizer and TF-IDF. The Random Forest model, combined with CountVectorizer, showed the best performance, achieving 86% of accuracy. This result highlights the feasibility of using classical machine learning methods for content moderation in Brazilian Portuguese. This study contributes to the construction and availability of a specialized dataset, promoting advances in the field of automated moderation and providing a useful resource for the development of models focused on the Portuguese language. Thus, the work reinforces the potential of machine learning to promote safer and more inclusive online environments.

Authors

Institutions

Publication Details

Journal
Procedia Computer Science
Published
2026-01-01
DOI
https://doi.org/10.1016/j.procs.2026.03.051
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

Machine Learning-Based Detection of Offensive Content in YouTube Comments

Kelly Cristina Alves, Fabiola S.F. Pereira
Procedia Computer Science
Hate Speech and Cyberbullying Detection
article

Machine Learning-Based Detection of Offensive Content in YouTube Comments

Kelly Cristina Alves, Fabiola S.F. Pereira
article en

Abstract

Offensive comments and hate speech have become a challenge for content moderation on virtual social networks, and research on automated moderation techniques for Brazilian Portuguese is still limited. In this context, this study aims to contribute to the development of an efficient system for detecting and classifying offensive comments in Brazilian Portuguese using natural language processing and machine learning techniques. The adopted approach explores a novel dataset composed of 4,139 comments in Brazilian Portuguese extracted from YouTube and manually labeled. The goal is to automatically detect and classify offensive comments. Four classical text classification algorithms — Naive Bayes, SVM, Random Forest, and GBM — were compared, applied to the vectorizers CountVectorizer and TF-IDF. The Random Forest model, combined with CountVectorizer, showed the best performance, achieving 86% of accuracy. This result highlights the feasibility of using classical machine learning methods for content moderation in Brazilian Portuguese. This study contributes to the construction and availability of a specialized dataset, promoting advances in the field of automated moderation and providing a useful resource for the development of models focused on the Portuguese language. Thus, the work reinforces the potential of machine learning to promote safer and more inclusive online environments.

Procedia Computer ScienceVol. 278
Universidade Federal de Uberlândia (BR)
Openalex Percentile: Top 11%
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.

Machine Learning-Based Detection of Offensive Content in YouTube Comments — Kelly Cristina Alves, Fabiola S.F. Pereira · Procedia Computer Science (2026) | TGRS Research Map | TGRS