A Machine Learning Approach for Pornographic Website Content Detection Using an Optimised Naïve Bayes Classifier - Rahmalia Syahputri; Taufik Taufik; Aldwi Mandak; Prana Alfath Rais (International Journal of Artificial Intelligence Research, 2026)
The rapid growth of internet usage has increased concerns about exposure to pornographic content, particularly among younger users. This study proposed and developed a machine learning approach for classifying Indonesian-language website content containing pornographic material using the Naïve Bayes (NB) algorithm. A dataset comprising 50,329 website entries collected between 2019 and 2026 was processed through several preprocessing steps, including text normalisation, tokenisation, case folding, stemming, and stopword removal, to enhance the quality of textual features. To address class imbalance between pornographic and non-pornographic categories, the Synthetic Minority Oversampling Technique (SMOTE) was applied during the training phase. Model performance was evaluated using a 5-fold cross-validation strategy and was compared across three Naïve Bayes variants: Multinomial Naïve Bayes (MNB), Bernoulli Naïve Bayes (BNB), and Gaussian Naïve Bayes (GNB). Experimental results showed that the Multinomial Naïve Bayes model achieved the best performance, with an accuracy of approximately 94%, a precision of 0.92, a recall of 0.94, and an F1-score of 0.93, along with an ROC-AUC of 0.986. These findings demonstrated that the proposed approach was effective in classifying pornographic website content and could support automated web content filtering systems to protect users from harmful material. Future work could explore real-time implementation and the integration of more advanced machine learning techniques to further improve classification performance.