Algerian Darija Script Detector

A fine-tuned xlm-roberta-base model that classifies text into three categories:

  • Darija (Latin script) — Algerian Arabic written with Latin letters (e.g. wach rak)
  • Darija (Arabic script) — Algerian Arabic written with Arabic letters (e.g. واش راك)
  • Not Darija — any other language (French, English, Modern Standard Arabic, etc.)

Built to handle the heavy code-switching and script-mixing common in Algerian social media, messaging, and speech transcripts.

Usage

from transformers import pipeline

classifier = pipeline("text-classification", model="Chaima-KHENAFIF/algerian-darija-script-detector")
classifier("wach rak mlih?")

Training

Fine-tuned on a custom-labeled dataset of Algerian Darija and non-Darija text across the three classes above.

Results

Metric Score
Accuracy 99.7%
F1 (macro) 99.7%
Precision (macro) 99.8%
Recall (macro) 99.6%

Links

  • Full code, training pipeline, and dataset sample: GitHub repo
Downloads last month
25
Safetensors
Model size
0.3B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Chaima-KHENAFIF/algerian-darija-script-detector

Finetuned
(4184)
this model