Post

KomDetek: Cyberbullying Detection in TikTok Comments

A Natural Language Processing (NLP) project built with Python to analyze sentiment and automatically detect cyberbullying behavior within TikTok comments.

KomDetek: Cyberbullying Detection in TikTok Comments

๐Ÿ“– Project Overview

KomDetek (Komentar Deteksi) is a Machine Learning and Natural Language Processing (NLP) project designed to tackle a growing issue in the digital age: online toxicity. Specifically focusing on the popular short-video platform TikTok, this project analyzes user comments to identify and classify cyberbullying and negative sentiment in the Indonesian language.

โ€œLeveraging Machine Learning to foster safer and more positive digital communities on social media.โ€

๐ŸŽฏ Mission

To build a robust sentiment analysis classification model capable of understanding Indonesian internet slang, effectively distinguishing between normal commentary and harmful cyberbullying.


โœจ Key Features & Methodology

๐Ÿง  Natural Language Processing (NLP)

  • ๐Ÿงน Text Preprocessing - Advanced cleaning of raw TikTok comments (removing emojis, special characters, URLs, and transforming text to lowercase).
  • ๐Ÿ“– Stopword Removal & Stemming - Utilizing NLP libraries to extract the root words and remove non-essential vocabulary.
  • ๐Ÿ”  Slang Normalization - Processing Indonesian internet slang into structured formats for better model understanding.

๐Ÿค– Machine Learning Pipeline

  • ๐Ÿ”ข Feature Extraction - Transforming text data into numerical vectors using techniques like TF-IDF (Term Frequency-Inverse Document Frequency) or Count Vectorizer.
  • ๐Ÿ“ˆ Model Training - Training classification models to accurately categorize comments into specific sentiment classes.
  • ๐Ÿ“Š Performance Evaluation - Assessing model reliability using metrics like Accuracy, Precision, Recall, and F1-Score, complete with visual confusion matrices.

๐Ÿ› ๏ธ Technology Stack

CategoryTechnologyPurpose
LanguagePython 3100% Core development language
EnvironmentGoogle ColabCloud-based Jupyter environment for ML
Data ManipulationPandas, NumPyData structuring and numerical computation
NLP ProcessingNLTK, SastrawiText processing for Bahasa Indonesia
Machine LearningScikit-LearnModel building, training, and evaluation
Data VisualizationMatplotlib, SeabornVisualizing distributions and metrics

๐Ÿ—๏ธ The Machine Learning Architecture

NLP Data Pipeline

1
2
3
4
5
6
7
8
9
๐Ÿ›ก๏ธ KomDetek Workflow
โ”œโ”€โ”€ ๐Ÿ“ฅ 1. Data Collection (Raw TikTok comments dataset)
โ”œโ”€โ”€ ๐Ÿงน 2. Text Preprocessing 
โ”‚   โ”œโ”€โ”€ Case Folding & Cleansing
โ”‚   โ”œโ”€โ”€ Tokenization
โ”‚   โ””โ”€โ”€ Stopword Removal & Stemming
โ”œโ”€โ”€ ๐Ÿงฎ 3. Feature Extraction (Text to Vector)
โ”œโ”€โ”€ ๐Ÿค– 4. Model Training (Classification Algorithms)
โ””โ”€โ”€ ๐Ÿ“ˆ 5. Evaluation (Confusion Matrix & Accuracy Scores)

๐Ÿš€ How to Run the Project

Since this project is fully developed in Google Colaboratory, you can easily run and interact with the code without installing anything locally!

  1. Open the Notebook: Click the Open in Colab button at the top of this page.
  2. Copy to Drive: Go to File > Save a copy in Drive so you can make your own edits.
  3. Run the Cells: Click Runtime > Run all to execute the data pipeline from preprocessing to model evaluation.

(Alternatively, you can clone the GitHub Repository and run the .ipynb file locally using Jupyter Notebook).


๐ŸŒŸ Future Development Plans

PhaseFeatureTimelineStatus
Phase 1๐Ÿ“Š Data Collection & Preprocessing PipelineCompletedโœ… Finished
Phase 2๐Ÿค– Machine Learning Model TrainingCompletedโœ… Finished
Phase 3๐Ÿ•ธ๏ธ Web Interface / Dashboard DeploymentPlanned๐Ÿ“‹ Planned
Phase 4๐Ÿง  Deep Learning Integration (LSTM / BERT)Planned๐Ÿ’ญ Concept

๐Ÿ“Š Project Highlights

Status Python NLP

Key Achievements

  • โœ… Cloud-Native Development - Successfully utilized Google Colab for seamless model training and experimentation.
  • โœ… High-Quality Preprocessing - Handled the complex, unstructured nature of social media text (TikTok comments) using robust normalization techniques.
  • โœ… Accurate Classification - Built a model capable of distinguishing toxic behavior with high reliability.

๐Ÿ’ก Conclusion

KomDetek proves that Machine Learning can be a powerful ally in the fight against online toxicity. By accurately detecting cyberbullying in TikTok comments, this project demonstrates a complete end-to-end Natural Language Processing pipeline.

By leveraging cloud environments like Google Colab, the barrier to reproducing this research is eliminated, allowing anyone to explore the modelโ€™s logic step-by-step. This project lays the groundwork for automated moderation tools that can help creators and platforms maintain a healthy, positive environment for their users.


Developed with โค๏ธ by aipunpratama

Colab    GitHub

๐Ÿ›ก๏ธ Supporting safer internet spaces. Give the repository a star if you support this cause! โญ
This post is licensed under CC BY 4.0 by the author.