real time hate speech detection in youtube comments using bert
Year: 2025
Type: article
Abstract: Title: Real-Time Hate Speech Detection in YouTube Comments using BERT Description:This research presents a transformer-based approach for detecting hate speech in YouTube comments, leveraging the pre-trained unitary/toxic-bert model. The system is deployed within a lightweight Flask web application for real-time analysis and visualization. User-generated text from YouTube comments is noisy and unstructured, so preprocessing techniques—including removal of non-alphabetic characters, links, and emojis, as well as text normalization and truncation—were applied. The model classifies comments as either hate speech or non-hate speech with a confidence threshold of 0.7, balancing sensitivity and precision. Experiments were conducted using YouTube comments alongside benchmark datasets such as the Kaggle Toxic Comment Classification Challenge. Performance was evaluated using accuracy, precision, recall, and F1-score. Results indicate that transformer-based models, when deployed in lightweight frameworks, can effectively support automated moderation in real-world social media environments. The web application includes visualization and export functionalities, allowing moderators and researchers to manage toxic content more efficiently. This work demonstrates the practical integration of advanced NLP techniques for social media content moderation, with potential applications in real-time online safety and community management. Keywords: Hate Speech Detection, BERT, Natural Language Processing, Flask, Real-Time Analysis, YouTube Comments Additional Resources: The implementation code is available at the GitHub repository linked in the supplementary materials.
Author: Faruki, jamal ahmad
Language: English
Subfield: Artificial Intelligence
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7082256878
FWCI:
Cites:
Cited by:
Related to:
