sumanthd commited on
Commit
0774c90
1 Parent(s): fdc2d78

Convert dataset to Parquet (#11)

Browse files

- Convert dataset to Parquet (e80787d1410e4bb94717522e80f01e7c4acc1741)
- Add 'bn' config data files (210d8e2b7570f8e037190ed9ff0be04cd3d0a43e)
- Add 'gu' config data files (08afa045063b10cca4b6dd5f8652830143fb66f5)
- Add 'hi' config data files (fd382590455e2233a0ac10d91a034cbbd02f3fe5)
- Add 'kn' config data files (ae8ade9afab6eb57b880a5ccefc33e2fdb5b3ac7)
- Add 'ml' config data files (075bfd96c7c7d5f647c56c1112a23fb107d0dd77)
- Add 'mr' config data files (5da7de3b12bbdce7072f78ff9bf13a10903b0058)
- Add 'or' config data files (aac25de7296649e20436c3e7ff6a44a571ba6060)
- Add 'pa' config data files (b226ff256f2b732711a6140b2e43fc006c89d1b4)
- Add 'ta' config data files (8ef121c849dfbc2771f50757f70764983dfe5cb5)
- Add 'te' config data files (067c5ad406461371f5f47e252de74fc6cb93f0b8)
- Delete loading script (ffcc5cd26b526e2ef56d155c35e8d36a73bc1a43)

README.md CHANGED
@@ -31,6 +31,206 @@ task_ids: []
31
  pretty_name: Samanantar
32
  tags:
33
  - conditional-text-generation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  ---
35
 
36
  # Dataset Card for Samanantar
 
31
  pretty_name: Samanantar
32
  tags:
33
  - conditional-text-generation
34
+ dataset_info:
35
+ - config_name: as
36
+ features:
37
+ - name: idx
38
+ dtype: int64
39
+ - name: src
40
+ dtype: string
41
+ - name: tgt
42
+ dtype: string
43
+ splits:
44
+ - name: train
45
+ num_bytes: 35548280
46
+ num_examples: 141227
47
+ download_size: 19404220
48
+ dataset_size: 35548280
49
+ - config_name: bn
50
+ features:
51
+ - name: idx
52
+ dtype: int64
53
+ - name: src
54
+ dtype: string
55
+ - name: tgt
56
+ dtype: string
57
+ splits:
58
+ - name: train
59
+ num_bytes: 2204943013
60
+ num_examples: 8604580
61
+ download_size: 1197993546
62
+ dataset_size: 2204943013
63
+ - config_name: gu
64
+ features:
65
+ - name: idx
66
+ dtype: int64
67
+ - name: src
68
+ dtype: string
69
+ - name: tgt
70
+ dtype: string
71
+ splits:
72
+ - name: train
73
+ num_bytes: 678219165
74
+ num_examples: 3067790
75
+ download_size: 370118693
76
+ dataset_size: 678219165
77
+ - config_name: hi
78
+ features:
79
+ - name: idx
80
+ dtype: int64
81
+ - name: src
82
+ dtype: string
83
+ - name: tgt
84
+ dtype: string
85
+ splits:
86
+ - name: train
87
+ num_bytes: 3598130651
88
+ num_examples: 10125706
89
+ download_size: 1916386168
90
+ dataset_size: 3598130651
91
+ - config_name: kn
92
+ features:
93
+ - name: idx
94
+ dtype: int64
95
+ - name: src
96
+ dtype: string
97
+ - name: tgt
98
+ dtype: string
99
+ splits:
100
+ - name: train
101
+ num_bytes: 908044345
102
+ num_examples: 4093524
103
+ download_size: 483451767
104
+ dataset_size: 908044345
105
+ - config_name: ml
106
+ features:
107
+ - name: idx
108
+ dtype: int64
109
+ - name: src
110
+ dtype: string
111
+ - name: tgt
112
+ dtype: string
113
+ splits:
114
+ - name: train
115
+ num_bytes: 1545010918
116
+ num_examples: 5924426
117
+ download_size: 784891308
118
+ dataset_size: 1545010918
119
+ - config_name: mr
120
+ features:
121
+ - name: idx
122
+ dtype: int64
123
+ - name: src
124
+ dtype: string
125
+ - name: tgt
126
+ dtype: string
127
+ splits:
128
+ - name: train
129
+ num_bytes: 929465791
130
+ num_examples: 3627480
131
+ download_size: 487825355
132
+ dataset_size: 929465791
133
+ - config_name: or
134
+ features:
135
+ - name: idx
136
+ dtype: int64
137
+ - name: src
138
+ dtype: string
139
+ - name: tgt
140
+ dtype: string
141
+ splits:
142
+ - name: train
143
+ num_bytes: 265698932
144
+ num_examples: 998228
145
+ download_size: 136203687
146
+ dataset_size: 265698932
147
+ - config_name: pa
148
+ features:
149
+ - name: idx
150
+ dtype: int64
151
+ - name: src
152
+ dtype: string
153
+ - name: tgt
154
+ dtype: string
155
+ splits:
156
+ - name: train
157
+ num_bytes: 876144647
158
+ num_examples: 2980383
159
+ download_size: 470604570
160
+ dataset_size: 876144647
161
+ - config_name: ta
162
+ features:
163
+ - name: idx
164
+ dtype: int64
165
+ - name: src
166
+ dtype: string
167
+ - name: tgt
168
+ dtype: string
169
+ splits:
170
+ - name: train
171
+ num_bytes: 1518393368
172
+ num_examples: 5264867
173
+ download_size: 753886808
174
+ dataset_size: 1518393368
175
+ - config_name: te
176
+ features:
177
+ - name: idx
178
+ dtype: int64
179
+ - name: src
180
+ dtype: string
181
+ - name: tgt
182
+ dtype: string
183
+ splits:
184
+ - name: train
185
+ num_bytes: 1121643183
186
+ num_examples: 4946035
187
+ download_size: 599351284
188
+ dataset_size: 1121643183
189
+ configs:
190
+ - config_name: as
191
+ data_files:
192
+ - split: train
193
+ path: as/train-*
194
+ - config_name: bn
195
+ data_files:
196
+ - split: train
197
+ path: bn/train-*
198
+ - config_name: gu
199
+ data_files:
200
+ - split: train
201
+ path: gu/train-*
202
+ - config_name: hi
203
+ data_files:
204
+ - split: train
205
+ path: hi/train-*
206
+ - config_name: kn
207
+ data_files:
208
+ - split: train
209
+ path: kn/train-*
210
+ - config_name: ml
211
+ data_files:
212
+ - split: train
213
+ path: ml/train-*
214
+ - config_name: mr
215
+ data_files:
216
+ - split: train
217
+ path: mr/train-*
218
+ - config_name: or
219
+ data_files:
220
+ - split: train
221
+ path: or/train-*
222
+ - config_name: pa
223
+ data_files:
224
+ - split: train
225
+ path: pa/train-*
226
+ - config_name: ta
227
+ data_files:
228
+ - split: train
229
+ path: ta/train-*
230
+ - config_name: te
231
+ data_files:
232
+ - split: train
233
+ path: te/train-*
234
  ---
235
 
236
  # Dataset Card for Samanantar
as/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f53797a9f7bbcc7982a35f9859959b31d1b454dfa2cd3feaf05b377b5fe9f851
3
+ size 19404220
bn/train-00000-of-00005.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c32e9bf6b594516a76c4c2df9fc44a9b0e5868d912dd509e7777809cc86fc562
3
+ size 239242791
bn/train-00001-of-00005.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b91c1f63629bdd85d2fb8a9ea520095003f87530d21c890c5fde8a14c2c462c9
3
+ size 239488241
bn/train-00002-of-00005.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ae55fee87b68254e4bac19ec40dbf66b2623867a30e3c2d171ab94bc4f6eb18c
3
+ size 240006830
bn/train-00003-of-00005.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:69c1ce5a47f330aafaeca1ad533ef15cd9188a47ba8fcdc784eb924f5e66ae14
3
+ size 239610048
bn/train-00004-of-00005.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e2f052f83bf97999312a7610ee55f18e145049e3a587e66fccb0ea15ae2af5c3
3
+ size 239645636
gu/train-00000-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e486de87d44dc5e29c2080db944f632b0b87061106f8ff29d2fa029c76c02cf
3
+ size 184990121
gu/train-00001-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fd9c04ea181675bf5773a3557af8cfa02f7fade7cb56b30c05c1a0bb83450ca9
3
+ size 185128572
hi/train-00000-of-00008.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f396924b5c0e17568bde7369d5bc12a92aed21c0cdc0480e75b68bd73886c0a4
3
+ size 239534641
hi/train-00001-of-00008.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b5acb1784aeaac2b9fdb55d68b963732e4c9955ecbcd5b1401ee1a3fdb58627e
3
+ size 239659946
hi/train-00002-of-00008.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f22e82de472559d87f1be3b2c46317593adfe9123a54e0b11f2c50ade546de7f
3
+ size 239611478
hi/train-00003-of-00008.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:36d023855638fa4a9b7f31ad744b9453da534dfe57f26f6596da98122bd0aef3
3
+ size 239648993
hi/train-00004-of-00008.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a7734977b61bc4563c8d25aae4a8e6e2de30dca897dee0264f4645b6784b7489
3
+ size 239584950
hi/train-00005-of-00008.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:54dd1011c72f5a1d39608f4983d8650badaca0417caa5984cea39760591e32c8
3
+ size 239348279
hi/train-00006-of-00008.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a304ad268cdb5a0ea20d45e81b40d0406c619c1cc853eb4dc5c7a1ccbd6b4c04
3
+ size 239352147
hi/train-00007-of-00008.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6d8a9cd936c35a06cac1f1a54f08f74c28cd3118aee260e8f2037fdf92a34cfc
3
+ size 239645734
kn/train-00000-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d11477b35646dda2e07bba27b9833d62714853437011c90cf3ed2c6f01336ea
3
+ size 241793390
kn/train-00001-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc2c17ef6abd6a14cebdfb10f9a175741df68ad43c0671b6dada254141f85cb1
3
+ size 241658377
ml/train-00000-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bf8f2a33d93c1cb0d58233b1300dccab3af3cd93cf5ab7c764f5681453ae8c49
3
+ size 196182916
ml/train-00001-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:98ed9357e2a7358c7cd989d62a1043f46d04365359b1644307aeef78140b6384
3
+ size 196177543
ml/train-00002-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fad0c3dd94470d0b3e6869e2857d69765a31c31b8c0b7199049136e6c3bf858a
3
+ size 196205243
ml/train-00003-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:851cb5b7dffe317d821d4578d6559b29abf4596f30fa97d1483e41630a6f99c7
3
+ size 196325606
mr/train-00000-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed95b79977b59776562d1d93b267449645f2165f0e5322b86af5547f0b4dccc0
3
+ size 243877768
mr/train-00001-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de1f65a5f70751f5772c081e3bfd4ba8461024c798a7d1b053d7e33335f275e0
3
+ size 243947587
or/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4fd32b16a78e907a5e48f7f6a9ee34e508c3d3a95ee69bd16b16d85d62f8a2ee
3
+ size 136203687
pa/train-00000-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a9d505486ac9cbf82dee1aeeef55ac8adc343b919b0e944c7c4244cf1e98e2d
3
+ size 235379079
pa/train-00001-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fede0778b4ceecbffea5d9ef6300f6f39b43b6fff2f889d5143d563cbb1e45a3
3
+ size 235225491
samanantar.py DELETED
@@ -1,94 +0,0 @@
1
- # coding=utf-8
2
- # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- """Samanantar dataset."""
16
-
17
- from pathlib import Path
18
-
19
- import datasets
20
-
21
-
22
- _CITATION = """\
23
- @misc{ramesh2021samanantar,
24
- title={Samanantar: The Largest Publicly Available Parallel Corpora Collection for 11 Indic Languages},
25
- author={Gowtham Ramesh and Sumanth Doddapaneni and Aravinth Bheemaraj and Mayank Jobanputra and Raghavan AK and Ajitesh Sharma and Sujit Sahoo and Harshita Diddee and Mahalakshmi J and Divyanshu Kakwani and Navneet Kumar and Aswin Pradeep and Srihari Nagaraj and Kumar Deepak and Vivek Raghavan and Anoop Kunchukuttan and Pratyush Kumar and Mitesh Shantadevi Khapra},
26
- year={2021},
27
- eprint={2104.05596},
28
- archivePrefix={arXiv},
29
- primaryClass={cs.CL}
30
- }
31
- """
32
-
33
- _DESCRIPTION = """\
34
- Samanantar is the largest publicly available parallel corpora collection for Indic languages: Assamese, Bengali, Gujarati, Hindi, Kannada, Malayalam, Marathi, Oriya, Punjabi, Tamil, Telugu. The corpus has 49.6M sentence pairs between English to Indian Languages.
35
- """
36
-
37
- _HOMEPAGE = "https://indicnlp.ai4bharat.org/samanantar/"
38
-
39
- _LICENSE = "Creative Commons Attribution-NonCommercial 4.0 International"
40
-
41
- _URLS = {
42
- "0.3.0": "https://objectstore.e2enetworks.net/ai4b-public-nlu-nlg/samanantar_paper_version.zip",
43
- }
44
- _LANGUAGES = ["as", "bn", "gu", "hi", "kn", "ml", "mr", "or", "pa", "ta", "te"]
45
-
46
-
47
- class SamanantarConfig(datasets.BuilderConfig):
48
- VERSION = datasets.Version("0.3.0")
49
-
50
- def __init__(self, language=None, version=VERSION, **kwargs):
51
- super().__init__(name=language, version=version, **kwargs)
52
- self.language = language
53
-
54
-
55
- class Samanantar(datasets.GeneratorBasedBuilder):
56
- """Samanantar dataset."""
57
-
58
- BUILDER_CONFIG_CLASS = SamanantarConfig
59
- BUILDER_CONFIGS = [SamanantarConfig(language=language) for language in _LANGUAGES]
60
-
61
- def _info(self):
62
- return datasets.DatasetInfo(
63
- description=_DESCRIPTION,
64
- features=datasets.Features(
65
- {
66
- "idx": datasets.Value("int64"),
67
- "src": datasets.Value("string"),
68
- "tgt": datasets.Value("string"),
69
- }
70
- ),
71
- supervised_keys=None,
72
- homepage=_HOMEPAGE,
73
- license=_LICENSE,
74
- citation=_CITATION,
75
- )
76
-
77
- def _split_generators(self, dl_manager):
78
- urls = _URLS[str(self.config.version)]
79
- data_dir = dl_manager.download_and_extract(urls)
80
- return [
81
- datasets.SplitGenerator(
82
- name=datasets.Split.TRAIN,
83
- gen_kwargs={
84
- "data_dir": (Path(data_dir) / "samanantar_paper_version" / f"en-{self.config.language}"),
85
- },
86
- ),
87
- ]
88
-
89
- def _generate_examples(self, data_dir):
90
- src_path = data_dir / "train.en"
91
- tgt_path = data_dir / f"train.{self.config.language}"
92
- with src_path.open(encoding="utf-8") as src_file, tgt_path.open(encoding="utf-8") as tgt_file:
93
- for idx, (src_line, tgt_line) in enumerate(zip(src_file, tgt_file)):
94
- yield idx, {"idx": idx, "src": src_line.strip(), "tgt": tgt_line.strip()}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ta/train-00000-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe3610228385220f69573898fe80aba6962477d4b5545c5abfbdffbb22e14cd0
3
+ size 188510147
ta/train-00001-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7322c6daacee08beabdc70d45c68f8f9ddc26c5b53a783b7fd5e05d0ef0eb127
3
+ size 188622479
ta/train-00002-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bca00a9c3251a4d84e8871de6f465d830e5d24c68628812e0cd5230d35a1a74e
3
+ size 188257412
ta/train-00003-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:168f8f24e749a152d2efe41c6d61fcd8a0e42158afa03a44ed90ddda4b156313
3
+ size 188496770
te/train-00000-of-00003.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:63f8c870bbf55630b6926d4a9fc112dcf6d30610271f89e039905d4a6234b4ff
3
+ size 199962347
te/train-00001-of-00003.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:681c40107dce87e3838bad947c8822f1672f43455627080154485625f069650d
3
+ size 199678185
te/train-00002-of-00003.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d0435e5b7aadb462f1fa680633aa7b6434c50d5fe99ef4ae14436a07828f3489
3
+ size 199710752