ML Engineer (Solo) · 2024
Open SourceComing soonHate Speech Classifier
A machine learning project detecting hate speech and offensive language using a Kenyan dataset, trained with scikit-learn and NLTK.
Coming soon
Hate Speech Classifier
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.