File size: 3,669 Bytes
e5b1511
 
 
 
 
 
 
 
 
91d7b14
afba5ca
e5b1511
91d7b14
afba5ca
e5b1511
91d7b14
afba5ca
91d7b14
 
e5b1511
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5672de5
 
 
 
e5b1511
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62efbc0
e5b1511
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62efbc0
e5b1511
 
 
62efbc0
e5b1511
78a1053
62efbc0
e5b1511
 
 
 
 
 
62efbc0
e5b1511
 
62efbc0
 
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
---
dataset_info:
  features:
  - name: vocalized
    dtype: string
  - name: erroneous
    dtype: string
  splits:
  - name: train
    num_bytes: 4494447826
    num_examples: 1460625
  - name: valid
    num_bytes: 93024950
    num_examples: 30129
  - name: test
    num_bytes: 46293622
    num_examples: 15062
  download_size: 2248929902
  dataset_size: 4633766398
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: valid
    path: data/valid-*
  - split: test
    path: data/test-*
license: mit
task_categories:
- text2text-generation
language:
- ar
tags:
- Speech-Correction
- Diacritics
- Vocalized
- Arabic
- Tashkeel
---

# **Text with Diacritics Correction Dataset**

[![Hugging Face](https://img.shields.io/badge/Hugging%20Face-Dataset-yellow)](https://huggingface.co/datasets/FlouBsy/Text-with-Diacritics-Correction)

## **Overview**
This dataset is an **Arabic dataset** derived from [Abdou/arabic-tashkeel-dataset](https://huggingface.co/datasets/Abdou/arabic-tashkeel-dataset), with additional **preprocessing and error injection** to help train models for **speech and typing correction**.

### **Key Features****Preprocessed Arabic text**: Cleaned `vocalized` column by removing non-Arabic characters, symbols, emojis, brackets, and numbers.  
✅ **Injected realistic errors**: Includes four types of errors that simulate real-world **speech and typing mistakes**.  
✅ **Large-scale dataset**: Over **1.5 million** text samples for robust training.  
✅ **Suitable for NLP tasks**: Useful for **text correction, speech recognition, and Arabic NLP research**.  

---

## **Dataset Details**

### **Statistics**
| Split | Samples |
|------------|---------:|
| Train | 1,460,625 |
| Validation | 30,129 |
| Test | 15,062 |
| **Total** | **1,505,816** |

### **Data Format**
- **File Type**: Parquet  
- **Columns**:  
  - `vocalized`: Preprocessed Arabic text  
  - `erroneous`: The same text with injected errors  

---

## **Error Injection Details**
We introduced **four types of common Arabic text errors** to enhance the dataset’s usability for speech and typing correction:

1. **Keyboard Errors** 🖥️  
   - Mistyped letters based on nearby keyboard keys.  
   - Example: `السلام``الستام` (minor keyboard slip).  

2. **Ordering Errors** 🔀  
   - Swapped adjacent letters.  
   - Example: `مرحبا``مرحاب` (common typing mistake).  

3. **Phonetic Errors** 🎙️  
   - Replaced letters with phonetically similar ones.  
   - Example: `ن``م`, `س``ث`.  

4. **Diacritic Errors** 🐪  
   - Altered or removed Arabic diacritics (`Tashkeel`).  
   - Example: `كَتَبَ``كَتُبَ`.  

These errors mimic **real-world mistakes** in **speech recognition and Arabic typing**, improving model robustness.

---

## **Usage**

### **Loading the Dataset in Python**
```python
from datasets import load_dataset

dataset = load_dataset("FlouBsy/Text-with-Diacritics-Correction")

# Example access
print(dataset['train'][0]) # Show first sample
```

## Collaborators

- **[Basma M.](https://huggingface.co/FlouBsy)** (Main Contributor)
- **[Selsabeel A.](https://huggingface.co/Selsabeel)**

## Citations

```
@misc{arabic_tashkeel_dataset,
  author = {Abdou},
  title = {{Arabic Tashkeel Dataset}},
  year = {2024},
  url = {https://huggingface.co/datasets/Abdou/arabic-tashkeel-dataset}
}

@misc{Text-with-Diacritics-Correction,
  author = {Basma M., Selsabeel A.},
  title = {{Arabic Speech & Typing Errors with Diacritics Dataset}},
  year = {2025},
  url = {https://huggingface.co/datasets/FlouBsy/Text-with-Diacritics-Correction}
}
```