sabilmakbar
commited on
Commit
•
9cd3184
1
Parent(s):
a5d8f0d
Add New Langs (#4)
Browse files- Update codebase and new langs (566a9516fda13f2ede2bd9b07a2415ab77de8d4e)
- README.md +183 -51
- count_data_stats.py +2 -1
- dedup_raw_wiki_data_sea.sh +5 -4
- extract_raw_wiki_data_sea.sh +6 -5
- requirements.txt +6 -3
- sea_wiki.py +12 -8
- sea_wiki_dedup_data/wiki_bcl_20231101_dataset_dedup_cleansed.csv +3 -0
- sea_wiki_dedup_data/wiki_cbk-zam_20231101_dataset_dedup_cleansed.csv +3 -0
- sea_wiki_dedup_data/wiki_ilo_20231101_dataset_dedup_cleansed.csv +3 -0
- sea_wiki_dedup_data/wiki_pag_20231101_dataset_dedup_cleansed.csv +3 -0
- sea_wiki_dedup_data/wiki_pam_20231101_dataset_dedup_cleansed.csv +3 -0
- sea_wiki_dedup_data/wiki_ta_20231101_dataset_dedup_cleansed.csv +3 -0
- sea_wiki_dedup_data/wiki_tl_20231101_dataset_dedup_cleansed.csv +3 -0
- sea_wiki_dedup_data/wiki_war_20231101_dataset_dedup_cleansed.csv +3 -0
- sea_wiki_raw_data/wiki_bcl_20231101_raw_dataset.csv +3 -0
- sea_wiki_raw_data/wiki_cbk-zam_20231101_raw_dataset.csv +3 -0
- sea_wiki_raw_data/wiki_ilo_20231101_raw_dataset.csv +3 -0
- sea_wiki_raw_data/wiki_pag_20231101_raw_dataset.csv +3 -0
- sea_wiki_raw_data/wiki_pam_20231101_raw_dataset.csv +3 -0
- sea_wiki_raw_data/wiki_ta_20231101_raw_dataset.csv +3 -0
- sea_wiki_raw_data/wiki_tl_20231101_raw_dataset.csv +3 -0
- sea_wiki_raw_data/wiki_war_20231101_raw_dataset.csv +3 -0
README.md
CHANGED
@@ -30,7 +30,7 @@ license:
|
|
30 |
multilinguality:
|
31 |
- multilingual
|
32 |
source_datasets:
|
33 |
-
- Wikipedia
|
34 |
task_categories:
|
35 |
- text-generation
|
36 |
- fill-mask
|
@@ -61,18 +61,27 @@ dataset_info:
|
|
61 |
- name: ban
|
62 |
num_bytes: 18198909
|
63 |
num_examples: 20987
|
|
|
|
|
|
|
64 |
- name: bjn
|
65 |
num_bytes: 6792259
|
66 |
num_examples: 10519
|
67 |
- name: bug
|
68 |
num_bytes: 3298561
|
69 |
num_examples: 15880
|
|
|
|
|
|
|
70 |
- name: gor
|
71 |
num_bytes: 6239133
|
72 |
num_examples: 15359
|
73 |
- name: id
|
74 |
num_bytes: 1118834498
|
75 |
num_examples: 665622
|
|
|
|
|
|
|
76 |
- name: jv
|
77 |
num_bytes: 72101470
|
78 |
num_examples: 73380
|
@@ -103,23 +112,38 @@ dataset_info:
|
|
103 |
- name: nia
|
104 |
num_bytes: 2153274
|
105 |
num_examples: 1714
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
- name: shn
|
107 |
num_bytes: 33754296
|
108 |
num_examples: 13945
|
109 |
- name: su
|
110 |
num_bytes: 47516268
|
111 |
num_examples: 61555
|
|
|
|
|
|
|
112 |
- name: tet
|
113 |
num_bytes: 1454499
|
114 |
num_examples: 1468
|
115 |
- name: th
|
116 |
num_bytes: 1012930269
|
117 |
num_examples: 159719
|
|
|
|
|
|
|
118 |
- name: vi
|
119 |
num_bytes: 1603057632
|
120 |
num_examples: 1288680
|
121 |
-
|
122 |
-
|
|
|
|
|
|
|
123 |
- config_name: seawiki_dedup_all
|
124 |
features:
|
125 |
- name: url
|
@@ -135,18 +159,27 @@ dataset_info:
|
|
135 |
- name: ban
|
136 |
num_bytes: 18025267
|
137 |
num_examples: 20611
|
|
|
|
|
|
|
138 |
- name: bjn
|
139 |
num_bytes: 6786207
|
140 |
num_examples: 10503
|
141 |
- name: bug
|
142 |
num_bytes: 2182435
|
143 |
num_examples: 9969
|
|
|
|
|
|
|
144 |
- name: gor
|
145 |
num_bytes: 6217480
|
146 |
num_examples: 15290
|
147 |
- name: id
|
148 |
num_bytes: 1117891512
|
149 |
num_examples: 662443
|
|
|
|
|
|
|
150 |
- name: jv
|
151 |
num_bytes: 71997517
|
152 |
num_examples: 73080
|
@@ -177,23 +210,38 @@ dataset_info:
|
|
177 |
- name: nia
|
178 |
num_bytes: 2153274
|
179 |
num_examples: 1714
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
- name: shn
|
181 |
num_bytes: 33616591
|
182 |
num_examples: 13662
|
183 |
- name: su
|
184 |
num_bytes: 47512744
|
185 |
num_examples: 61529
|
|
|
|
|
|
|
186 |
- name: tet
|
187 |
num_bytes: 1452151
|
188 |
num_examples: 1464
|
189 |
- name: th
|
190 |
num_bytes: 1012868861
|
191 |
num_examples: 159666
|
|
|
|
|
|
|
192 |
- name: vi
|
193 |
num_bytes: 1602828123
|
194 |
num_examples: 1287910
|
195 |
-
|
196 |
-
|
|
|
|
|
|
|
197 |
- config_name: seawiki_with_countries_all
|
198 |
features:
|
199 |
- name: url
|
@@ -203,6 +251,9 @@ dataset_info:
|
|
203 |
- name: text
|
204 |
dtype: string
|
205 |
splits:
|
|
|
|
|
|
|
206 |
- name: idn_ace
|
207 |
num_bytes: 4952102
|
208 |
num_examples: 13003
|
@@ -245,41 +296,71 @@ dataset_info:
|
|
245 |
- name: idn_tet
|
246 |
num_bytes: 1454499
|
247 |
num_examples: 1468
|
248 |
-
- name:
|
249 |
-
num_bytes:
|
250 |
-
num_examples:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
- name: mys_ms
|
252 |
num_bytes: 419662356
|
253 |
num_examples: 368628
|
254 |
-
- name:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
num_bytes: 419662356
|
256 |
num_examples: 368628
|
|
|
|
|
|
|
257 |
- name: tha_th
|
258 |
num_bytes: 1012930269
|
259 |
num_examples: 159719
|
260 |
-
- name:
|
261 |
-
num_bytes: 313370839
|
262 |
-
num_examples: 109310
|
263 |
-
- name: mmr_shn
|
264 |
-
num_bytes: 33754296
|
265 |
-
num_examples: 13945
|
266 |
-
- name: mmr_mnw
|
267 |
num_bytes: 47321734
|
268 |
num_examples: 3296
|
269 |
-
- name:
|
270 |
-
num_bytes:
|
271 |
-
num_examples:
|
272 |
-
- name: vnm_vi
|
273 |
-
num_bytes: 1603057632
|
274 |
-
num_examples: 1288680
|
275 |
-
- name: khm_km
|
276 |
-
num_bytes: 103146669
|
277 |
-
num_examples: 11994
|
278 |
- name: tls_tet
|
279 |
num_bytes: 1454499
|
280 |
num_examples: 1468
|
281 |
-
|
282 |
-
|
|
|
|
|
|
|
283 |
- config_name: seawiki_with_countries_dedup_all
|
284 |
features:
|
285 |
- name: url
|
@@ -289,6 +370,9 @@ dataset_info:
|
|
289 |
- name: text
|
290 |
dtype: string
|
291 |
splits:
|
|
|
|
|
|
|
292 |
- name: idn_ace
|
293 |
num_bytes: 4944916
|
294 |
num_examples: 12979
|
@@ -331,41 +415,71 @@ dataset_info:
|
|
331 |
- name: idn_tet
|
332 |
num_bytes: 1452151
|
333 |
num_examples: 1464
|
334 |
-
- name:
|
335 |
-
num_bytes:
|
336 |
-
num_examples:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
337 |
- name: mys_ms
|
338 |
num_bytes: 414783365
|
339 |
num_examples: 348045
|
340 |
-
- name:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
num_bytes: 414783365
|
342 |
num_examples: 348045
|
|
|
|
|
|
|
343 |
- name: tha_th
|
344 |
num_bytes: 1012868861
|
345 |
num_examples: 159666
|
346 |
-
- name:
|
347 |
-
num_bytes: 312990457
|
348 |
-
num_examples: 108819
|
349 |
-
- name: mmr_shn
|
350 |
-
num_bytes: 33616591
|
351 |
-
num_examples: 13662
|
352 |
-
- name: mmr_mnw
|
353 |
num_bytes: 47243333
|
354 |
num_examples: 3271
|
355 |
-
- name:
|
356 |
-
num_bytes:
|
357 |
-
num_examples:
|
358 |
-
- name: vnm_vi
|
359 |
-
num_bytes: 1602828123
|
360 |
-
num_examples: 1287910
|
361 |
-
- name: khm_km
|
362 |
-
num_bytes: 102698901
|
363 |
-
num_examples: 11466
|
364 |
- name: tls_tet
|
365 |
num_bytes: 1452151
|
366 |
num_examples: 1464
|
367 |
-
|
368 |
-
|
|
|
|
|
|
|
369 |
---
|
370 |
|
371 |
# **SEA Wikipedia Data Repository**
|
@@ -414,6 +528,7 @@ You may check the following tables to understand the current coverage of this da
|
|
414 |
| lao | Laos | [Wiki Link](https://en.wikipedia.org/wiki/Laos) |
|
415 |
| mmr | Myanmar | [Wiki Link](https://en.wikipedia.org/wiki/Myanmar) |
|
416 |
| mys | Malaysia | [Wiki Link](https://en.wikipedia.org/wiki/Malaysia) |
|
|
|
417 |
| sgp | Singapore | [Wiki Link](https://en.wikipedia.org/wiki/Singapore) |
|
418 |
| tha | Thailand | [Wiki Link](https://en.wikipedia.org/wiki/Thailand) |
|
419 |
| tls | East Timor | [Wiki Link](https://en.wikipedia.org/wiki/East_Timor) |
|
@@ -424,9 +539,13 @@ You may check the following tables to understand the current coverage of this da
|
|
424 |
| :---: | :---: | :---: | :--- | ---: | ---: |
|
425 |
| ace | Acehnese | idn | [Wiki Link](https://en.wikipedia.org/wiki/Acehnese_language) | 12904 | 4.64 |
|
426 |
| ban | Balinese | idn | [Wiki Link](https://en.wikipedia.org/wiki/Balinese_language) | 19837 | 16.56 |
|
427 |
-
| bjn | Banjarese | idn | [Wiki Link](https://en.wikipedia.org/wiki/Banjarese_language) |
|
|
|
428 |
| bug | Buginese | idn | [Wiki Link](https://en.wikipedia.org/wiki/Buginese_language) | 9793 | 1.98 |
|
|
|
|
|
429 |
| gor | Gorontalo | idn | [Wiki Link](https://en.wikipedia.org/wiki/Gorontalo_language) | 14514 | 5.71 |
|
|
|
430 |
| km | Khmer | khm | [Wiki Link](https://en.wikipedia.org/wiki/Khmer_language) | 11994 | 98.37 |
|
431 |
| id | Indonesian | idn | [Wiki Link](https://en.wikipedia.org/wiki/Indonesian_language) | 654287 | 1049.93 |
|
432 |
| jv | Javanese | idn | [Wiki Link](https://en.wikipedia.org/wiki/Javanese_language) | 72667 | 66.54 |
|
@@ -438,11 +557,16 @@ You may check the following tables to understand the current coverage of this da
|
|
438 |
| ms | Malay | mys, sgp, brn, idn | [Wiki Link](https://en.wikipedia.org/wiki/Malay_language) | 346186 | 391.43 |
|
439 |
| my | Burmese | mmr | [Wiki Link](https://en.wikipedia.org/wiki/Burmese_language) | 109310 | 298.85 |
|
440 |
| nia | Nias | idn | [Wiki Link](https://en.wikipedia.org/wiki/Nias_language) | 1650 | 1.85 |
|
|
|
|
|
441 |
| shn | Shan | mmr | [Wiki Link](https://en.wikipedia.org/wiki/Shan_language) | 13945 | 32.19 |
|
442 |
| su | Sundanese | idn | [Wiki Link](https://en.wikipedia.org/wiki/Sundanese_language) | 61494 | 45.21 |
|
|
|
443 |
| tet | Tetum | tls, idn | [Wiki Link](https://en.wikipedia.org/wiki/Tetum_language) | 1465 | 1.39 |
|
444 |
| th | Thai | tha | [Wiki Link](https://en.wikipedia.org/wiki/Thai_language) | 159719 | 966.00 |
|
|
|
445 |
| vi | Vietnamese | vnm | [Wiki Link](https://en.wikipedia.org/wiki/Vietnamese_language) | 1288680 | 1528.79 |
|
|
|
446 |
|
447 |
|
448 |
#### 3. Table of Token Statistics for Covered Languages
|
@@ -452,10 +576,13 @@ The token statistics is generated using ```tiktoken``` using encoder for GPT-4.
|
|
452 |
| :---: | ---: | ---: | ---: | ---: | :--- |
|
453 |
| ace | 1,370,829 | 105.61899992295247 | 3 | 9,659 | [38.0, 52.0, 54.0, 69.0, 76.0, 84.0, 90.0, 123.0, 126.0] |
|
454 |
| ban | 5,924,610 | 287.44893503469024 | 5 | 24,364 | [97.0, 144.0, 165.0, 187.0, 209.0, 245.0, 276.0, 315.0, 421.0] |
|
|
|
455 |
| bjn | 1,935,505 | 184.28115776444827 | 2 | 30,170 | [36.0, 38.0, 39.0, 40.0, 42.0, 51.0, 82.0, 151.0, 367.0] |
|
456 |
| bug | 553,693 | 55.54147858360919 | 1 | 13,951 | [31.0, 42.0, 43.0, 46.0, 48.0, 50.0, 52.0, 55.0, 57.0] |
|
|
|
457 |
| gor | 1,575,766 | 103.05860039241334 | 2 | 5,525 | [55.0, 58.0, 60.0, 62.0, 64.0, 66.0, 69.0, 75.0, 96.0] |
|
458 |
| id | 325,411,713 | 491.22975561670967 | 1 | 198,597 | [54.0, 93.0, 123.0, 145.0, 180.0, 226.0, 332.0, 543.0, 1068.0] |
|
|
|
459 |
| jv | 23,528,314 | 321.95284619594963 | 2 | 342,156 | [48.0, 60.0, 75.0, 88.0, 117.0, 175.0, 270.0, 420.0, 772.0] |
|
460 |
| km | 54,559,721 | 4,758.391854177568 | 1 | 1,110,771 | [160.0, 293.0, 452.0, 693.0, 1032.0, 1609.0, 2644.0, 4745.0, 9607.0] |
|
461 |
| lo | 9,395,636 | 1,918.6514192362672 | 3 | 107,154 | [134.0, 184.2, 285.0, 494.0, 658.0, 894.6, 1258.0, 1971.2, 4153.8] |
|
@@ -466,11 +593,16 @@ The token statistics is generated using ```tiktoken``` using encoder for GPT-4.
|
|
466 |
| ms | 121,343,673 | 348.64363228892813 | 1 | 68,545 | [32.0, 40.0, 49.0, 63.0, 105.0, 138.0, 216.0, 362.0, 788.0] |
|
467 |
| my | 189,439,447 | 1,740.8673761015998 | 10 | 1,376,658 | [164.0, 269.0, 350.0, 508.0, 559.0, 578.0, 605.0, 892.4, 3369.0] |
|
468 |
| nia | 795,527 | 464.134772462077 | 8 | 18,650 | [59.0, 61.0, 63.0, 65.0, 67.0, 86.0, 239.1, 623.4, 1249.7] |
|
|
|
|
|
469 |
| shn | 23,125,637 | 1,692.6977748499487 | 2 | 204,094 | [460.0, 480.0, 585.0, 679.0, 715.0, 740.0, 756.0, 780.0, 1580.9] |
|
470 |
| su | 14,710,124 | 239.07627297697022 | 1 | 99,456 | [41.0, 43.0, 45.0, 49.0, 70.0, 146.0, 216.0, 219.0, 419.0] |
|
|
|
471 |
| tet | 487,016 | 332.6612021857924 | 4 | 24,287 | [30.3, 47.0, 66.9, 101.0, 164.0, 177.0, 187.0, 248.6, 604.4] |
|
472 |
| th | 330,964,733 | 2,072.8566695476807 | 1 | 289,150 | [231.0, 390.0, 546.0, 727.0, 969.0, 1276.0, 1741.0, 2533.0, 4361.0] |
|
|
|
473 |
| vi | 546,481,258 | 424.3163404275143 | 3 | 246,463 | [46.0, 64.0, 71.0, 80.0, 86.0, 92.0, 120.0, 240.0, 824.0] |
|
|
|
474 |
|
475 |
Some other languages in SEA that are already exists its Wiki Index at Wikimedia might be missing from this list. Any lang update PR is greatly appreciated!
|
476 |
|
@@ -483,7 +615,7 @@ The data available in here are processed with following flows:
|
|
483 |
You may check to the script [_```extract_raw_wiki_data.py```_](https://huggingface.co/datasets/sabilmakbar/sea_wiki/blob/main/extract_raw_wiki_data.py) to understand its implementations, or you can adjust the bash provided in [_```extract_raw_wiki_data_sea.sh```_](https://huggingface.co/datasets/sabilmakbar/sea_wiki/blob/main/extract_raw_wiki_data_sea.sh) to extract it on your own.
|
484 |
|
485 |
### How do I extract new Wikipedia Dataset of SEA languages?
|
486 |
-
You may visit this [Wikipedia Dump Index](https://dumps.wikimedia.org/backup-index.html) to check any latest available data and this link [Wikipedia Language Coverage](https://meta.wikimedia.org/wiki/
|
487 |
|
488 |
### To replicate the whole dataset generation process ###
|
489 |
1. Set-up a new Python/Conda Environment (recommended Python version: 3.9.6 to 3.9.18 or 3.10.0 to 3.10.13) and install the requirements on ```requirements.txt``` use this codebase via ```pip install -r requirements.txt```.
|
|
|
30 |
multilinguality:
|
31 |
- multilingual
|
32 |
source_datasets:
|
33 |
+
- Wikipedia
|
34 |
task_categories:
|
35 |
- text-generation
|
36 |
- fill-mask
|
|
|
61 |
- name: ban
|
62 |
num_bytes: 18198909
|
63 |
num_examples: 20987
|
64 |
+
- name: bcl
|
65 |
+
num_bytes: 20258642
|
66 |
+
num_examples: 15743
|
67 |
- name: bjn
|
68 |
num_bytes: 6792259
|
69 |
num_examples: 10519
|
70 |
- name: bug
|
71 |
num_bytes: 3298561
|
72 |
num_examples: 15880
|
73 |
+
- name: cbk_zam
|
74 |
+
num_bytes: 2033238
|
75 |
+
num_examples: 3285
|
76 |
- name: gor
|
77 |
num_bytes: 6239133
|
78 |
num_examples: 15359
|
79 |
- name: id
|
80 |
num_bytes: 1118834498
|
81 |
num_examples: 665622
|
82 |
+
- name: ilo
|
83 |
+
num_bytes: 16719139
|
84 |
+
num_examples: 15371
|
85 |
- name: jv
|
86 |
num_bytes: 72101470
|
87 |
num_examples: 73380
|
|
|
112 |
- name: nia
|
113 |
num_bytes: 2153274
|
114 |
num_examples: 1714
|
115 |
+
- name: pag
|
116 |
+
num_bytes: 1370162
|
117 |
+
num_examples: 2665
|
118 |
+
- name: pam
|
119 |
+
num_bytes: 8218370
|
120 |
+
num_examples: 9006
|
121 |
- name: shn
|
122 |
num_bytes: 33754296
|
123 |
num_examples: 13945
|
124 |
- name: su
|
125 |
num_bytes: 47516268
|
126 |
num_examples: 61555
|
127 |
+
- name: ta
|
128 |
+
num_bytes: 809156746
|
129 |
+
num_examples: 160651
|
130 |
- name: tet
|
131 |
num_bytes: 1454499
|
132 |
num_examples: 1468
|
133 |
- name: th
|
134 |
num_bytes: 1012930269
|
135 |
num_examples: 159719
|
136 |
+
- name: tl
|
137 |
+
num_bytes: 85356818
|
138 |
+
num_examples: 45341
|
139 |
- name: vi
|
140 |
num_bytes: 1603057632
|
141 |
num_examples: 1288680
|
142 |
+
- name: war
|
143 |
+
num_bytes: 454304567
|
144 |
+
num_examples: 1266394
|
145 |
+
download_size: 6358317628
|
146 |
+
dataset_size: 6351100780
|
147 |
- config_name: seawiki_dedup_all
|
148 |
features:
|
149 |
- name: url
|
|
|
159 |
- name: ban
|
160 |
num_bytes: 18025267
|
161 |
num_examples: 20611
|
162 |
+
- name: bcl
|
163 |
+
num_bytes: 19977232
|
164 |
+
num_examples: 14079
|
165 |
- name: bjn
|
166 |
num_bytes: 6786207
|
167 |
num_examples: 10503
|
168 |
- name: bug
|
169 |
num_bytes: 2182435
|
170 |
num_examples: 9969
|
171 |
+
- name: cbk_zam
|
172 |
+
num_bytes: 1579651
|
173 |
+
num_examples: 2242
|
174 |
- name: gor
|
175 |
num_bytes: 6217480
|
176 |
num_examples: 15290
|
177 |
- name: id
|
178 |
num_bytes: 1117891512
|
179 |
num_examples: 662443
|
180 |
+
- name: ilo
|
181 |
+
num_bytes: 16719001
|
182 |
+
num_examples: 15369
|
183 |
- name: jv
|
184 |
num_bytes: 71997517
|
185 |
num_examples: 73080
|
|
|
210 |
- name: nia
|
211 |
num_bytes: 2153274
|
212 |
num_examples: 1714
|
213 |
+
- name: pag
|
214 |
+
num_bytes: 764869
|
215 |
+
num_examples: 1108
|
216 |
+
- name: pam
|
217 |
+
num_bytes: 8205723
|
218 |
+
num_examples: 8932
|
219 |
- name: shn
|
220 |
num_bytes: 33616591
|
221 |
num_examples: 13662
|
222 |
- name: su
|
223 |
num_bytes: 47512744
|
224 |
num_examples: 61529
|
225 |
+
- name: ta
|
226 |
+
num_bytes: 809061339
|
227 |
+
num_examples: 160580
|
228 |
- name: tet
|
229 |
num_bytes: 1452151
|
230 |
num_examples: 1464
|
231 |
- name: th
|
232 |
num_bytes: 1012868861
|
233 |
num_examples: 159666
|
234 |
+
- name: tl
|
235 |
+
num_bytes: 85286023
|
236 |
+
num_examples: 45121
|
237 |
- name: vi
|
238 |
num_bytes: 1602828123
|
239 |
num_examples: 1287910
|
240 |
+
- name: war
|
241 |
+
num_bytes: 454266479
|
242 |
+
num_examples: 1266204
|
243 |
+
download_size: 6347597222
|
244 |
+
dataset_size: 6340363195
|
245 |
- config_name: seawiki_with_countries_all
|
246 |
features:
|
247 |
- name: url
|
|
|
251 |
- name: text
|
252 |
dtype: string
|
253 |
splits:
|
254 |
+
- name: brn_ms
|
255 |
+
num_bytes: 419662356
|
256 |
+
num_examples: 368628
|
257 |
- name: idn_ace
|
258 |
num_bytes: 4952102
|
259 |
num_examples: 13003
|
|
|
296 |
- name: idn_tet
|
297 |
num_bytes: 1454499
|
298 |
num_examples: 1468
|
299 |
+
- name: khm_km
|
300 |
+
num_bytes: 103146669
|
301 |
+
num_examples: 11994
|
302 |
+
- name: lao_lo
|
303 |
+
num_bytes: 15240262
|
304 |
+
num_examples: 5014
|
305 |
+
- name: mmr_my
|
306 |
+
num_bytes: 313370839
|
307 |
+
num_examples: 109310
|
308 |
+
- name: mmr_shn
|
309 |
+
num_bytes: 33754296
|
310 |
+
num_examples: 13945
|
311 |
+
- name: mmr_mnw
|
312 |
+
num_bytes: 47321734
|
313 |
+
num_examples: 3296
|
314 |
- name: mys_ms
|
315 |
num_bytes: 419662356
|
316 |
num_examples: 368628
|
317 |
+
- name: mys_ta
|
318 |
+
num_bytes: 809156746
|
319 |
+
num_examples: 160651
|
320 |
+
- name: phl_war
|
321 |
+
num_bytes: 454304567
|
322 |
+
num_examples: 1266394
|
323 |
+
- name: phl_tl
|
324 |
+
num_bytes: 85356818
|
325 |
+
num_examples: 45341
|
326 |
+
- name: phl_ilo
|
327 |
+
num_bytes: 16719139
|
328 |
+
num_examples: 15371
|
329 |
+
- name: phl_bcl
|
330 |
+
num_bytes: 20258642
|
331 |
+
num_examples: 15743
|
332 |
+
- name: phl_pam
|
333 |
+
num_bytes: 8218370
|
334 |
+
num_examples: 9006
|
335 |
+
- name: phl_cbk_zam
|
336 |
+
num_bytes: 2033238
|
337 |
+
num_examples: 3285
|
338 |
+
- name: phl_pag
|
339 |
+
num_bytes: 1370162
|
340 |
+
num_examples: 2665
|
341 |
+
- name: sgp_ms
|
342 |
num_bytes: 419662356
|
343 |
num_examples: 368628
|
344 |
+
- name: sgp_ta
|
345 |
+
num_bytes: 809156746
|
346 |
+
num_examples: 160651
|
347 |
- name: tha_th
|
348 |
num_bytes: 1012930269
|
349 |
num_examples: 159719
|
350 |
+
- name: tha_mnw
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
num_bytes: 47321734
|
352 |
num_examples: 3296
|
353 |
+
- name: tha_shn
|
354 |
+
num_bytes: 33754296
|
355 |
+
num_examples: 13945
|
|
|
|
|
|
|
|
|
|
|
|
|
356 |
- name: tls_tet
|
357 |
num_bytes: 1454499
|
358 |
num_examples: 1468
|
359 |
+
- name: vnm_vi
|
360 |
+
num_bytes: 1603057632
|
361 |
+
num_examples: 1288680
|
362 |
+
download_size: 6358317628
|
363 |
+
dataset_size: 8501775123
|
364 |
- config_name: seawiki_with_countries_dedup_all
|
365 |
features:
|
366 |
- name: url
|
|
|
370 |
- name: text
|
371 |
dtype: string
|
372 |
splits:
|
373 |
+
- name: brn_ms
|
374 |
+
num_bytes: 414783365
|
375 |
+
num_examples: 348045
|
376 |
- name: idn_ace
|
377 |
num_bytes: 4944916
|
378 |
num_examples: 12979
|
|
|
415 |
- name: idn_tet
|
416 |
num_bytes: 1452151
|
417 |
num_examples: 1464
|
418 |
+
- name: khm_km
|
419 |
+
num_bytes: 102698901
|
420 |
+
num_examples: 11466
|
421 |
+
- name: lao_lo
|
422 |
+
num_bytes: 14908444
|
423 |
+
num_examples: 4897
|
424 |
+
- name: mmr_my
|
425 |
+
num_bytes: 312990457
|
426 |
+
num_examples: 108819
|
427 |
+
- name: mmr_shn
|
428 |
+
num_bytes: 33616591
|
429 |
+
num_examples: 13662
|
430 |
+
- name: mmr_mnw
|
431 |
+
num_bytes: 47243333
|
432 |
+
num_examples: 3271
|
433 |
- name: mys_ms
|
434 |
num_bytes: 414783365
|
435 |
num_examples: 348045
|
436 |
+
- name: mys_ta
|
437 |
+
num_bytes: 809061339
|
438 |
+
num_examples: 160580
|
439 |
+
- name: phl_war
|
440 |
+
num_bytes: 454266479
|
441 |
+
num_examples: 1266204
|
442 |
+
- name: phl_tl
|
443 |
+
num_bytes: 85286023
|
444 |
+
num_examples: 45121
|
445 |
+
- name: phl_ilo
|
446 |
+
num_bytes: 16719001
|
447 |
+
num_examples: 15369
|
448 |
+
- name: phl_bcl
|
449 |
+
num_bytes: 19977232
|
450 |
+
num_examples: 14079
|
451 |
+
- name: phl_pam
|
452 |
+
num_bytes: 8205723
|
453 |
+
num_examples: 8932
|
454 |
+
- name: phl_cbk_zam
|
455 |
+
num_bytes: 1579651
|
456 |
+
num_examples: 2242
|
457 |
+
- name: phl_pag
|
458 |
+
num_bytes: 764869
|
459 |
+
num_examples: 1108
|
460 |
+
- name: sgp_ms
|
461 |
num_bytes: 414783365
|
462 |
num_examples: 348045
|
463 |
+
- name: sgp_ta
|
464 |
+
num_bytes: 809061339
|
465 |
+
num_examples: 160580
|
466 |
- name: tha_th
|
467 |
num_bytes: 1012868861
|
468 |
num_examples: 159666
|
469 |
+
- name: tha_mnw
|
|
|
|
|
|
|
|
|
|
|
|
|
470 |
num_bytes: 47243333
|
471 |
num_examples: 3271
|
472 |
+
- name: tha_shn
|
473 |
+
num_bytes: 33616591
|
474 |
+
num_examples: 13662
|
|
|
|
|
|
|
|
|
|
|
|
|
475 |
- name: tls_tet
|
476 |
num_bytes: 1452151
|
477 |
num_examples: 1464
|
478 |
+
- name: vnm_vi
|
479 |
+
num_bytes: 1602828123
|
480 |
+
num_examples: 1287910
|
481 |
+
download_size: 6347597222
|
482 |
+
dataset_size: 8476086704
|
483 |
---
|
484 |
|
485 |
# **SEA Wikipedia Data Repository**
|
|
|
528 |
| lao | Laos | [Wiki Link](https://en.wikipedia.org/wiki/Laos) |
|
529 |
| mmr | Myanmar | [Wiki Link](https://en.wikipedia.org/wiki/Myanmar) |
|
530 |
| mys | Malaysia | [Wiki Link](https://en.wikipedia.org/wiki/Malaysia) |
|
531 |
+
| phl | Philippines | [Wiki Link](https://en.wikipedia.org/wiki/Philippines) |
|
532 |
| sgp | Singapore | [Wiki Link](https://en.wikipedia.org/wiki/Singapore) |
|
533 |
| tha | Thailand | [Wiki Link](https://en.wikipedia.org/wiki/Thailand) |
|
534 |
| tls | East Timor | [Wiki Link](https://en.wikipedia.org/wiki/East_Timor) |
|
|
|
539 |
| :---: | :---: | :---: | :--- | ---: | ---: |
|
540 |
| ace | Acehnese | idn | [Wiki Link](https://en.wikipedia.org/wiki/Acehnese_language) | 12904 | 4.64 |
|
541 |
| ban | Balinese | idn | [Wiki Link](https://en.wikipedia.org/wiki/Balinese_language) | 19837 | 16.56 |
|
542 |
+
| bjn | Banjarese | idn | [Wiki Link](https://en.wikipedia.org/wiki/Banjarese_language) | 10437 | 6.35 |
|
543 |
+
| bcl | Central Bicolano | phl | [Wiki Link](https://en.wikipedia.org/wiki/Banjarese_language) | 15743 | 19.32 |
|
544 |
| bug | Buginese | idn | [Wiki Link](https://en.wikipedia.org/wiki/Buginese_language) | 9793 | 1.98 |
|
545 |
+
| ceb | Cebuano | phl | [Wiki Link](https://en.wikipedia.org/wiki/Central_Bicolano_language) | *Not Supported Yet* | *Not Supported Yet* |
|
546 |
+
| cbk (ISO 639-3) <br> cbk_zam (WikiMedia) | Zamboanga Chavacano/Chavacano | phl | [Wiki Link](https://en.wikipedia.org/wiki/Chavacano) | 3285 | 1.94 |
|
547 |
| gor | Gorontalo | idn | [Wiki Link](https://en.wikipedia.org/wiki/Gorontalo_language) | 14514 | 5.71 |
|
548 |
+
| ilo | Ilokano | phl | [Wiki Link](https://en.wikipedia.org/wiki/Ilocano_language) | 15371 | 15.94 |
|
549 |
| km | Khmer | khm | [Wiki Link](https://en.wikipedia.org/wiki/Khmer_language) | 11994 | 98.37 |
|
550 |
| id | Indonesian | idn | [Wiki Link](https://en.wikipedia.org/wiki/Indonesian_language) | 654287 | 1049.93 |
|
551 |
| jv | Javanese | idn | [Wiki Link](https://en.wikipedia.org/wiki/Javanese_language) | 72667 | 66.54 |
|
|
|
557 |
| ms | Malay | mys, sgp, brn, idn | [Wiki Link](https://en.wikipedia.org/wiki/Malay_language) | 346186 | 391.43 |
|
558 |
| my | Burmese | mmr | [Wiki Link](https://en.wikipedia.org/wiki/Burmese_language) | 109310 | 298.85 |
|
559 |
| nia | Nias | idn | [Wiki Link](https://en.wikipedia.org/wiki/Nias_language) | 1650 | 1.85 |
|
560 |
+
| pag | Pangasinan | phl | [Wiki Link](https://en.wikipedia.org/wiki/Pangasinan_language) | 2665 | 1.31 |
|
561 |
+
| pam | Kapampangan | phl | [Wiki Link](https://en.wikipedia.org/wiki/Kapampangan_language) | 9006 | 7.84 |
|
562 |
| shn | Shan | mmr | [Wiki Link](https://en.wikipedia.org/wiki/Shan_language) | 13945 | 32.19 |
|
563 |
| su | Sundanese | idn | [Wiki Link](https://en.wikipedia.org/wiki/Sundanese_language) | 61494 | 45.21 |
|
564 |
+
| ta | Tamil | mys, sgp | [Wiki Link](https://en.wikipedia.org/wiki/Tamil_language) | 160651 | 0.15 |
|
565 |
| tet | Tetum | tls, idn | [Wiki Link](https://en.wikipedia.org/wiki/Tetum_language) | 1465 | 1.39 |
|
566 |
| th | Thai | tha | [Wiki Link](https://en.wikipedia.org/wiki/Thai_language) | 159719 | 966.00 |
|
567 |
+
| tl | Tagalog | phl | [Wiki Link](https://en.wikipedia.org/wiki/Tagalog_language) | 45341 | 81.42 |
|
568 |
| vi | Vietnamese | vnm | [Wiki Link](https://en.wikipedia.org/wiki/Vietnamese_language) | 1288680 | 1528.79 |
|
569 |
+
| war | Waray | phl | [Wiki Link](https://en.wikipedia.org/wiki/Waray_language) | 1266394 | 433.26 |
|
570 |
|
571 |
|
572 |
#### 3. Table of Token Statistics for Covered Languages
|
|
|
576 |
| :---: | ---: | ---: | ---: | ---: | :--- |
|
577 |
| ace | 1,370,829 | 105.61899992295247 | 3 | 9,659 | [38.0, 52.0, 54.0, 69.0, 76.0, 84.0, 90.0, 123.0, 126.0] |
|
578 |
| ban | 5,924,610 | 287.44893503469024 | 5 | 24,364 | [97.0, 144.0, 165.0, 187.0, 209.0, 245.0, 276.0, 315.0, 421.0] |
|
579 |
+
| bcl | 6,234,838 | 442.8466510405569 | 2 | 54,049 | [55.0, 95.0, 143.0, 179.0, 226.0, 304.0, 419.0, 587.0, 917.2] |
|
580 |
| bjn | 1,935,505 | 184.28115776444827 | 2 | 30,170 | [36.0, 38.0, 39.0, 40.0, 42.0, 51.0, 82.0, 151.0, 367.0] |
|
581 |
| bug | 553,693 | 55.54147858360919 | 1 | 13,951 | [31.0, 42.0, 43.0, 46.0, 48.0, 50.0, 52.0, 55.0, 57.0] |
|
582 |
+
| cbk_zam | 402,703 | 179.6177520071365 | 2 | 6,494 | [35.0, 41.2, 56.0, 69.0, 90.0, 120.0, 138.0, 155.0, 294.9] |
|
583 |
| gor | 1,575,766 | 103.05860039241334 | 2 | 5,525 | [55.0, 58.0, 60.0, 62.0, 64.0, 66.0, 69.0, 75.0, 96.0] |
|
584 |
| id | 325,411,713 | 491.22975561670967 | 1 | 198,597 | [54.0, 93.0, 123.0, 145.0, 180.0, 226.0, 332.0, 543.0, 1068.0] |
|
585 |
+
| ilo | 5,593,491 | 363.94632051532307 | 17 | 18,202 | [59.0, 80.0, 91.0, 111.0, 152.0, 213.0, 303.0, 461.0, 856.0] |
|
586 |
| jv | 23,528,314 | 321.95284619594963 | 2 | 342,156 | [48.0, 60.0, 75.0, 88.0, 117.0, 175.0, 270.0, 420.0, 772.0] |
|
587 |
| km | 54,559,721 | 4,758.391854177568 | 1 | 1,110,771 | [160.0, 293.0, 452.0, 693.0, 1032.0, 1609.0, 2644.0, 4745.0, 9607.0] |
|
588 |
| lo | 9,395,636 | 1,918.6514192362672 | 3 | 107,154 | [134.0, 184.2, 285.0, 494.0, 658.0, 894.6, 1258.0, 1971.2, 4153.8] |
|
|
|
593 |
| ms | 121,343,673 | 348.64363228892813 | 1 | 68,545 | [32.0, 40.0, 49.0, 63.0, 105.0, 138.0, 216.0, 362.0, 788.0] |
|
594 |
| my | 189,439,447 | 1,740.8673761015998 | 10 | 1,376,658 | [164.0, 269.0, 350.0, 508.0, 559.0, 578.0, 605.0, 892.4, 3369.0] |
|
595 |
| nia | 795,527 | 464.134772462077 | 8 | 18,650 | [59.0, 61.0, 63.0, 65.0, 67.0, 86.0, 239.1, 623.4, 1249.7] |
|
596 |
+
| pag | 222,366 | 200.6913357400722 | 5 | 10,143 | [31.0, 51.0, 73.0, 110.0, 118.0, 120.0, 127.0, 181.0, 355.8] |
|
597 |
+
| pam | 2,269,091 | 254.04064039408868 | 1 | 14,912 | [38.0, 56.0, 78.0, 108.0, 121.0, 150.0, 193.0, 289.0, 525.8] |
|
598 |
| shn | 23,125,637 | 1,692.6977748499487 | 2 | 204,094 | [460.0, 480.0, 585.0, 679.0, 715.0, 740.0, 756.0, 780.0, 1580.9] |
|
599 |
| su | 14,710,124 | 239.07627297697022 | 1 | 99,456 | [41.0, 43.0, 45.0, 49.0, 70.0, 146.0, 216.0, 219.0, 419.0] |
|
600 |
+
| ta | 376,043,508 | 2,341.782961763607 | 15 | 177,054 | [543.0, 700.0, 824.0, 1001.0, 1153.0, 1465.0, 1992.0, 2911.0, 4652.0] |
|
601 |
| tet | 487,016 | 332.6612021857924 | 4 | 24,287 | [30.3, 47.0, 66.9, 101.0, 164.0, 177.0, 187.0, 248.6, 604.4] |
|
602 |
| th | 330,964,733 | 2,072.8566695476807 | 1 | 289,150 | [231.0, 390.0, 546.0, 727.0, 969.0, 1276.0, 1741.0, 2533.0, 4361.0] |
|
603 |
+
| tl | 27,789,730 | 615.8934864032269 | 7 | 60,728 | [73.0, 116.0, 161.0, 214.0, 281.0, 360.0, 465.0, 666.0, 1136.0] |
|
604 |
| vi | 546,481,258 | 424.3163404275143 | 3 | 246,463 | [46.0, 64.0, 71.0, 80.0, 86.0, 92.0, 120.0, 240.0, 824.0] |
|
605 |
+
| war | 117,438,315 | 92.74833676090108 | 1 | 25,689 | [60.0, 77.0, 81.0, 84.0, 87.0, 90.0, 94.0, 99.0, 110.0] |`
|
606 |
|
607 |
Some other languages in SEA that are already exists its Wiki Index at Wikimedia might be missing from this list. Any lang update PR is greatly appreciated!
|
608 |
|
|
|
615 |
You may check to the script [_```extract_raw_wiki_data.py```_](https://huggingface.co/datasets/sabilmakbar/sea_wiki/blob/main/extract_raw_wiki_data.py) to understand its implementations, or you can adjust the bash provided in [_```extract_raw_wiki_data_sea.sh```_](https://huggingface.co/datasets/sabilmakbar/sea_wiki/blob/main/extract_raw_wiki_data_sea.sh) to extract it on your own.
|
616 |
|
617 |
### How do I extract new Wikipedia Dataset of SEA languages?
|
618 |
+
You may visit this [Wikipedia Dump Index](https://dumps.wikimedia.org/backup-index.html) to check any latest available data and this link [Wikipedia Language Coverage](https://meta.wikimedia.org/wiki/List_of_Wikipedias_by_country) to map into any languages that you're wanting to extract. Please note that this dataset is extensible to any languages of your choice.
|
619 |
|
620 |
### To replicate the whole dataset generation process ###
|
621 |
1. Set-up a new Python/Conda Environment (recommended Python version: 3.9.6 to 3.9.18 or 3.10.0 to 3.10.13) and install the requirements on ```requirements.txt``` use this codebase via ```pip install -r requirements.txt```.
|
count_data_stats.py
CHANGED
@@ -16,7 +16,8 @@ def cnt_token_in_hf_wiki_dset(data):
|
|
16 |
|
17 |
if __name__ == "__main__":
|
18 |
|
19 |
-
dataset
|
|
|
20 |
|
21 |
encoding = tiktoken.encoding_for_model('gpt-4')
|
22 |
|
|
|
16 |
|
17 |
if __name__ == "__main__":
|
18 |
|
19 |
+
#this will refer to its local version of dataset loader script, not the HF repo ones
|
20 |
+
dataset = load_dataset("sea_wiki.py")
|
21 |
|
22 |
encoding = tiktoken.encoding_for_model('gpt-4')
|
23 |
|
dedup_raw_wiki_data_sea.sh
CHANGED
@@ -2,15 +2,16 @@
|
|
2 |
|
3 |
# all available lang codes in SEA local-languages or linguistically-related to following countries in SEA:
|
4 |
# Indonesia: "ace" (Acehnese), "ban" (Balinese), "bjn" (Banjarese), "bug" (Buginese), "gor" (Gorontalo), "id" (Indonesian), "jv" (Javanese), "mad" (Madurese), "map-bms" (Banyumasan, Dialect of Javanese), "min" (Minangkabau), "ms" (Malay), "nia" (Nias), "su" (Sundanese), "tet" (Tetum)
|
5 |
-
# Singapore: "ms" (Malay)
|
6 |
-
# Malaysia: "ms" (Malay)
|
7 |
# Brunei: "ms" (Malay)
|
8 |
-
# Thailand: "th" (Thai)
|
9 |
-
# Myanmar: "my" (Burmese), "
|
10 |
# Laos: "lo" (Lao)
|
11 |
# Vietnam: "vi" (Vietnamese)
|
12 |
# Cambodia: "km" (Khmer)
|
13 |
# East Timor: "tet" (Tetum)
|
|
|
14 |
|
15 |
#params of executions
|
16 |
folder_dir_to_save=./sea_wiki_dedup_data
|
|
|
2 |
|
3 |
# all available lang codes in SEA local-languages or linguistically-related to following countries in SEA:
|
4 |
# Indonesia: "ace" (Acehnese), "ban" (Balinese), "bjn" (Banjarese), "bug" (Buginese), "gor" (Gorontalo), "id" (Indonesian), "jv" (Javanese), "mad" (Madurese), "map-bms" (Banyumasan, Dialect of Javanese), "min" (Minangkabau), "ms" (Malay), "nia" (Nias), "su" (Sundanese), "tet" (Tetum)
|
5 |
+
# Singapore: "ms" (Malay), "ta" (Tamil)
|
6 |
+
# Malaysia: "ms" (Malay), "ta" (Tamil)
|
7 |
# Brunei: "ms" (Malay)
|
8 |
+
# Thailand: "mnw" (Mon), "shn" (Shan), "th" (Thai)
|
9 |
+
# Myanmar: "my" (Burmese), "mnw" (Mon), "shn" (Shan)
|
10 |
# Laos: "lo" (Lao)
|
11 |
# Vietnam: "vi" (Vietnamese)
|
12 |
# Cambodia: "km" (Khmer)
|
13 |
# East Timor: "tet" (Tetum)
|
14 |
+
# Philippines: "bcl" (Central Bicolano), "cbk-zam" (Chavacano), "ceb" (Cebuano), "ilo" (Ilokano), "pag" (Pangasinan), "pam" (Kapampangan), "tl" (Tagalog), "war" (Waray)
|
15 |
|
16 |
#params of executions
|
17 |
folder_dir_to_save=./sea_wiki_dedup_data
|
extract_raw_wiki_data_sea.sh
CHANGED
@@ -2,20 +2,21 @@
|
|
2 |
|
3 |
# all available lang codes in SEA local-languages or linguistically-related to following countries in SEA:
|
4 |
# Indonesia: "ace" (Acehnese), "ban" (Balinese), "bjn" (Banjarese), "bug" (Buginese), "gor" (Gorontalo), "id" (Indonesian), "jv" (Javanese), "mad" (Madurese), "map-bms" (Banyumasan, Dialect of Javanese), "min" (Minangkabau), "ms" (Malay), "nia" (Nias), "su" (Sundanese), "tet" (Tetum)
|
5 |
-
# Singapore: "ms" (Malay)
|
6 |
-
# Malaysia: "ms" (Malay)
|
7 |
# Brunei: "ms" (Malay)
|
8 |
-
# Thailand: "th" (Thai)
|
9 |
-
# Myanmar: "my" (Burmese), "
|
10 |
# Laos: "lo" (Lao)
|
11 |
# Vietnam: "vi" (Vietnamese)
|
12 |
# Cambodia: "km" (Khmer)
|
13 |
# East Timor: "tet" (Tetum)
|
|
|
14 |
|
15 |
#params of executions
|
16 |
date_ver=20231101
|
17 |
folder_dir_to_save=./sea_wiki_raw_data
|
18 |
-
lang_list=(ace ban bjn bug gor id km lo
|
19 |
|
20 |
|
21 |
#main executions
|
|
|
2 |
|
3 |
# all available lang codes in SEA local-languages or linguistically-related to following countries in SEA:
|
4 |
# Indonesia: "ace" (Acehnese), "ban" (Balinese), "bjn" (Banjarese), "bug" (Buginese), "gor" (Gorontalo), "id" (Indonesian), "jv" (Javanese), "mad" (Madurese), "map-bms" (Banyumasan, Dialect of Javanese), "min" (Minangkabau), "ms" (Malay), "nia" (Nias), "su" (Sundanese), "tet" (Tetum)
|
5 |
+
# Singapore: "ms" (Malay), "ta" (Tamil)
|
6 |
+
# Malaysia: "ms" (Malay), "ta" (Tamil)
|
7 |
# Brunei: "ms" (Malay)
|
8 |
+
# Thailand: "mnw" (Mon), "shn" (Shan), "th" (Thai)
|
9 |
+
# Myanmar: "my" (Burmese), "mnw" (Mon), "shn" (Shan)
|
10 |
# Laos: "lo" (Lao)
|
11 |
# Vietnam: "vi" (Vietnamese)
|
12 |
# Cambodia: "km" (Khmer)
|
13 |
# East Timor: "tet" (Tetum)
|
14 |
+
# Philippines: "bcl" (Central Bicolano), "cbk-zam" (Chavacano), "ceb" (Cebuano), "ilo" (Ilokano), "pag" (Pangasinan), "pam" (Kapampangan), "tl" (Tagalog), "war" (Waray)
|
15 |
|
16 |
#params of executions
|
17 |
date_ver=20231101
|
18 |
folder_dir_to_save=./sea_wiki_raw_data
|
19 |
+
lang_list=(ace ban bcl bjn bug cbk-zam ceb gor id ilo jv km lo mad map-bms min mnw ms my nia pag pam shn su tet ta th tl vi war)
|
20 |
|
21 |
|
22 |
#main executions
|
requirements.txt
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
-
datasets==2.14.6
|
2 |
-
pandas==2.1.0
|
3 |
-
fsspec==2023.9.1
|
4 |
apache-beam==2.50.0
|
|
|
5 |
dill~=0.3.1.0
|
|
|
|
|
|
|
6 |
numpy==1.24.4
|
|
|
|
|
|
|
|
|
|
|
|
1 |
apache-beam==2.50.0
|
2 |
+
datasets==2.14.6
|
3 |
dill~=0.3.1.0
|
4 |
+
fsspec==2023.9.1
|
5 |
+
google-cloud-bigquery-storage==2.22.0
|
6 |
+
mwparserfromhell==0.6.5
|
7 |
numpy==1.24.4
|
8 |
+
pandas==2.1.0
|
9 |
+
tiktoken==0.5.1
|
sea_wiki.py
CHANGED
@@ -46,16 +46,18 @@ _AVAILABLE_DUMP_VERSION_DATE = ["20231101"]
|
|
46 |
# alpha-3 codes: https://www.iban.com/country-codes
|
47 |
# ISO-639 codes: https://iso639-3.sil.org/code_tables/639/data
|
48 |
_COUNTRY_TO_LANG_MAPPER = {
|
49 |
-
"idn": ["ace", "ban", "bjn", "bug", "gor", "id", "jv", "mad", "map-bms", "min", "ms", "nia", "su", "tet"],
|
50 |
-
"sgp": ["ms"],
|
51 |
-
"mys": ["ms"],
|
52 |
"brn": ["ms"],
|
53 |
-
"
|
54 |
-
"mmr": ["my", "shn", "mnw"],
|
55 |
-
"lao": ["lo"],
|
56 |
-
"vnm": ["vi"],
|
57 |
"khm": ["km"],
|
58 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
_AVAILABLE_DUMP_LANGUAGES = reduce(np.union1d, list(_COUNTRY_TO_LANG_MAPPER.values()))
|
61 |
|
@@ -106,6 +108,8 @@ class SEAWikiConfig(datasets.BuilderConfig):
|
|
106 |
|
107 |
super(SEAWikiConfig, self).__init__(**kwargs)
|
108 |
self.features = features
|
|
|
|
|
109 |
|
110 |
# prioritize kwargs data_url
|
111 |
if data_url is not None:
|
|
|
46 |
# alpha-3 codes: https://www.iban.com/country-codes
|
47 |
# ISO-639 codes: https://iso639-3.sil.org/code_tables/639/data
|
48 |
_COUNTRY_TO_LANG_MAPPER = {
|
|
|
|
|
|
|
49 |
"brn": ["ms"],
|
50 |
+
"idn": ["ace", "ban", "bjn", "bug", "gor", "id", "jv", "mad", "map-bms", "min", "ms", "nia", "su", "tet"],
|
|
|
|
|
|
|
51 |
"khm": ["km"],
|
52 |
+
"lao": ["lo"],
|
53 |
+
"mmr": ["my", "shn", "mnw"],
|
54 |
+
"mys": ["ms", "ta"],
|
55 |
+
#"ceb" lang is available, but not supported yet due to size
|
56 |
+
"phl": ["war", "tl", "ilo", "bcl", "pam", "cbk-zam", "pag"],
|
57 |
+
"sgp": ["ms", "ta"],
|
58 |
+
"tha": ["th", "mnw", "shn"],
|
59 |
+
"tls": ["tet"],
|
60 |
+
"vnm": ["vi"]}
|
61 |
|
62 |
_AVAILABLE_DUMP_LANGUAGES = reduce(np.union1d, list(_COUNTRY_TO_LANG_MAPPER.values()))
|
63 |
|
|
|
108 |
|
109 |
super(SEAWikiConfig, self).__init__(**kwargs)
|
110 |
self.features = features
|
111 |
+
self.lang = lang
|
112 |
+
self.country = country
|
113 |
|
114 |
# prioritize kwargs data_url
|
115 |
if data_url is not None:
|
sea_wiki_dedup_data/wiki_bcl_20231101_dataset_dedup_cleansed.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:31578e60c6811f9649ffe5250da492faf427c057183b1361d9aebf7e9150b93e
|
3 |
+
size 19988184
|
sea_wiki_dedup_data/wiki_cbk-zam_20231101_dataset_dedup_cleansed.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e089c0accfbb22e26567995e4341b4f5c0756ef3598c5966a624922af77ce9f0
|
3 |
+
size 1578089
|
sea_wiki_dedup_data/wiki_ilo_20231101_dataset_dedup_cleansed.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f95c04563bc1a824d29d6701e664b8b86535c8a148a3a453949441661e7bfe99
|
3 |
+
size 16778313
|
sea_wiki_dedup_data/wiki_pag_20231101_dataset_dedup_cleansed.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2bc9b5c45ddbf2288944abf5bc1ffecb0c3ba28fdd28db335031cf6ec52c4f6b
|
3 |
+
size 764394
|
sea_wiki_dedup_data/wiki_pam_20231101_dataset_dedup_cleansed.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d4600cf6211b6811a46d6099c411b95ca3125c8bc89f5a86855c43205a1520e0
|
3 |
+
size 8201263
|
sea_wiki_dedup_data/wiki_ta_20231101_dataset_dedup_cleansed.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:15fc78ac817f48d7a1dcc64c79899b5b72298fd0b0ab36d20bc563723893050c
|
3 |
+
size 809226177
|
sea_wiki_dedup_data/wiki_tl_20231101_dataset_dedup_cleansed.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:da839fddd11bf83ca2f7753158d6bcfcfeb15c16c03c48cb8406507c63eafc71
|
3 |
+
size 85401957
|
sea_wiki_dedup_data/wiki_war_20231101_dataset_dedup_cleansed.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:aded12c5a684a269cd145eaa804aa3b114b4ef92380ff1bafd28e00e7a0226f2
|
3 |
+
size 454969793
|
sea_wiki_raw_data/wiki_bcl_20231101_raw_dataset.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d570ce3e706a46babbc86b266f33c650f058d2c7983b59bec8d8a4c7d2ef769b
|
3 |
+
size 20264334
|
sea_wiki_raw_data/wiki_cbk-zam_20231101_raw_dataset.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5e601f8dec698f4e28233c9d46964438a211959f6ca7e6f94ec277b9afc108a0
|
3 |
+
size 2031031
|
sea_wiki_raw_data/wiki_ilo_20231101_raw_dataset.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f45dbf6257fb2bc19bd40f653f46beb66aee4d3f594edd03125ea475074d658d
|
3 |
+
size 16778449
|
sea_wiki_raw_data/wiki_pag_20231101_raw_dataset.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0b36221aad991e2e95e7bacfc7816632fbc57d6873ee22e03e5f7a0679bccfaa
|
3 |
+
size 1367419
|
sea_wiki_raw_data/wiki_pam_20231101_raw_dataset.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:27209cdddefa5c352f62f53785abf95124d2ef1e08160e39d50cb64499b427dc
|
3 |
+
size 8213777
|
sea_wiki_raw_data/wiki_ta_20231101_raw_dataset.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1d97d300eb025f37df69249cae43a62a2533d5ff126319f173195c3a11879682
|
3 |
+
size 809321577
|
sea_wiki_raw_data/wiki_tl_20231101_raw_dataset.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:69e6097ce01fa12cdeb580493263eda968abaade1379d47d92f382df65639bd0
|
3 |
+
size 85472824
|
sea_wiki_raw_data/wiki_war_20231101_raw_dataset.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:98ec92f581598d6017aa1cee6b1943cf95f84d7d80f84a0cd4d1cc13652f23c3
|
3 |
+
size 455007963
|