CoolFace
Modelpublic

Chaima-KHENAFIF/darija-latin-to-arabic-translator

sourceHugging Facemitupdated 1mo agoView on Hugging Face
1likes32downloads
Model Card

Darija Latin → Darija Arabic Translator

A fine-tuned mBART-50 model that translates Algerian Darija written in Latin script into Darija written in Arabic script — handling French/English loanwords, telecom-specific vocabulary, and multiple real-world spelling variations of the same word.

Usage

python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

tokenizer = AutoTokenizer.from_pretrained("Chaima-KHENAFIF/darija-latin-to-arabic-translator")
model = AutoModelForSeq2SeqLM.from_pretrained("Chaima-KHENAFIF/darija-latin-to-arabic-translator")

inputs = tokenizer("3andi offre tae 300DA w cnx lente", return_tensors="pt")
output = model.generate(**inputs, max_length=50)
print(tokenizer.decode(output[0], skip_special_tokens=True))

Training

Fine-tuned on a custom 10,000-sample Darija Latin → Darija Arabic parallel dataset, self-collected. Vocabulary extended with telecom-specific tokens (3G, 4G, 5G, GB, DA, Mbps, lte, adls).

Handles spelling variation: multiple real-world Latin transliterations of the same word (e.g. te3i / ta3i / te'i / taai) map to the same correct Arabic output.

Results

MetricScore
BLEU0.83

Links

  • —Full code, training pipeline, and dataset sample: GitHub repo