The growing popularity of video-based social media platforms such as YouTube has significantly increased user interaction through comment sections. However, this high level of activity has also led to the misuse of comment sections to promote online gambling through various writing patterns intended to disguise specific keywords. This study aims to detect online gambling promotional comments on YouTube using a text mining approach. The framework applied in this study consists of several stages, including text preprocessing, keyword-based feature engineering, TF-IDF feature extraction using character n-grams, data balancing through the Synthetic Minority Over-sampling Technique (SMOTE), and classification using the Logistic Regression algorithm. The dataset used in this study consists of 11,972 YouTube comments obtained from a YouTube video comment section and manually labeled into two classes: normal comments and online gambling promotional comments. The evaluation results show that the model achieved a precision of 1.000, recall of 0.912, F1-score of 0.954, and overall accuracy of 0.999 on the test data. These findings indicate that the combination of keyword-based features, character n-gram TF-IDF, SMOTE, and Logistic Regression can effectively detect online gambling promotional comments, particularly in minimizing the misclassification of normal comments as promotional gambling content.
Copyrights © 2026