coung21/vi-spelling-correction
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… See the full description on the dataset page: https://huggingface.co/datasets/coung21/vi-spelling-correction.
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
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:
- 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.
- Regional Phonological Errors (~30%):
- North:
tr$\leftrightarrow$ch,s$\leftrightarrow$x,r$\leftrightarrow$d$\leftrightarrow$gi. - South:
n$\leftrightarrow$ng(final),t$\leftrightarrow$c.
- 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.
- Unaccented (~10%):
- Removing tone marks (e.g.,
trường$\to$truong).
Usage
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.
