vietanhdev commited on
Commit
d34ea30
·
verified ·
1 Parent(s): 2243228

initial: 500K Wiki + 150K NFC-fixed VN news training pairs

Browse files
Files changed (5) hide show
  1. .gitattributes +2 -0
  2. README.md +135 -0
  3. news_150k.jsonl +3 -0
  4. wiki_500k.jsonl +3 -0
  5. wiki_val_5k.jsonl +0 -0
.gitattributes CHANGED
@@ -58,3 +58,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ news_150k.jsonl filter=lfs diff=lfs merge=lfs -text
62
+ wiki_500k.jsonl filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-sa-4.0
3
+ language:
4
+ - vi
5
+ tags:
6
+ - vietnamese
7
+ - diacritic-restoration
8
+ - training
9
+ size_categories:
10
+ - 100K<n<1M
11
+ task_categories:
12
+ - text-generation
13
+ configs:
14
+ - config_name: wiki_500k
15
+ data_files:
16
+ - split: train
17
+ path: wiki_500k.jsonl
18
+ - split: validation
19
+ path: wiki_val_5k.jsonl
20
+ - config_name: news_150k
21
+ data_files:
22
+ - split: train
23
+ path: news_150k.jsonl
24
+ ---
25
+
26
+ # `nrl-ai/vn-diacritic-train` — Vietnamese diacritic-restoration training data
27
+
28
+ Two register-distinct training corpora used to fine-tune Vietnamese
29
+ diacritic-restoration models in the
30
+ [`nom-vn`](https://github.com/nrl-ai/nom-vn) project. Each row is a
31
+ JSONL record:
32
+
33
+ ```json
34
+ {"input": "diacritic-stripped text", "target": "correctly diacriticized original"}
35
+ ```
36
+
37
+ Inputs are produced by
38
+ [`nom.text.strip_diacritics`](https://github.com/nrl-ai/nom-vn/blob/main/src/nom/text/strip_diacritics.py)
39
+ on the target. Both fields are NFC-normalized.
40
+
41
+ ## Configs
42
+
43
+ ### `wiki_500k`
44
+
45
+ 500K (input, target) pairs from
46
+ [`hirine/wikipedia-vietnamese-1M296K-dataset`](https://huggingface.co/datasets/hirine/wikipedia-vietnamese-1M296K-dataset)
47
+ (CC-BY-SA-4.0). Encyclopedic register, broad topical coverage.
48
+
49
+ Filtering pipeline (deterministic, stride=7):
50
+
51
+ 1. Sentence-split each article (regex on terminator + capital VN letter).
52
+ 2. Drop sentences shorter than 30 chars or longer than 300.
53
+ 3. Drop sentences with ASCII ratio > 95 % (URLs, tables, code blocks).
54
+ 4. Drop sentences without diacritics (no training signal).
55
+ 5. Drop sentences in the held-out diacritic eval set
56
+ (see [`nrl-ai/vn-diacritic-eval`](https://huggingface.co/datasets/nrl-ai/vn-diacritic-eval)).
57
+ 6. Deduplicate exact target.
58
+ 7. Stride-sample every 7th eligible sentence — diverse without RNG.
59
+
60
+ Includes a 5K held-out validation split (`wiki_val_5k.jsonl`). 0
61
+ contamination against the diacritic eval slices (audited 2026-04-30).
62
+
63
+ **License:** CC-BY-SA-4.0 (inherited from the source corpus).
64
+
65
+ ### `news_150k`
66
+
67
+ 150K (input, target) pairs from
68
+ [`tmnam20/Vietnamese-News-dedup`](https://huggingface.co/datasets/tmnam20/Vietnamese-News-dedup)
69
+ (CC-BY-4.0). Modern news / business register — complements `wiki_500k`'s
70
+ encyclopedic tilt.
71
+
72
+ Same filters as `wiki_500k` plus:
73
+
74
+ - **NFC normalization is critical here.** The upstream `tmnam20`
75
+ dataset ships ~79 % of its sentences in NFD-decomposed form (e.g.
76
+ "Cộng" stored as 'C' + 'o' + COMBINING DOT BELOW + COMBINING
77
+ CIRCUMFLEX rather than the precomposed U+1ED9). Training a model
78
+ on NFD targets when the eval is NFC produces silent quality
79
+ regressions (we hit a -15.45 pp business-register regression
80
+ before catching this). All targets in this config are NFC-normalized
81
+ before write.
82
+
83
+ - Stride=3 (vs wiki's 7) since news articles are denser and shorter.
84
+
85
+ **License:** CC-BY-4.0 (inherited from the source corpus). More
86
+ permissive than `wiki_500k` — derivatives don't need to be share-alike.
87
+
88
+ ## Loading
89
+
90
+ ```python
91
+ from datasets import load_dataset
92
+
93
+ # Wikipedia 500K
94
+ wiki = load_dataset("nrl-ai/vn-diacritic-train", "wiki_500k", split="train")
95
+ print(wiki[0])
96
+ # {'input': 'Hop dong nay duoc lap...', 'target': 'Hợp đồng này được lập...'}
97
+
98
+ # Mix wiki + news for register balance (recipe used by the published
99
+ # `nrl-ai/vn-diacritic-vit5-base` training)
100
+ import random
101
+ wiki = load_dataset("nrl-ai/vn-diacritic-train", "wiki_500k", split="train").shuffle(seed=42).select(range(350_000))
102
+ news = load_dataset("nrl-ai/vn-diacritic-train", "news_150k", split="train")
103
+ mixed = (wiki.to_list() + news.to_list())
104
+ random.Random(42).shuffle(mixed)
105
+ ```
106
+
107
+ ## Eval-leak protection
108
+
109
+ Both configs are scrubbed against [`nrl-ai/vn-diacritic-eval`][eval]
110
+ (business / formal / conversational / literary slices). Audited 2026-04-30
111
+ on the released JSONL files: 0 hits across all 4 splits.
112
+
113
+ [eval]: https://huggingface.co/datasets/nrl-ai/vn-diacritic-eval
114
+
115
+ ## License posture
116
+
117
+ Repo-level license is **CC-BY-SA-4.0** (the most restrictive of the
118
+ two configs, applied for safety). Per-config licenses above. If you
119
+ only need the more permissive subset, use `news_150k` (CC-BY-4.0).
120
+
121
+ ## Citation
122
+
123
+ ```bibtex
124
+ @misc{nom_vn_diacritic_train_2026,
125
+ title={Vietnamese diacritic-restoration training data},
126
+ author={Nguyen, Viet-Anh and {Neural Research Lab}},
127
+ year={2026},
128
+ howpublished={\url{https://huggingface.co/datasets/nrl-ai/vn-diacritic-train}}
129
+ }
130
+ ```
131
+
132
+ Cite upstream:
133
+
134
+ - [`hirine/wikipedia-vietnamese-1M296K-dataset`](https://huggingface.co/datasets/hirine/wikipedia-vietnamese-1M296K-dataset)
135
+ - [`tmnam20/Vietnamese-News-dedup`](https://huggingface.co/datasets/tmnam20/Vietnamese-News-dedup)
news_150k.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:530a315668ed9eddbd4d676f776bf1ac3056c13e1927833786d7c352d2fd0015
3
+ size 55318259
wiki_500k.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4aa85f5ff6f7b83269a80f4bdf40b160c441f22ce637df709928899f26cc24b0
3
+ size 138853466
wiki_val_5k.jsonl ADDED
The diff for this file is too large to render. See raw diff