Detecting Online Gambling Promotion on Social Media with Random Forest

Authors

  • Vivi Aida Fitria Institut Teknologi dan Bisnis Asia Malang image/svg+xml Author
  • Danny Akhmad Zulfikar Author

DOI:

https://doi.org/10.32664/icobits.v1.50

Keywords:

Comment detection;, online gambling;, social media;, text mining;, Random Forest;, TF-IDF;, twscrape;

Abstract

The main problem in today’s digital era is the increasing spread of comments containing online gambling promotions on social media. This activity not only disrupts other users but also has the potential to normalize gambling behavior in the digital public sphere. Therefore, it is necessary to develop an intelligent system capable of automatically detecting and filtering comments that contain online gambling promotions accurately and efficiently. This study aims to develop a detection model for online gambling promotion comments on social media using a text mining approach with the Random Forest algorithm. The dataset was collected using the twscrape library without the official API, resulting in 10,607 comments, consisting of 5,139 non-gambling and 5,468 gambling-related comments, making the dataset relatively balanced. The preprocessing steps included text cleaning, case folding, tokenizing, stopword removal, and stemming in the Indonesian language. The TF-IDF method was used for feature extraction, and the Random Forest algorithm was applied to classify comments into two categories: gambling promotion and non-gambling. The experimental results show that the Random Forest model achieved an accuracy of 92%, with consistently high precision, recall, and F1-score across all classes. These findings indicate that the text mining approach using Random Forest is effective in detecting online gambling promotion content. The developed model can serve as a foundation for automated detection systems that support efforts to prevent the spread of gambling-related activities on social media platforms.

Downloads

Download data is not yet available.

Downloads

Published

19-01-2026