Datasets:
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,25 +1,78 @@
|
|
| 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 |
+
- vi
|
| 4 |
+
license: mit
|
| 5 |
+
task_categories:
|
| 6 |
+
- text-generation
|
| 7 |
+
- text2text-generation
|
| 8 |
+
tags:
|
| 9 |
+
- spelling-correction
|
| 10 |
+
- grammatical-error-correction
|
| 11 |
+
- synthetic-data
|
| 12 |
+
- vietnam
|
| 13 |
+
size_categories:
|
| 14 |
+
- 100K<n<1M
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# Vietnamese Spelling Correction Dataset
|
| 18 |
+
|
| 19 |
+
This dataset contains **978,417** pairs of noisy (source) and clean (target) Vietnamese sentences, designed for training spelling correction models.
|
| 20 |
+
|
| 21 |
+
The dataset was synthetically generated by injecting realistic noise into a clean Vietnamese corpus.
|
| 22 |
+
|
| 23 |
+
## Dataset Structure
|
| 24 |
+
|
| 25 |
+
The dataset is divided into training and testing sets:
|
| 26 |
+
|
| 27 |
+
- **Train**: 880,575 examples
|
| 28 |
+
- **Test**: 97,842 examples
|
| 29 |
+
|
| 30 |
+
### Data Fields
|
| 31 |
+
|
| 32 |
+
- `source`: The text with injected errors (input).
|
| 33 |
+
- `target`: The original clean text (label).
|
| 34 |
+
|
| 35 |
+
### Sample
|
| 36 |
+
|
| 37 |
+
| Source (Noisy) | Target (Clean) | Error Type |
|
| 38 |
+
| :--- | :--- | :--- |
|
| 39 |
+
| Căn **bật** hai của số âm có thể được **ban** luận... | Căn **bậc** hai của số âm có thể được **bàn** luận... | Phonological + Unaccented |
|
| 40 |
+
| ...xuất **hien** **thườg** xuyên **trog** **kák**... | ...xuất **hiện** **thường** xuyên **trong** **các**... | Multiple realistic typos |
|
| 41 |
+
| ...máy **tín** bỏ túi đều có phím... | ...máy **tính** bỏ túi đều có phím... | Phonological (nh->n) |
|
| 42 |
+
|
| 43 |
+
## Noise Generation Logic
|
| 44 |
+
|
| 45 |
+
The noise was generated using a custom script with a **0.5 noise rate** (approx. 50% of tokens affected) and guaranteed at least one error per sample. The errors mimic real-world Vietnamese typing and spelling mistakes:
|
| 46 |
+
|
| 47 |
+
1. **Teencode & Lexical Variants** (~40%):
|
| 48 |
+
- Syllable contractions: `ng` $\to$ `g`, `nh` $\to$ `h`, `qu` $\to$ `w`, `yê` $\to$ `i`.
|
| 49 |
+
- Phonetic substitutions: `ph` $\to$ `f`, `gi` $\to$ `j`, `c/k` $\to$ `k`.
|
| 50 |
+
- Dictionary slang: `vợ` $\to$ `vk`, `không` $\to$ `ko`.
|
| 51 |
+
|
| 52 |
+
2. **Regional Phonological Errors** (~30%):
|
| 53 |
+
- **North**: `tr` $\leftrightarrow$ `ch`, `s` $\leftrightarrow$ `x`, `r` $\leftrightarrow$ `d` $\leftrightarrow$ `gi`.
|
| 54 |
+
- **South**: `n` $\leftrightarrow$ `ng` (final), `t` $\leftrightarrow$ `c`.
|
| 55 |
+
|
| 56 |
+
3. **Typing & Mechanical Errors** (~20%):
|
| 57 |
+
- **Spatial**: Hitting adjacent keys on QWERTY keyboard.
|
| 58 |
+
- **Telex**: Wrong accent codes (`s` $\to$ `d`), double typing (`đ` $\to$ `ddd`).
|
| 59 |
+
- **Operations**: Random insertions, deletions, transpositions.
|
| 60 |
+
|
| 61 |
+
4. **Unaccented** (~10%):
|
| 62 |
+
- Removing tone marks (e.g., `trường` $\to$ `truong`).
|
| 63 |
+
|
| 64 |
+
## Usage
|
| 65 |
+
|
| 66 |
+
```python
|
| 67 |
+
from datasets import load_dataset
|
| 68 |
+
|
| 69 |
+
dataset = load_dataset("coung21/vi-spelling-correction")
|
| 70 |
+
|
| 71 |
+
print(dataset["train"][0])
|
| 72 |
+
# Output: {'source': '...', 'target': '...'}
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
## Credits
|
| 76 |
+
|
| 77 |
+
The source data for this dataset was extracted from a **Vietnamese Wikipedia dump**.
|
| 78 |
+
The noise was synthetically generated using a custom noise injection pipeline to simulate realistic Vietnamese spelling errors.
|