This project implements a hate speech detection system specifically designed for Amharic language text.
# Amharic Hate Speech Detection
A machine learning project for detecting hate speech in Amharic text using Natural Language Processing (NLP) techniques. This classifier can identify three categories: **hate**, **normal**, and **offensive** speech.
## Author
**Nahom_WM**
## Table of Contents
- Overview
- Dataset
- Features
- Project Structure
- Installation
- Usage
- Model Performance
- Visualization
- Technologies Used
- License
## Overview
This project implements a hate speech detection system specifically designed for Amharic language text. The system uses Logistic Regression with TF-IDF (Term Frequency-Inverse Document Frequency) vectorization to classify Amharic messages into three categories:
- **Hate**: Messages containing hate speech
- **Normal**: Regular, non-offensive messages
- **Offensive**: Messages that are offensive but not necessarily hate speech
## Dataset
### Data Source
The dataset used in this project is sourced from **Hugging Face Datasets**:
- **Dataset Name**: `uhhlt/amharichatespeechranlp`
- **Source**: Hugging Face - Amharic Hate Speech RANLP
- **Description**: A curated dataset of Amharic text messages labeled for hate speech detection
- **Labels**: hate, normal, offensive
### Dataset Statistics
The dataset contains thousands of Amharic text messages with the following distribution:
- **Hate**: ~45% of messages
- **Normal**: ~37% of messages
- **Offensive**: ~18% of messages
### Data Preprocessing
The preprocessing pipeline includes:
1. **Normalization of Amharic characters**: Merging different forms of similar characters (e.g., ሐ, ሑ, ሒ → ሀ)
2. **Removal of @USER handles**: Anonymizing user mentions
3. **Punctuation removal**: Cleaning special characters
4. **Number removal**: Removing numeric characters
5. **Whitespace normalization**: Removing extra spaces
## Features
- ✅ **Automated data download** from Hugging Face
- ✅ **Text preprocessing** with Amharic character normalization
- ✅ **TF-IDF feature extraction** (5000 ma …