mathiascreutz commited on
Commit
fdc1a35
1 Parent(s): 0157c3c

Data loader produces full test and validation split as well

Browse files
Files changed (1) hide show
  1. opusparcus.py +13 -13
opusparcus.py CHANGED
@@ -152,45 +152,45 @@ class Opusparcus(datasets.GeneratorBasedBuilder):
152
 
153
  splits = [
154
  datasets.SplitGenerator(
155
- name="test.full",
156
  # These kwargs will be passed to _generate_examples
157
  gen_kwargs={
158
  "lang": self.config.lang,
159
  "quality": 100,
160
- "filepath": data_dir["test.full"],
161
- "split": "test.full"
162
  },
163
  ),
164
  datasets.SplitGenerator(
165
- name="validation.full",
166
  # These kwargs will be passed to _generate_examples
167
  gen_kwargs={
168
  "lang": self.config.lang,
169
  "quality": 100,
170
- "filepath": data_dir["validation.full"],
171
- "split": "validation.full",
172
  },
173
  ),
174
  datasets.SplitGenerator(
175
- name=datasets.Split.TEST,
176
  # These kwargs will be passed to _generate_examples
177
  gen_kwargs={
178
  "lang": self.config.lang,
179
  "quality": 100,
180
- "filepath": data_dir["test"],
181
- "split": "test"
182
  },
183
  ),
184
  datasets.SplitGenerator(
185
- name=datasets.Split.VALIDATION,
186
  # These kwargs will be passed to _generate_examples
187
  gen_kwargs={
188
  "lang": self.config.lang,
189
  "quality": 100,
190
- "filepath": data_dir["validation"],
191
- "split": "validation",
192
  },
193
- )
194
  ]
195
 
196
  if self.config.quality <= 95:
 
152
 
153
  splits = [
154
  datasets.SplitGenerator(
155
+ name=datasets.Split.TEST,
156
  # These kwargs will be passed to _generate_examples
157
  gen_kwargs={
158
  "lang": self.config.lang,
159
  "quality": 100,
160
+ "filepath": data_dir["test"],
161
+ "split": "test"
162
  },
163
  ),
164
  datasets.SplitGenerator(
165
+ name=datasets.Split.VALIDATION,
166
  # These kwargs will be passed to _generate_examples
167
  gen_kwargs={
168
  "lang": self.config.lang,
169
  "quality": 100,
170
+ "filepath": data_dir["validation"],
171
+ "split": "validation",
172
  },
173
  ),
174
  datasets.SplitGenerator(
175
+ name="test.full",
176
  # These kwargs will be passed to _generate_examples
177
  gen_kwargs={
178
  "lang": self.config.lang,
179
  "quality": 100,
180
+ "filepath": data_dir["test.full"],
181
+ "split": "test.full"
182
  },
183
  ),
184
  datasets.SplitGenerator(
185
+ name="validation.full",
186
  # These kwargs will be passed to _generate_examples
187
  gen_kwargs={
188
  "lang": self.config.lang,
189
  "quality": 100,
190
+ "filepath": data_dir["validation.full"],
191
+ "split": "validation.full",
192
  },
193
+ ),
194
  ]
195
 
196
  if self.config.quality <= 95: