GTHome
All projects

ML Engineer (Solo) · 2024

Open SourceComing soon

Hate Speech Classifier

A machine learning project detecting hate speech and offensive language using a Kenyan dataset, trained with scikit-learn and NLTK.

Pythonscikit-learnNLTKPandasMatplotlib

Coming soon

Hate Speech Classifier

Pythonscikit-learnNLTK

Problem

Online platforms in Kenya need automated tools to detect hate speech and offensive language in local-language contexts, where most off-the-shelf models underperform.

Approach

Trained and evaluated text classification models on a Kenyan-focused hate speech dataset using scikit-learn, with NLTK for preprocessing and Pandas/Matplotlib for analysis.

Tech highlights

Python with scikit-learn for model training, NLTK for tokenization and cleaning, Pandas for dataset handling, and Matplotlib for visualizing class distributions and model performance.

Results

Full write-up with model performance metrics and a demo coming soon — check back or follow the GitHub repo for progress.

Challenges

Handling code-switched Swahili–English text and local slang that standard English tokenizers mangle, and correcting for a heavily imbalanced dataset where neutral and offensive examples vastly outnumbered genuine hate speech — which skewed naive accuracy and forced a focus on precision and recall.

Command palette

Search pages, projects, and quick actions