Downloads · 30 days
16
16% of all-time downloads
Chaima-KHENAFIF/darija-latin-to-arabic-translator
darija-latin-to-arabic-translator is a translation model from Chaima-KHENAFIF. Use it when you need text moved from one language to another. The card lists the license as mit.
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 spelli…
Downloads · 30 days
16
16% of all-time downloads
All-time downloads
102
Public
Parameters
611M
10.9 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors2.4 GB · 99%
From the Hugging Face model README
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.
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))
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.
| Metric | Score |
|---|---|
| BLEU | 0.83 |