Machine Learning Based Cyberbullying Detection on Facebook Comment
Abstract
Cyberbullying has become an important social and technological problem as
communication increasingly moves to social networking platforms. Harmful comments can
be posted rapidly, distributed to large audiences, and remain visible for long periods.
Manual moderation is difficult to scale, especially when comments contain informal
expressions. This thesis therefore focuses on the design and development of a multilingual,
near-real-time Facebook comment moderation system. The proposed system receives
comments through a Facebook webhook or periodic polling, normalizes Bengali, Banglish,
and English text without an English-only stemming pipeline, applies a binary machine
learning classifier, and supports policy-based actions such as displaying an alert, placing a
comment in a human-review queue, or requesting deletion when authorization and
moderation policy permit. Its aim is to reduce the time during which harmful comments
remain visible while preserving human oversight for uncertain and high-impact decisions.
The another research objective is to compare Logistic Regression and Linear SVC and
select the more suitable detector for this application. The active dataset contains 22,975
labeled comments: 11,616 Cyberbullying and 11,359 Safe. Word one-to-two-gram and
character three-to-five-gram TF-IDF features are combined in a FeatureUnion. On a
stratified 80/20 split, the selected Logistic Regression model achieved 90.84% accuracy,
90.84% macro F1, and 90.98% Cyberbullying F1, with 2,051 true negatives, 221 false
positives, 200 false negatives, and 2,123 true positives. It slightly exceeded the combined
Linear SVC in accuracy, recall, F1, and macro F1 and provides native probabilities for an
adjustable moderation threshold. And we get 84% Accuracy in Real world evaluation.
Logistic Regression is consequently treated as one of the best-performing and most suitable
algorithms in this experiment, not as universally superior.
This study demonstrates that a relatively lightweight TF-IDF and Logistic Regression
pipeline can provide effective cyberbullying screening while remaining computationally
practical for web deployment.
Collections
- 2026-2030 [51]