Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
csv
Languages:
Arabic
Size:
10K - 100K
License:
File size: 5,490 Bytes
068483a cb36d57 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
---
license: "cc-by-4.0"
language:
- ar
task_categories:
- text-classification
tags:
- arabic
- dialect-identification
- multilingual
- sociolinguistics
- code-switching
- bivalency
configs:
- config_name: full_text
description: "Raw dialectal text files for EGY, GLF, LAV, NOR and MSA."
- config_name: freq_lists
description: "Dialect-specific vocabulary lists, bivalency-removed lists and MSA shared lists."
---
# Arabic Dialects Dataset (Bivalency & Code-Switching)
The **Arabic Dialects Dataset** is a specialised corpus designed for automatic dialect identification, with a focus on the linguistic phenomena of **bivalency** and **written code-switching** between major Arabic dialects and Modern Standard Arabic (MSA).
It covers five varieties:
- **EGY** – Egyptian Arabic
- **GLF** – Gulf Arabic
- **LAV** – Levantine Arabic
- **NOR** – North African / Tunisian Arabic
- **MSA** – Modern Standard Arabic
The dataset was created for research on fine-grained linguistic variation and has been used to evaluate new methods such as **Subtractive Bivalency Profiling (SBP)**, achieving over **76% accuracy** in supervised dialect identification.
This HuggingFace release makes the dataset machine-readable and ready for text classification, feature engineering, or corpus linguistic exploration.
---
## 📘 Citation
If you use this dataset, please cite:
**El-Haj M., Rayson P., Aboelezz M. (2018)**
*Arabic Dialect Identification in the Context of Bivalency and Code-Switching.*
In **Proceedings of the 11th International Conference on Language Resources and Evaluation (LREC 2018)**, Miyazaki, Japan, pp. 3622–3627.
European Language Resources Association (ELRA).
PDF: https://elhaj.uk/docs/237_Paper.pdf
---
## 📂 Dataset Structure
The dataset is distributed across two main sections:
### **1. Dialects Full Text**
Five files, each containing all instances belonging to one dialect:
```
Dialects Full Text/
│── allEGY.txt
│── allGLF.txt
│── allLAV.txt
│── allMSA.txt
└── allNOR.txt
```
---
Each file contains raw text samples, one per line, suitable for direct use in dialect classification experiments.
---
### **2. Dialectal Frequency Lists**
These resources support linguistic analysis and the SBP approach introduced in the paper.
```
Dialects Frequency Lists/
│
├── Bivalency Removed (dialect - MSA)/
│ allEGY_minusMSA.txt
│ allGLF_minusMSA.txt
│ allLAV_minusMSA.txt
│ allNOR_minusMSA.txt
│
├── Dialects’ MSA/
│ allEGY_dialectal_MSA.txt
│ allGLF_dialectal_MSA.txt
│ allLAV_dialectal_MSA.txt
│ allNOR_dialectal_MSA.txt
│
├── Dialects Tokens WITH Frequency Count/
│ all-EGY_FreqList.txt
│ all-GLF_FreqList.txt
│ all-LAV_FreqList.txt
│ all-MSA_FreqList.txt
│ all-NOR_FreqList.txt
│
└── Dialects Tokens NO Frequency Count/
all-EGY_FreqList2.txt
all-GLF_FreqList2.txt
all-LAV_FreqList2.txt
all-MSA_FreqList2.txt
all-NOR_FreqList2.txt
```
**These include:**
- **Bivalency-removed lists:** dialect-specific vocabularies after removing shared (bivalent) words
- **Dialectal-MSA lists:** vocabulary shared with MSA via written code-switching
- **Frequency lists:** token frequency counts
- **Non-frequency lists:** raw token lists without counts
---
## 📊 **CSV Conversion + Train/Dev/Test Splits**
The original text files were converted into a unified sentence-level CSV: arabic_dialects_full.csv
with the schema:
| sentence | dialect |
|----------|---------|
| … | EGY / GLF / LAV / MSA / NOR |
Each sentence corresponds to one line from the original files.
This CSV was then **stratified and split** into:
arabic_dialects_train.csv
arabic_dialects_dev.csv
arabic_dialects_test.csv
Splits preserve dialect balance and follow an 80/10/10 ratio.
These files power the `csv_splits` configuration for immediate model training.
---
## 🧪 Intended Use
This dataset supports several research tasks:
### **Dialect Identification**
- Train machine-learning models to classify EGY/GLF/LAV/NOR/MSA
- Evaluate performance on highly bivalent and lexically overlapping dialects
- Benchmark features beyond n-grams
### **Bivalency & Code-Switching Analysis**
- Study how words shift between dialects and MSA
- Explore written code-switching in online text and commentary discourse
### **Linguistic Feature Engineering**
- Use SBP lists as interpretable features
- Combine stylistic, grammatical, and frequency-based signals
---
## 📊 Data Statistics
(From the original publication)
| Dialect | Sentences | Words |
|--------|-----------|-------|
| EGY | 4,061 | 118,152 |
| GLF | 2,546 | 65,752 |
| LAV | 2,463 | 67,976 |
| MSA | 3,731 | 49,985 |
| NOR | 3,693 | 53,204 |
| **Total** | **16,494** | **355,069** |
---
## 🔍 Example Usage
### Load the full text for dialect classification
```python
from datasets import load_dataset
ds = load_dataset("YOUR_REPO_NAME", "full_text")
print(ds["train"][0])
ds = load_dataset("YOUR_REPO_NAME", "freq_lists")
freq_list = ds["EGY_freq"]
```
---
## ⚠ Licence
This dataset is released for research purposes only.
Texts originate from publicly available online sources or earlier datasets where redistribution for research is permitted.
---
## 🙏 Acknowledgements
This dataset was developed at UCREL, Lancaster University, as part of research into Arabic dialect variation, bivalency, and automatic dialect identification. |