Logo Lanfrica

amgharhind/Hate-Speech-Detection-in-Darija

Domaine:

natural language processing

Type de record:

model
Créateur:
amg
Hôte:
# Hate Speech Detection in Moroccan Darija using MARBERT ## Overview This project addresses the critical challenge of detecting hate speech in the Moroccan Arabic dialect (Darija) by fine-tuning the **MARBERT** model. The goal is to contribute to safer online environments by accurately identifying toxic language specific to Darija. This README provides a comprehensive overview of the project, from the initial motivation and dataset to the model's performance and limitations. ## The "Why": Motivation and Importance The proliferation of social media has led to a significant increase in online hate speech. While many models exist for detecting hate speech in major languages, low-resource dialects like Darija are often overlooked. Darija, with its unique blend of Arabic, Berber, French, and Spanish, presents a significant challenge for generic language models. This project aims to bridge that gap by developing a model specifically tailored to the nuances of Darija, thereby making online platforms safer and more inclusive for Moroccan users. ## Dataset: OMCD (Offensive Moroccan Comments Dataset) The dataset used in this project is the **OMCD (Offensive Moroccan Comments Dataset)**, a collection of comments in Darija, labeled as either hate speech (1) or not hate speech (0). This dataset was specifically curated for Darija hate speech detection and was sourced from a Kaggle dataset [1]. **Dataset Statistics:** | Dataset Split | Number of Comments | | :--- | :--- | | Training Set | 6,419 | | Testing Set | 1,605 | | **Total** | **8,024** | **Class Distribution:** | Class | Number of Comments | | :--- | :--- | | Hate Speech (1) | 4,304 | | Not Hate Speech (0) | 3,720 | This distribution indicates a slight imbalance, with a higher number of hate speech examples. This imbalance is handled during model training to prevent bias towards the majority class. ## Project Pipeline The project follows a systematic pipeline to ensure the development of a robust and accurate …