Logo Lanfrica

Umutoniwasepie/Kinyarwanda_Hatespeech_Detection

Domain:

natural language processing

Record type:

softwaremodel
Creator:
Umu
Host:
# Kinyarwanda Hate Speech Detection App A machine learning-powered app that detects **hate**, **offensive**, or **normal** speech in **Kinyarwanda** social media text using logistic regression. Also includes a **Chrome extension** (Developer Mode) for real-time classification. --- ## πŸš€ Features - βœ… Detects `hate`, `sarcasm`, or `normal` content in Kinyarwanda - 🧠 Trained with Logistic Regression + TF-IDF - πŸ“Š Balanced dataset for fair classification - 🌐 Web interface for testing input text - 🧩 Chrome extension for live web integration --- ## πŸ“ Project Structure ``` project/ β”‚ β”œβ”€β”€ app.py #Flask app |── README.md |── Procfile β”œβ”€β”€ requirements.txt β”œβ”€β”€ . |── static/css | β”œβ”€β”€ dashboard.css | β”œβ”€β”€ index.css | β”œβ”€β”€ login.css | β”œβ”€β”€ register.css | β”œβ”€β”€ moderator_dashboard.css | β”œβ”€β”€ verify.css | β”œβ”€β”€ forgot_password.css | β”œβ”€β”€ reset_password.css β”œβ”€β”€ templates/ | β”œβ”€β”€ dashboard.html | β”œβ”€β”€ index.html | β”œβ”€β”€ login.html | β”œβ”€β”€ register.html | β”œβ”€β”€ moderator_dashboard.html | β”œβ”€β”€ verify.html | β”œβ”€β”€ forgot_password.html | β”œβ”€β”€ reset_password.html β”œβ”€β”€ model/ β”‚ β”œβ”€β”€ hate_speech_model.ipynb # Model Notebook | β”œβ”€β”€ kinyarwanda_hatespeech_noisy.csv | β”œβ”€β”€ final_dataset.tsv | β”œβ”€β”€ label_encoder.pkl | β”œβ”€β”€ model.pkl # Trained logistic regression model | β”œβ”€β”€ tfidf.pkl # TF-IDF vectorizer used during training β”œβ”€β”€ RHD_extension/ # Chrome extension source files β”‚ β”œβ”€β”€ manifest.json β”‚ β”œβ”€β”€ popup.html β”‚ β”œβ”€β”€ popup.js β”‚ β”œβ”€β”€ icon.png β”‚ └── content.js β”‚ β”œβ”€β”€ background.js β”œβ”€β”€ screenshots/ ``` --- ## πŸ› οΈ Installation (Web App) ### Step 1: Clone the Repository ```bash git clone github.com cd kinyarwanda_Hatespeech_Detection ``` ### Step 2: Create Virtual Environment ```bash python -m venv venv venv\Scripts\activate ``` ### Step 3: Install Dependencies ```bash pip install -r requirements.txt ``` ### Step 4 (Optional): Train the Model Open the notebook: ```bash jup …