Download README.md from mohammedaly22/ArabicDeXlit-Corpus: direct link, hf CLI and curl.
- Browser
- Download file 12.5 kB
-
https://huggingface.co/datasets/mohammedaly22/ArabicDeXlit-Corpus/resolve/main/README.md
- Command line
-
hf download hf://datasets/mohammedaly22/ArabicDeXlit-Corpus/README.md
-
curl -L -o README.md https://huggingface.co/datasets/mohammedaly22/ArabicDeXlit-Corpus/resolve/main/README.md
license: cc-by-sa-4.0
task_categories:
- token-classification
- translation
language:
- ar
- en
tags:
- code-switching
- arabic
- transliteration
- arabizi
- asr
- asr-post-processing
- dialectal-arabic
- speech-recognition
size_categories:
- 100K<n<1M
configs:
- config_name: default
data_files:
- split: train
path: train.parquet
- split: validation
path: validation.parquet
- split: test
path: test.parquet
ArabicDeXlit-Corpus
Training data for undoing transliteration in Arabic ASR output.
Arabic speech recognition systems handle code-switching badly. When a speaker says an English
word, the model writes it out in Arabic letters — intern becomes انترن, AI becomes ايه اي.
The transcript is phonetically sensible and practically unusable: you cannot search it, index it,
or hand it to an English NLP tool.
This corpus trains a model to repair that, without touching text that is genuinely Arabic.
Input (src) |
كنت انترن في او اي اي و بعدها جالي اوفر |
Output (tgt) |
كنت intern في OIE و بعدها جالي offer |
| Pure Arabic in | أنا رايح البيت دلوقتي |
| Pure Arabic out | أنا رايح البيت دلوقتي — unchanged |
- 500,346 examples across 9 dialect labels
- 29% pass-through rows where the correct answer is change nothing
- 1,417,309 labelled spans, tagged by category
- Zero train/test leakage, zero token/tag misalignment (both verified — see Quality guarantees)
Quick start
from datasets import load_dataset
ds = load_dataset("mohammedaly22/ArabicDeXlit-Corpus")
print(ds)
print(ds["train"][0])
Only the sentences that must be left untouched:
passthrough = ds["train"].filter(lambda r: r["is_passthrough"])
Only a given dialect:
levantine = ds["train"].filter(lambda r: r["dialect"] == "lev")
Row format
{
"src": "أنا عندي ميتينج مهم",
"tgt": "أنا عندي meeting مهم",
"src_tokens": ["أنا", "عندي", "ميتينج", "مهم"],
"tags": ["O", "O", "B-CS", "O"],
"spans": [{"start": 2, "end": 3, "category": "CS", "target": "meeting"}],
"dialect": "egy",
"source": "sdaia",
"is_passthrough": false,
"num_spans": 1
}
| Field | Type | Meaning |
|---|---|---|
src |
string |
The noisy ASR-style input — English rendered in Arabic letters. |
tgt |
string |
The corrected output. |
src_tokens |
list[string] |
src split on whitespace. |
tags |
list[string] |
One tag per token of src. BIO scheme; O = copy verbatim. |
spans |
list[struct] |
start, end (exclusive), category, target — token offsets into src_tokens. |
dialect |
string |
Dialect code (see below). |
source |
string |
sdaia, gemini, monolingual, or sdaia-mono. |
is_passthrough |
bool |
True when every tag is O, i.e. src == tgt. |
num_spans |
int32 |
Convenience count of spans. |
The tag scheme
O plus B-/I- for each of five categories, 11 tags in total.
O is the identity tag: a token tagged O is copied to the output byte for byte. A sentence
whose tags are all O is therefore returned completely unchanged. This is what makes the task
learnable as tagging rather than generation, and it is the property that lets a model built on this
data be safe to drop into a live pipeline.
Span categories
The category is part of the label because the same characters convert differently depending on it —
ايه اي is AI as an acronym, but would be eh ay as an ordinary word.
| Category | Count | Input | Output |
|---|---|---|---|
CS |
1,395,234 | انترن |
intern |
ACRONYM |
12,393 | ايه اي |
AI |
EMAIL |
4,370 | احمد ات جيميل دوت كوم |
ahmed@gmail.com |
ENTITY |
5,312 | اورانج انوفيشن ايجيبت |
Orange Innovation Egypt |
NUMBER |
0 | تو زيرو تو فور |
2024 |
Splits
| Split | Rows | Pass-through | Spans |
|---|---|---|---|
train |
450,338 | 130,321 (28.9%) | 1,275,872 |
validation |
24,865 | 7,160 (28.8%) | 70,182 |
test |
25,143 | 7,229 (28.8%) | 71,255 |
Splits are assigned by hashing a normalised sentence key rather than shuffling, so a rebuild reproduces exactly the same test set — important if this corpus is to serve as a shared benchmark.
Dialect coverage
| Code | Dialect | Rows |
|---|---|---|
unk |
Mixed / unlabelled (monolingual pass-through) | 142,599 |
msa |
Modern Standard Arabic | 114,741 |
egy |
Egyptian | 111,938 |
glf |
Gulf (Saudi/Emirati/Kuwaiti) | 109,522 |
lev |
Levantine (Syrian/Lebanese/Jordanian/Palestinian) | 7,823 |
mgr |
Maghrebi (Moroccan/Algerian/Tunisian) | 3,935 |
yem |
Yemeni | 3,566 |
irq |
Iraqi | 3,521 |
sdn |
Sudanese | 2,701 |
unk is monolingual Arabic contributing pass-through examples; it is dialectally mixed and is
labelled honestly rather than guessed at.
How the data was built
The core idea: invert the corpus
Parallel data for this task barely exists. But corpora of the target form — Arabic with English correctly in Latin script — are plentiful. So the pipeline runs the problem backwards: given a target sentence, it transliterates the English into Arabic letters to manufacture the noisy ASR input.
target (have it) كنت intern في Orange
↓ transliterate the English into Arabic script
source (make it) كنت انترن في اورانج
↓ record where each rewrite landed
tags O B-CS O B-CS
This matters for correctness, not just convenience. Because spans are recorded during generation rather than recovered afterwards by alignment, the labels cannot silently drift out of sync with the text — the failure mode that quietly poisons hand-aligned corpora.
The transliterator is deliberately stochastic
Real ASR is inconsistent. The same English word comes out differently depending on speaker, accent and acoustics. So each call samples among plausible renderings:
| English | Sampled Arabic forms |
|---|---|
intern |
انترن · انتيرن · انترين |
meeting |
ميتينج · ميتنج · ميتينغ |
project |
بروجكت · برجكت · بروجيكت |
A model trained across several epochs therefore meets the variation it will actually face in production, instead of one canonical spelling it could memorise.
The generator also models how things are spoken: acronyms letter by letter (AI → ايه اي),
emails symbol by symbol (@ → ات, . → دوت), and digits as words (2024 → تو زيرو تو فور).
Sources
| Source | Contribution | License |
|---|---|---|
| SDAIA ArE-CSTD | 310,578 rows — MSA, Saudi, Egyptian | CC-BY-SA-4.0 |
| Gemini synthesis | 22,584 rows — the missing dialects and rare categories | generated for this corpus |
| Arabic Wikipedia + dialectal ASR transcripts | 144,710 rows — pass-through examples | CC-BY-SA |
Why synthesis was necessary. SDAIA covers three dialects and is almost entirely plain word-level code-switching. Measured on 20K of its sentences: ~60,000 ordinary code-switch spans but only 178 acronyms, 9 entities, and zero emails or numbers. Generation was therefore aimed narrowly at those gaps — the five uncovered dialects, and the acronym / email / number / entity categories — rather than at bulk volume that SDAIA already supplies.
Why external monolingual text was necessary. SDAIA is ~99% code-switched by construction, so it cannot supply the pass-through half of the task. Those rows come from Arabic Wikipedia and dialectal ASR transcripts instead.
Crucially, they are screened: a "monolingual" sentence containing already-transliterated
English (الميتينغ, الويكند, الشوبينج) is rejected, because using it as a pass-through example
would teach a model to leave transliteration alone — the exact opposite of the task. The screen is
generated by running the project's own transliterator over a list of common loanwords, so it covers
spelling variants without anyone hand-enumerating them.
Quality guarantees
Each of these was verified on the released build, not assumed:
| Check | Result |
|---|---|
| Family-key overlap, train ∩ test | 0 |
| Family-key overlap, train ∩ validation | 0 |
| Family-key overlap, validation ∩ test | 0 |
Rows where len(tags) != len(src_tokens) |
0 |
| Tags outside the 11-tag schema | 0 |
Pass-through rows where src != tgt |
0 |
On leakage specifically. SDAIA is LLM-generated and contains large families of near-identical
sentences (اليوم عندي meeting مع ال team في المكتب and dozens of small variants). A random split
scatters such a family across train and test and inflates every reported score. Here, splitting is
done on a normalised key — diacritics stripped, alef/ya/ta-marbuta variants folded, digits
collapsed — so an entire family lands in one split.
One subtle case is handled explicitly: SDAIA writes English mall as مال, which is also an
ordinary Arabic word, so two different targets can collapse to the same input string. Identical
inputs are pinned to a single split rather than being allowed to follow their differing targets.
Intended uses
- ASR post-processing — the motivating use: repair code-switched transcripts in place.
- Token classification — detecting transliterated spans (
src_tokens+tags). - Character-level transliteration — Arabic script → Latin, using the
spansfield alone. - Evaluating pass-through safety —
is_passthroughisolates the rows a model must not alter.
Limitations, stated plainly
srcis synthetic. Inputs are generated from a phonetic model of Arabic ASR errors, not transcribed from real ASR output. The generator was tuned against real examples and reproduces their characteristic forms, but a held-out set of genuine ASR transcripts is the right way to confirm any result from this corpus.- Dialect balance is uneven. MSA, Egyptian and Gulf dominate, because that is what the free corpora cover; the five synthesised dialects are present in the low thousands each.
ENTITYandNUMBERare thin relative toCS. If your application leans on them, generate more with the repository's synthesis script.- Some rows come from an LLM (SDAIA is GPT-4-generated; the dialect top-up is Gemini-generated) and carry the register and topic biases that implies.
License
CC-BY-SA-4.0, inherited from SDAIA ArE-CSTD's share-alike term. Derivatives must carry the same licence.
Casablanca is deliberately excluded. It is an excellent multi-dialect corpus that annotates code-switched words in both scripts, but it is licensed CC-BY-NC-ND — the no-derivatives term forbids republishing transliterated derivatives of it. It remains suitable as a held-out evaluation set, cited rather than redistributed.
Citation
@misc{arabicdexlit2026,
title = {ArabicDeXlit: Undoing Transliteration in Arabic ASR Code-Switching},
author = {Mohammed Aly},
year = {2026},
url = {https://github.com/MohammedAly22/Arabic-DeXlit}
}
Please also cite the underlying corpus:
@inproceedings{ArECSTD2024,
title = {Leveraging LLM for Augmenting Textual Data in Code-Switching ASR: Arabic as an Example},
author = {Alharbi, Sadeen and Aloraini, Raghad and BinMuqbil, Reem and Ali, Ahmed and
Bari, Saiful and Alowisheq, Areeb and Alonaizan, Yaser},
year = {2024},
publisher = {NCAI-SDAIA}
}
Links
- Code & training — https://github.com/MohammedAly22/Arabic-DeXlit
- Model —
mohammedaly22/ArabicDeXlit-base