---
title: "Arabic dialect identification using machine learning and"
description: "The paper describes a submission to Subtask 1 of the third NADI shared task (NADI… 68.7% accuracy. 14 references, cited by 3 papers here."
authors: ["Nouf AlShenaifi", "Aqil Azmi"]
year: 2022
venue: "Proceedings of the Seventh Arabic Natural Language Processing Workshop (WANLP)"
source: "https://aclanthology.org/2022.wanlp-1.50/"
doi: "10.18653/v1/2022.wanlp-1.50"
licence: "CC BY 4.0 (ACL Anthology)"
licence_url: "https://creativecommons.org/licenses/by/4.0/"
summary_licence: "Elamur Cosmic License"
canonical: "https://research.elamur.ai/free/en/papers/alshenaifi-2022-arabic-dialect-identification-machine-learning/"
---
[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/alshenaifi-2022-arabic-dialect-identification-machine-learning/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2022](https://md.research.elamur.ai/free/en/papers/2022/page/5/) / Arabic dialect identification using machine learning and transformer-based models: Submission to the NADI 2022 Shared Task

# Arabic dialect identification using machine learning and transformer-based models: Submission to the NADI 2022 Shared Task

**Authors:** [Nouf AlShenaifi](https://md.research.elamur.ai/free/en/authors/nouf-alshenaifi/) and [Aqil Azmi](https://md.research.elamur.ai/free/en/authors/aqil-azmi/) · **Year:** 2022 · **Venue:** [Proceedings of the Seventh Arabic Natural Language Processing Workshop (WANLP)](https://md.research.elamur.ai/free/en/venues/wanlp/) ([WANLP 2022](https://md.research.elamur.ai/free/en/venues/wanlp/2022/)) · **Publisher:** [Association for Computational Linguistics](https://md.research.elamur.ai/free/en/publishers/association-for-computational-linguistics/) · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

**Links:** [Publisher's page](https://aclanthology.org/2022.wanlp-1.50/) · [PDF](https://aclanthology.org/2022.wanlp-1.50.pdf) · [DOI 10.18653/v1/2022.wanlp-1.50](https://doi.org/10.18653/v1/2022.wanlp-1.50) · [OpenAlex](https://openalex.org/W4385573054)

**Citations:** 12 citations (OpenAlex, 2026-10-14) · [3](https://md.research.elamur.ai/free/en/papers/alshenaifi-2022-arabic-dialect-identification-machine-learning/cited-by/) in our library, of the 149,439 papers whose bibliographies we read

## Summary
The paper describes a submission to Subtask 1 of the third NADI shared task (NADI 2022), which asks systems to assign each tweet to one of the Arab countries whose dialect it represents. Dialectal Arabic has no standard spelling and no dictionaries, which makes this classification difficult. The authors used the NADI training data: about 20K labelled tweets covering 18 country dialects, heavily skewed toward Egypt. They cleaned the text and compared two families of models. The first is classical machine learning on TF-IDF word and character n-grams: Logistic Regression, SVM, and a soft-voting ensemble. The second is deep learning: a BiLSTM over pretrained or self-trained word embeddings, and a fine-tuned AraBERT. They report that the deep models clearly beat the classical ones. The BiLSTM gave the best development-set result, with 68.7% accuracy and a macro-F1 of 50.5%. The work is a practical baseline comparison for fine-grained dialect classification on short, noisy, imbalanced social-media text.

## Key points
- **Data.** The NADI 2022 Subtask 1 data has 20K training tweets and 4,871 development tweets across 18 country-level dialects.
  - Egypt dominates with 4,283 tweets, while Bahrain, Qatar and Sudan have only 215 each.
  - There are two test sets: TEST-A covers 18 dialects, and TEST-B covers an undisclosed number k.
  - Organizers also supplied about 10M unlabelled tweets.
- **Preprocessing.** The authors removed punctuation, emojis, Arabic stop words, diacritics and runs of repeated characters.
  - Stemming was tested and lowered results.
  - SMOTE oversampling was applied against class imbalance.
- **Classical models.**
  - Logistic Regression (one-vs-rest) used word 1–3 plus char 1–4 TF-IDF n-grams.
  - The ensemble used soft voting to combine three classifiers, namely a linear model trained with stochastic gradient descent (SGD) and both the multinomial and Bernoulli variants of Naive Bayes, with char 2–5 and word 1–4 grams as features.
- **Deep models.**
  - The BiLSTM (128 units, input length 300, dropout 0.1, 10 epochs) used AraVec embeddings. The authors also trained their own embeddings on 300K of the unlabelled NADI tweets.
  - AraBERT was fine-tuned with the Hugging Face Trainer: learning rate 1e-5, max length 128, batch size 40, 6 epochs.
- **Evaluation.** Macro-averaged F1 is the official metric.
  - The best dev scores came from the BiLSTM (F1 50.5%, accuracy 68.7%).
  - The top three systems were the ensemble, the BiLSTM and AraBERT.

## Interesting ideas
- Stemming hurt dialect identification because the inflected surface form itself carries the regional signal, so normalizing it away erases evidence.
- Mixing character n-grams with word n-grams gives robustness to unseen, irregularly spelled words, because subword pieces still match when whole words do not.
- Collapsing elongated runs of repeated characters is a cheap normalization that merges many noisy variants of one word into a single form.
- The authors trained domain-specific embeddings on a modest slice (300K) of a large unlabelled in-domain pool, rather than relying only on generic pretrained vectors.
- Using macro-F1 under strong class imbalance stops the majority class from masking failure on rare classes.

## For Mova

How these ideas could serve Mova, our small open language model — its files, stages and tests:

- **I1** (tokens): Keep raw surface forms next to lemmas in crate en, so later stages can still detect regional or register variants (e.g., British vs. American spellings) that the lemma would hide.
- **I2** (tokens): Character n-gram features could back off the tagger's handling of out-of-vocabulary or misspelled tokens in informal English input.
- **I3** (tokens): A similar rule in the tokenizer (e.g., "sooooo" → "so", with the original kept as an attribute) would reduce sparse tokens before tagging and parsing.
- **I4** (learn): Training small auxiliary representations on in-domain raw text, such as fables or school texts, could help when the general-purpose resources fit those domains poorly.
- **I5** (learn): Report macro-averaged scores over dependency relations or frame types in evaluation, so rare labels like uncommon UD relations are not hidden by frequent ones.

*Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.*

## Institutions

- [King Saud University](https://md.research.elamur.ai/free/en/universities/king-saud-university/) — University, Riyadh, Saudi Arabia · 37 works · 527 citations

📚 Shelves (4): [🖥️ Computer Science](https://md.research.elamur.ai/free/en/shelves/computer-science/) · 16,667 works · [🤖 Artificial Intelligence](https://md.research.elamur.ai/free/en/shelves/computer-science/artificial-intelligence/) · 16,194 works · [🎭 Arts and Humanities](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/) · 16,039 works · [🗣️ Language and Linguistics](https://md.research.elamur.ai/free/en/shelves/arts-and-humanities/language-and-linguistics/) · 15,891 works

🧭 Topics (1): [Semitic languages](https://md.research.elamur.ai/free/en/topics/semitic-languages/) · 2,908 works

## Cite

Cite as: Nouf AlShenaifi and Aqil Azmi. 2022. Arabic dialect identification using machine learning and transformer-based models: Submission to the NADI 2022 Shared Task. Proceedings of the Seventh Arabic Natural Language Processing Workshop (WANLP).

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{alshenaifi2022arabic,
  title = {{Arabic dialect identification using machine learning and transformer-based models: Submission to the NADI 2022 Shared Task}},
  author = {Nouf AlShenaifi and Aqil Azmi},
  booktitle = {Proceedings of the Seventh Arabic Natural Language Processing Workshop (WANLP)},
  year = {2022},
  doi = {10.18653/v1/2022.wanlp-1.50},
  url = {https://doi.org/10.18653/v1/2022.wanlp-1.50}
}
```

- [← previous "You might think about slightly revising the title": Identifying Hedges in Peer-tutoring Interactions](https://md.research.elamur.ai/free/en/papers/raphalen-2022-you-might-think-about-slightly/)
- [next → Capture Human Disagreement Distributions by Calibrated Networks for Natural Language Inference](https://md.research.elamur.ai/free/en/papers/wang-2022-capture-human-disagreement-distributions-calibrated/)
- [↑ back to papers of 2022](https://md.research.elamur.ai/free/en/papers/2022/page/5/)

## References

14 references, 6 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

1. Abdul-Mageed, Muhammad, Chiyu Zhang, Houda Bouamor, and Nizar Habash. 2020. “[NADI 2020: The First Nuanced Arabic Dialect Identification Shared Task](https://md.research.elamur.ai/free/en/papers/mageed-2020-nadi-2020-first-nuanced-arabic/).” ArXiv Preprint ArXiv:2010.11334. [↗](https://arxiv.org/abs/2010.11334)
2. Abdul-Mageed, Muhammad, Chiyu Zhang, AbdelRahim Elmadany, Houda Bouamor, and Nizar Habash. 2021. “[Nadi 2021: The Second Nuanced Arabic Dialect Identification Shared Task](https://md.research.elamur.ai/free/en/papers/mageed-2021-nadi-2021-second-nuanced-arabic/).” ArXiv Preprint ArXiv:2103.08466. [↗](https://arxiv.org/abs/2103.08466)
3. Antoun, Wissam, Fady Baly, and Hazem Hajj. 2020. “[Arabert: Transformer-Based Model for Arabic Language Understanding](https://md.research.elamur.ai/free/en/papers/antoun-2020-arabert-transformer-based-model-arabic/).” ArXiv Preprint ArXiv:2003.00104. [↗](https://arxiv.org/abs/2003.00104)
4. Devlin, Jacob, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2018. “[Bert: Pre-Training of Deep Bidirectional Transformers for Language Understanding](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/).” ArXiv Preprint ArXiv:1810.04805. Test-B Acc 36.9 [↗](https://arxiv.org/abs/1810.04805)
5. Elnagar, Ashraf, Sane M Yagi, Ali Bou Nassif, Ismail Shahin, and Said A Salloum. 2021. “Systematic Literature Review of Dialectal Arabic: Identification and Detection.” IEEE Access 9: 31010–42. [↗](https://doi.org/10.1109/access.2021.3059504)
6. Fanny, Fanny, Yohan Muliono, and Fidelson Tanzil. 2018. “A Comparison of Text 466 3 Classification Methods K-NN, Naïve Bayes, and Support Vector Machine for News Classification.” Jurnal Informatika: Jurnal Pengembangan IT 3 (2): 157–60. [find](https://scholar.google.com/scholar?q=Fanny%2C+Fanny%2C+Yohan+Muliono%2C+and+Fidelson+Tanzil%2E+2018%2E+%E2%80%9CA+Comparison+of+Text+466+3+Classification+Methods+K%2DNN%2C+Na%C3%AFve+Bayes%2C+and+Support+Vector+Machine+for+News+Classification%2E%E2%80%9D+Jurnal+Informatika%3A+J)
7. Fernández, Alberto, Salvador Garcia, Francisco Herrera, and Nitesh v Chawla. 2018. “SMOTE for Learning from Imbalanced Data: Progress and Challenges, Marking the 15-Year Anniversary.” Journal of Artificial Intelligence Research 61: 863–905. [↗](https://doi.org/10.1613/jair.1.11192)
8. Kowsari, Kamran, Kiana Jafari Meimandi, Mojtaba Heidarysafa, Sanjana Mendu, Laura Barnes, and Donald Brown. 2019. “Text Classification Algorithms: A Survey.” Information 10 (4): 150. [↗](https://doi.org/10.3390/info10040150)
9. McMillan-Major, Angelina, Salomey Osei, Juan Diego Rodriguez, Pawan Sasanka Ammanamanchi, Sebastian Gehrmann, and Yacine Jernite. 2021. “Reusable Templates and Guides for Documenting Datasets and Models for Natural Language Processing and Generation: A Case Study of the HuggingFace and GEM Data and Model Cards.” ArXiv Preprint ArXiv:2108.07374. [↗](https://arxiv.org/abs/2108.07374)
10. Mikolov, Tomas, Edouard Grave, Piotr Bojanowski, Christian Puhrsch, and Armand Joulin. 2017. “[Advances in Pre-Training Distributed Word Representations](https://md.research.elamur.ai/free/en/papers/mikolov-2017-advances-pre-training-distributed-word/).” ArXiv Preprint ArXiv:1712.09405. [↗](https://arxiv.org/abs/1712.09405)
11. Shah, Kanish, Henil Patel, Devanshi Sanghvi, and Manan Shah. 2020. “A Comparative Analysis of Logistic Regression, Random Forest and KNN Models for the Text Classification.” Augmented Human Research 5 (1): 1–16. [↗](https://doi.org/10.1007/s41133-020-00032-0)
12. Soliman, Abu Bakr, Kareem Eissa, and Samhaa R El-Beltagy. 2017. “Aravec: A Set of Arabic Word Embedding Models for Use in Arabic Nlp.” Procedia Computer Science 117: 256– 65. [find](https://scholar.google.com/scholar?q=Soliman%2C+Abu+Bakr%2C+Kareem+Eissa%2C+and+Samhaa+R+El%2DBeltagy%2E+2017%2E+%E2%80%9CAravec%3A+A+Set+of+Arabic+Word+Embedding+Models+for+Use+in+Arabic+Nlp%2E%E2%80%9D+Procedia+Computer+Science+117%3A+256%E2%80%93+65%2E)
13. Srinivasa-Desikan, Bhargav. 2018. Natural Language Processing and Computational Linguistics: A Practical Guide to Text Analysis with Python, Gensim, SpaCy, and Keras. Packt Publishing Ltd. [find](https://scholar.google.com/scholar?q=Srinivasa%2DDesikan%2C+Bhargav%2E+2018%2E+Natural+Language+Processing+and+Computational+Linguistics%3A+A+Practical+Guide+to+Text+Analysis+with+Python%2C+Gensim%2C+SpaCy%2C+and+Keras%2E+Packt+Publishing+Ltd%2E)
14. Zaidan, Omar, and Chris Callison-Burch. 2011. “[The Arabic Online Commentary Dataset: An Annotated Dataset of Informal Arabic with High Dialectal Content](https://md.research.elamur.ai/free/en/papers/zaidan-2011-arabic-online-commentary-dataset-annotated/).” In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, 37–41. 467 4

*Updated 1 November 2026*
