Skip to content

Identifies toxic comments in user-generated content using natural language processing techniques. Helps automate content moderation by flagging potentially harmful comments for review, improving community safety and reducing manual moderation workload. Enables proactive management of user interactions through accurate classification of sentiment.

Notifications You must be signed in to change notification settings

gorop51-2/Toxic-Comment-Detection-for-WikiShop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—£οΈ Toxic Comment Detection for WikiShop

πŸ“Œ Project Overview

Developed a machine learning model for WikiShop, an e-commerce platform launching a wiki-style product description editing feature. The solution identifies toxic comments in user-generated content to streamline moderation processes and maintain a positive community environment.

🎯 Objective

Create a text classification model that:

  • Accurately identifies toxic comments with F1 score β‰₯ 0.75
  • Enables efficient content moderation by prioritizing potentially harmful content
  • Handles significant class imbalance (only ~10% of comments are toxic)
  • Processes natural language effectively through advanced text preprocessing

πŸ“Š Dataset Description

Labeled dataset of 159,292 user comments:

  • text: User-generated comment content
  • toxic: Binary target feature (1 = toxic comment, 0 = non-toxic)

πŸ” Methodology

Text Processing Pipeline

  • Implemented comprehensive text cleaning (removing special characters, lowercasing)
  • Applied lemmatization to normalize word forms
  • Created effective text features using:
    • Unigrams (single word features)
    • TF-IDF vectorization for term importance weighting

Model Development

  • Addressed class imbalance through appropriate model selection and evaluation
  • Tested multiple classification algorithms with hyperparameter tuning
  • Implemented pipeline architecture for seamless text processing and classification
  • Validated model performance against constant baseline to ensure meaningful results

πŸ“ˆ Results

Model Performance:

  • Achieved F1 score of 0.773 (exceeding the 0.75 target)
  • Significantly outperformed baseline model (0.10 F1 score)
  • Successfully identified toxic content while minimizing false negatives

The solution enables WikiShop to automatically flag potentially harmful comments for human review, improving community safety while reducing moderator workload. The model's high performance ensures reliable detection of toxic content across diverse comment styles and linguistic patterns.

About

Identifies toxic comments in user-generated content using natural language processing techniques. Helps automate content moderation by flagging potentially harmful comments for review, improving community safety and reducing manual moderation workload. Enables proactive management of user interactions through accurate classification of sentiment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published