docs: add comprehensive README and refine token counting
Browse files
README.md
CHANGED
|
@@ -1,25 +1,108 @@
|
|
| 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 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- ar
|
| 4 |
+
- arz
|
| 5 |
+
- acm
|
| 6 |
+
- apc
|
| 7 |
+
- ary
|
| 8 |
+
- arb
|
| 9 |
+
language_bcp47:
|
| 10 |
+
- ar-EG
|
| 11 |
+
- ar-IQ
|
| 12 |
+
- ar-LB
|
| 13 |
+
- ar-MA
|
| 14 |
+
- ar-SA
|
| 15 |
+
license: mit
|
| 16 |
+
tags:
|
| 17 |
+
- arabic
|
| 18 |
+
- dialects
|
| 19 |
+
- nlp
|
| 20 |
+
- speech-to-text
|
| 21 |
+
- transcription
|
| 22 |
+
- text-classification
|
| 23 |
+
- linguistics
|
| 24 |
+
- corpus
|
| 25 |
+
- egyptian
|
| 26 |
+
- gulf
|
| 27 |
+
- levantine
|
| 28 |
+
- maghrebi
|
| 29 |
+
- iraqi
|
| 30 |
+
- cl100k_base
|
| 31 |
+
task_categories:
|
| 32 |
+
- text-generation
|
| 33 |
+
- text-classification
|
| 34 |
+
pretty_name: Arabic Dialect Corpus
|
| 35 |
+
size_categories:
|
| 36 |
+
- 100K<n<1M
|
| 37 |
---
|
| 38 |
+
|
| 39 |
+
# Arabic Dialect Corpus
|
| 40 |
+
|
| 41 |
+
A comprehensive collection of Arabic dialectal text, standardized for Natural Language Processing (NLP) model training, evaluation, and linguistic analysis. This corpus has been meticulously processed to ensure high-quality tokenization and consistent metadata.
|
| 42 |
+
|
| 43 |
+
## Dataset Statistics
|
| 44 |
+
|
| 45 |
+
| Metric | Value |
|
| 46 |
+
| :--- | :--- |
|
| 47 |
+
| **Total Records** | 127,180 |
|
| 48 |
+
| **Total Tokens** | 5,802,324 |
|
| 49 |
+
| **Average Tokens per Record** | 45.62 |
|
| 50 |
+
| **Dialect Categories** | 5 |
|
| 51 |
+
|
| 52 |
+
## Changelog
|
| 53 |
+
|
| 54 |
+
### Version 1.0 (January 2026)
|
| 55 |
+
|
| 56 |
+
This release establishes the baseline for the corpus with strict quality controls:
|
| 57 |
+
|
| 58 |
+
- **Token Count**: Validated 5.8M+ tokens using `cl100k_base` (GPT-4 standard).
|
| 59 |
+
- **Data Density**: Optimized average record length to ~45 tokens for efficient training.
|
| 60 |
+
- **Dialect Coverage**: Confirmed distribution across 5 distinct dialect categories.
|
| 61 |
+
- **Quality Assurance**: Zero empty records and standardized metadata schema.
|
| 62 |
+
|
| 63 |
+
## Dataset Structure
|
| 64 |
+
|
| 65 |
+
Each record in the dataset contains the following fields:
|
| 66 |
+
|
| 67 |
+
- `text` (string): The raw Arabic text content.
|
| 68 |
+
- `topic` (string): The semantic category or topic of the text.
|
| 69 |
+
- `utterance_type` (string): Classification of the utterance (e.g., statement, question).
|
| 70 |
+
- `dialect` (string): The regional dialect name: `Masri` (Egyptian), `Khaleeji` (Gulf), `Levantine`, `Maghrebi` (North African), or `Iraqi`.
|
| 71 |
+
- `tokens` (int): The precise token count calculated using `cl100k_base` encoding.
|
| 72 |
+
|
| 73 |
+
## Usage
|
| 74 |
+
|
| 75 |
+
### Loading the Dataset
|
| 76 |
+
|
| 77 |
+
The dataset is hosted on the Hugging Face Hub and can be loaded directly using the `datasets` library.
|
| 78 |
+
|
| 79 |
+
```python
|
| 80 |
+
from datasets import load_dataset
|
| 81 |
+
|
| 82 |
+
# Load the complete dataset
|
| 83 |
+
dataset = load_dataset("dataflare/arabic-dialect-corpus")
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
## Detailed Methodology
|
| 87 |
+
|
| 88 |
+
### Collection and Processing
|
| 89 |
+
The data was aggregated from diverse sources including transcribed media and public archives. The processing pipeline involved:
|
| 90 |
+
1. **Normalization**: Text normalization to remove noise while preserving dialectal features.
|
| 91 |
+
2. **Segmentation**: Splitting long passages into training-ready chunks.
|
| 92 |
+
3. **Token Counting**: Rigorous token counting using `tiktoken` to assist in curriculum training and length bucketing.
|
| 93 |
+
|
| 94 |
+
## Citation and License
|
| 95 |
+
|
| 96 |
+
This dataset is released under the **MIT License**.
|
| 97 |
+
|
| 98 |
+
If you rely on this corpus for your research or application, please cite it using the following BibTeX entry:
|
| 99 |
+
|
| 100 |
+
```bibtex
|
| 101 |
+
@dataset{arabic_dialect_corpus,
|
| 102 |
+
title={Arabic Dialect Corpus},
|
| 103 |
+
author={Dataflare},
|
| 104 |
+
year={2026},
|
| 105 |
+
publisher={Hugging Face},
|
| 106 |
+
url={https://huggingface.co/datasets/dataflare/arabic-dialect-corpus}
|
| 107 |
+
}
|
| 108 |
+
```
|