Convert dataset to Parquet

#1
by s7d11 - opened
README.md CHANGED
@@ -1,21 +1,59 @@
1
  ---
2
  license: cc-by-nc-4.0
3
-
4
  configs:
5
  - config_name: default
6
  data_files:
7
  - split: bam
8
- path: "data/bam_output.json"
9
- - split: bom
10
- path: "data/bom_output.json"
11
  - split: boz
12
- path: "data/boz_output.json"
 
 
13
  - split: myk
14
- path: "data/myk_output.json"
15
  - split: sgh
16
- path: "data/sgh_output.json"
17
- - split: son
18
- path: "data/son_output.json"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  ---
20
 
21
  # ml.Datx - Noisy
 
1
  ---
2
  license: cc-by-nc-4.0
 
3
  configs:
4
  - config_name: default
5
  data_files:
6
  - split: bam
7
+ path: data/bam-*
 
 
8
  - split: boz
9
+ path: data/boz-*
10
+ - split: bom
11
+ path: data/bom-*
12
  - split: myk
13
+ path: data/myk-*
14
  - split: sgh
15
+ path: data/sgh-*
16
+ - split: snk
17
+ path: data/snk-*
18
+ dataset_info:
19
+ features:
20
+ - name: original
21
+ dtype: string
22
+ - name: cleaned
23
+ dtype: string
24
+ - name: space_insertion
25
+ dtype: string
26
+ - name: char_delete
27
+ dtype: string
28
+ - name: char_swap
29
+ dtype: string
30
+ - name: word_swap
31
+ dtype: string
32
+ - name: word_delete
33
+ dtype: string
34
+ - name: word_blank
35
+ dtype: string
36
+ splits:
37
+ - name: bam
38
+ num_bytes: 51067075
39
+ num_examples: 100000
40
+ - name: boz
41
+ num_bytes: 352249
42
+ num_examples: 254
43
+ - name: bom
44
+ num_bytes: 3097936
45
+ num_examples: 3085
46
+ - name: myk
47
+ num_bytes: 22544040
48
+ num_examples: 32916
49
+ - name: sgh
50
+ num_bytes: 39044992
51
+ num_examples: 56126
52
+ - name: snk
53
+ num_bytes: 2510973
54
+ num_examples: 8181
55
+ download_size: 85681755
56
+ dataset_size: 118617265
57
  ---
58
 
59
  # ml.Datx - Noisy
data/{bam_output.json → bam-00000-of-00001.parquet} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4e21c189b898e5f0bd643abf8110b08bf98f00c1d67a312c4ffda2cad3fc71ef
3
- size 84863456
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:585bfddd7ec9c9c662b928244a310ecba0b8d9cef5b427d7378c5c9938da47aa
3
+ size 38286690
data/{snk_output.json → bom-00000-of-00001.parquet} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0bd8cdbfd0fd7a7630a0218857f32ae750843c23c53872700255b3c26c7d3ed1
3
- size 4211052
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b7304423bb67c06e6a8be3a31be43409acc882a58315a96b9daa6bdcf3d7909
3
+ size 2102506
data/{boz_output.json → boz-00000-of-00001.parquet} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:590e0a7239656740e328e3b4515ab3e8044f00d594da892eb66616a63d64cf5a
3
- size 519418
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d150a2785fa8a7e4c211a5b14c3d0e0f5b8132564432682166eb198146180c8
3
+ size 224590
data/{myk_output.json → myk-00000-of-00001.parquet} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c23b07d857d7da54722d5393cbdd85bb452de4faf36ad999d5e7600fe49f0ee5
3
- size 33737274
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dc564c14be34164b29bf2ddb677a580af28f160a48489b983b93b04558253883
3
+ size 15056014
data/sgh-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e8828a36ed79f8fb79cd84a59a1bae9d9031de996852ba2a95d6927af8992538
3
+ size 28117466
data/sgh_output.json DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:83a480176b2419d526a95a97ff72543df127f0a7e082c13b6dff76a84a4fd1b4
3
- size 53492431
 
 
 
 
data/{bom_output.json → snk-00000-of-00001.parquet} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:af0eaaee8955120ed8d0c642181d72dc49cdfede2589e5c5210715e65d7e1acd
3
- size 4350318
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f653c9f61cb4b32208547b78d27ab22a63a6466a4e498731637eceb7700fdd19
3
+ size 1894489
mlnoisy.py DELETED
@@ -1,83 +0,0 @@
1
- """ml.sftwrs x RobotsMaliAI4D: mlgram dataset"""
2
-
3
- import os
4
- import json
5
- import datasets
6
- from datasets import load_dataset, DatasetBuilder
7
-
8
-
9
- _CITATION = """\n
10
- @misc{diarra2025mldatxnoisy,
11
- title={Malian Noisy Dataset for LLM Training},
12
- author={
13
- Sebastien Diarra and
14
- Nene Tangara and
15
- Seydou Diallo
16
- },
17
- url={https://mlsftwrs.ml/project/mldatx},
18
- year={2025}
19
- }
20
- """
21
-
22
- _DESCRIPTION = """
23
- ml.Datx Noisy Dataset is a noise based dataset of 6 Malian Languages
24
- """
25
- DATA_FILES = {
26
- "bam": "bam_output.json",
27
- "boz": "boz_output.json",
28
- "bom": "bom_output.json",
29
- "myk": "myk_output.json",
30
- "sgh": "sgh_output.json",
31
- "snk": "snk_output.json"
32
- }
33
- class MlDatxNoisy(datasets.GeneratorBasedBuilder):
34
- """ ml.Datx Noisy Dataset """
35
-
36
- VERSION = datasets.Version("0.0.1")
37
-
38
- def _info(self):
39
- return datasets.DatasetInfo(
40
- description=_DESCRIPTION,
41
- features=datasets.Features(
42
- {
43
- "original": datasets.Value("string"),
44
- "cleaned": datasets.Value("string"),
45
- "space_insertion": datasets.Value("string"),
46
- "char_delete": datasets.Value("string"),
47
- "char_swap": datasets.Value("string"),
48
- "word_swap": datasets.Value("string"),
49
- "word_delete": datasets.Value("string"),
50
- "word_blank": datasets.Value("string"),
51
- }
52
- ),
53
- citation=_CITATION,
54
- supervised_keys=None,
55
- homepage="https://mlsftwrs.ml/project/mldatx"
56
- )
57
-
58
- def _split_generators(self, dl_manager):
59
- data_dir = "data"
60
- return [
61
- datasets.SplitGenerator(
62
- name=i,
63
- gen_kwargs={
64
- "file_path": os.path.join(data_dir, DATA_FILES[i]),
65
- "split": i
66
- }) for i in DATA_FILES
67
- ]
68
-
69
- def _generate_examples(self, file_path, split):
70
- with open(file_path, "r") as file:
71
- data = json.load(file)
72
-
73
- for id_, example in enumerate(data):
74
- yield id_, {
75
- "original": example["original"],
76
- "cleaned": example["cleaned"],
77
- "space_insertion": example["space_insertion"],
78
- "char_delete": example["char_delete"],
79
- "char_swap": example["char_swap"],
80
- "word_swap": example["word_swap"],
81
- "word_delete": example["word_delete"],
82
- "word_blank": example["word_blank"]
83
- }