Journal of Computer Science and Informatics Engineering
Vol 5 No 4 (2026)

Religious Hate Speech Detection Using Naïve Bayes for Religious Moderation on Social Media X

Aidil Halim Lubis (Universitas Islam Negeri Sumatera Utara)
Ismail Ismail (Universitas Islam Negeri Sumatera Utara)
Dodyk Fahlome (Universitas Islam Negeri Sumatera Utara)
Dio Ananda (Universitas Islam Negeri Sumatera Utara)



Article Info

Publish Date
29 Nov 2026

Abstract

The escalation of religious hate speech on social media X threatens social cohesion and demands transparent automated text screening methods. This study evaluates the performance of the Multinomial Naïve Bayes algorithm combined with unigram-bigram Term Frequency-Inverse Document Frequency (TF-IDF) feature weighting for preliminary screening of religious discourse on X. A corpus of 604 Indonesian-language tweets was collected using targeted keywords between 2022 and 2026, filtered from 1,500 raw entries. Data were annotated into religious hate speech (29.30%) and moderate/neutral discourse (70.70%) through rule-based supervision combined with independent human validation (Cohen's Kappa = 0.84). Following text preprocessing, 3,000 discriminative features utilizing sublinear TF scaling were fitted exclusively on the training set to prevent data leakage. Evaluation using a 90:10 stratified split (seed 42) achieved an overall accuracy of 83.61% across 61 test samples. The hate speech class reached 83.33% precision, 55.56% recall, and a 66.67% F1-score, while the moderate class recorded 83.67% precision, 95.35% recall, and an 89.13% F1-score. Given the constrained single-platform corpus and moderate recall sensitivity, this model is positioned as an interpretable preliminary screening aid to support human verifiers in digital religious moderation.

Copyrights © 2026






Journal Info

Abbrev

cosie

Publisher

Subject

Computer Science & IT

Description

Artificial Intelligence Machine Learning Natural Language Processing Computer Vision Text Speech Text Mining Data mining Cryptography Data visualization Expert System Deep Learning Fuzzy Logic IoT and smart environments Neural Networks Pattern Recognition Image Processing Optimization Digital Signal ...