You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

PersoArabicLID

Language identification data for 19 languages written in Perso-Arabic scripts, including Saraiki (skr), Urdu, Western Punjabi, Sindhi, Pashto and several Kurdish varieties. The main use is telling closely related languages that share one script apart (for example Saraiki vs Urdu vs Punjabi).

This is a re-packaged copy of the PALI dataset by Ahmadi, Agarwal and Anastasopoulos. Original repository: https://github.com/sinaahmadi/PersoArabicLID. All credit for the data belongs to the original authors; please cite their paper (below).

Loading

from datasets import load_dataset

ds = load_dataset("themohal/persoarabic-lid", "merged")     # upstream's recommended training mix
print(ds["train"][0])

Configs and splits

config upstream folder contents
clean datasets/0 clean text, no synthetic noise
noisy_20 ... noisy_100 datasets/20 ... datasets/100 text with 20% to 100% synthetic character noise
noisy_all datasets/all the five noisy levels merged
merged datasets/merged clean + noisy data, extra clean rows added for Urdu, Persian, Arabic and Uyghur
config split rows
clean train 118,973
clean validation 12,518
noisy_20 train 100,200
noisy_40 train 100,200
noisy_60 train 100,200
noisy_80 train 100,200
noisy_100 train 100,200
noisy_all train 103,201
merged train 267,399

Schema

field type description
text string one sentence or short text
label ClassLabel (19 classes) language code used by the upstream repository
language string English language name
iso639_3 string ISO 639-3 code of the language

Labels

label language iso639_3 clean/train rows clean/validation rows
ar Arabic arb 7,200 800
azb Azeri Turkish (South Azerbaijani) azb 7,199 801
bal Balochi bal 1,797 114
brh Brahui brh 180 5
ckb Central Kurdish (Sorani) ckb 7,200 800
fa Persian fas 7,200 800
glk Gilaki glk 7,198 802
hac Gorani (Hawrami) hac 7,193 674
kas Kashmiri kas 7,211 434
ku Northern Kurdish (Kurmanji) kmr 7,198 800
mzn Mazanderani mzn 7,199 801
pa Western Punjabi pnb 7,200 800
ps Pashto pus 7,200 800
sd Sindhi snd 7,200 800
sdh Southern Kurdish sdh 7,200 800
skr Saraiki skr 7,200 800
trw Torwali trw 1,798 87
ud Urdu urd 7,200 800
ug Uyghur uig 7,200 800

Notes on the label codes, which are inherited from upstream and are not all standard:

  • ud is Urdu (ISO 639-1 would be ur), pa is Western Punjabi (pnb), ku is Northern Kurdish (Kurmanji) in Arabic script.
  • The upstream README lists both sd and sdh as Sindhi. sdh corresponds to the Southern Kurdish corpus (SouthernKurdish_sdh.txt upstream); Sindhi is sd.
  • Use the iso639_3 column when you need an unambiguous code.

Things to know before using it

  • No official test split. The upstream repository describes test sets but ships only train.txt files. In clean, a validation split was carved out by this repackaging (10% of the unique sentences per language, seed 42, with all copies removed from train). It is not the paper's test set, so scores are not directly comparable with the paper.
  • Noisy configs cover 15 languages. Arabic (ar), Persian (fa), Urdu (ud) and Uyghur (ug) have no synthetic noise upstream, so they appear only in clean and merged.
  • Small validation sets for low-resource languages. Brahui, Torwali and Balochi have very little text, so their validation counts are tiny (see the table above); do not read much into per-language scores there.
  • Noisy configs have no eval split. The same sentence appears at several noise levels in noisy_all and merged, so a random split would leak. Evaluate on clean/validation or on your own data.
  • Upsampling. Languages with little text (for example Brahui, Torwali, Balochi) are upsampled upstream, so train contains repeated rows.
  • Synthetic noise. The noisy configs are generated with character-mapping scripts to imitate orthographic variation between related languages. They are not natural text.
  • Domain. The sentences come from corpora such as Wikipedia dumps, which are clean and formal. Expect lower accuracy on informal, social-media or code-mixed text.
  • Licensing. The upstream repository is MIT licensed. Some corpora are derived from Wikipedia dumps (the upstream file names carry dump dates), whose text is CC BY-SA; check the paper and upstream corpora before any commercial reuse.

Citation

@inproceedings{ahmadi2023pali,
    title = "{PALI}: A Language Identification Benchmark for {Perso-Arabic} Scripts",
    author = "Ahmadi, Sina and Agarwal, Milind and Anastasopoulos, Antonios",
    booktitle = "Proceedings of the 10th Workshop on NLP for Similar Languages, Varieties and Dialects (VarDial)",
    month = may,
    year = "2023",
    address = "Dubrovnik, Croatia",
    publisher = "The 17th Conference of the European Chapter of the Association for Computational Linguistics"
}
Downloads last month
157