This project focuses on hate speech detection in the Tunisian Arabic dialect, a labeled datasets for NLP research. This repository demonstrates how various Recurrent Neural Network (RNN) architectures can be applied to this dataset to automatically classify hate speech.
# HateTune: Hate Speech Detection in Tunisian Dialect Using RNN-Based Deep Learning Models
## 📌 Overview
This repository presents a complete deep learning pipeline for **hate speech detection in the Tunisian Arabic dialect**, an under-resourced language variant with limited NLP tools and datasets.
To address this gap, **we collected, annotated, and published HateTune — the largest publicly available Tunisian dialect hate speech dataset to date — and published a peer-reviewed research paper based on it.**
Using this dataset, we implement and compare multiple **Recurrent Neural Network (RNN)** architectures for text classification, evaluating their ability to detect hate speech in social media content.
---
## 🧠 Key Features
✅ Largest Tunisian hate speech dataset (HateTune)
✅ Dataset and research paper published by the dataset authors
✅ End-to-end preprocessing and modeling pipeline
✅ Arabic-specific text cleaning using Unicode ranges
✅ Tokenization and padding with Keras
✅ Embedding layer construction
✅ Multiple RNN-based models implemented and compared:
- SimpleRNN (baseline)
- LSTM
- GRU
- Bidirectional LSTM (BiLSTM)
✅ Evaluation using Accuracy and AUC
✅ Final comparison and conclusion included
---
## 📊 Dataset: HateTune (Created and Published by Us)
**Name:** HateTune – Hate Speech Detection Dataset in Tunisian Dialect
**Authors:** *Our research team*
**Size:** Largest available dataset for this dialect
**Labels:** Hate speech vs. non-hate speech
**Format:** CSV
📎 **Dataset on Kaggle:**
kaggle.com
📎 **Research Paper (Springer):**
link.springer.com
---
## 🧪 Models Implemented
| Model | Purpose |
|---------------|----------------------------------|
| SimpleRNN | Baseline recurrent model |
| LSTM | Captures long-term dependencies |
| GRU | Efficient LSTM alternativ …