|
|
--- |
|
|
language: |
|
|
- vi |
|
|
license: mit |
|
|
task_categories: |
|
|
- text-generation |
|
|
- text2text-generation |
|
|
tags: |
|
|
- spelling-correction |
|
|
- grammatical-error-correction |
|
|
- synthetic-data |
|
|
- vietnam |
|
|
size_categories: |
|
|
- 100K<n<1M |
|
|
--- |
|
|
|
|
|
# Vietnamese Spelling Correction Dataset |
|
|
|
|
|
This dataset contains **978,417** pairs of noisy (source) and clean (target) Vietnamese sentences, designed for training spelling correction models. |
|
|
|
|
|
The dataset was synthetically generated by injecting realistic noise into a clean Vietnamese corpus. |
|
|
|
|
|
## Dataset Structure |
|
|
|
|
|
The dataset is divided into training and testing sets: |
|
|
|
|
|
- **Train**: 880,575 examples |
|
|
- **Test**: 97,842 examples |
|
|
|
|
|
### Data Fields |
|
|
|
|
|
- `source`: The text with injected errors (input). |
|
|
- `target`: The original clean text (label). |
|
|
|
|
|
### Sample |
|
|
|
|
|
| Source (Noisy) | Target (Clean) | Error Type | |
|
|
| :--- | :--- | :--- | |
|
|
| 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 | |
|
|
| ...xuất **hien** **thườg** xuyên **trog** **kák**... | ...xuất **hiện** **thường** xuyên **trong** **các**... | Multiple realistic typos | |
|
|
| ...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) | |
|
|
|
|
|
## Noise Generation Logic |
|
|
|
|
|
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: |
|
|
|
|
|
1. **Teencode & Lexical Variants** (~40%): |
|
|
- Syllable contractions: `ng` $\to$ `g`, `nh` $\to$ `h`, `qu` $\to$ `w`, `yê` $\to$ `i`. |
|
|
- Phonetic substitutions: `ph` $\to$ `f`, `gi` $\to$ `j`, `c/k` $\to$ `k`. |
|
|
- Dictionary slang: `vợ` $\to$ `vk`, `không` $\to$ `ko`. |
|
|
|
|
|
2. **Regional Phonological Errors** (~30%): |
|
|
- **North**: `tr` $\leftrightarrow$ `ch`, `s` $\leftrightarrow$ `x`, `r` $\leftrightarrow$ `d` $\leftrightarrow$ `gi`. |
|
|
- **South**: `n` $\leftrightarrow$ `ng` (final), `t` $\leftrightarrow$ `c`. |
|
|
|
|
|
3. **Typing & Mechanical Errors** (~20%): |
|
|
- **Spatial**: Hitting adjacent keys on QWERTY keyboard. |
|
|
- **Telex**: Wrong accent codes (`s` $\to$ `d`), double typing (`đ` $\to$ `ddd`). |
|
|
- **Operations**: Random insertions, deletions, transpositions. |
|
|
|
|
|
4. **Unaccented** (~10%): |
|
|
- Removing tone marks (e.g., `trường` $\to$ `truong`). |
|
|
|
|
|
## Usage |
|
|
|
|
|
```python |
|
|
from datasets import load_dataset |
|
|
|
|
|
dataset = load_dataset("coung21/vi-spelling-correction") |
|
|
|
|
|
print(dataset["train"][0]) |
|
|
# Output: {'source': '...', 'target': '...'} |
|
|
``` |
|
|
|
|
|
## Credits |
|
|
|
|
|
The source data for this dataset was extracted from a **Vietnamese Wikipedia dump**. |
|
|
The noise was synthetically generated using a custom noise injection pipeline to simulate realistic Vietnamese spelling errors. |
|
|
|