mathiascreutz commited on
Commit
42f28b1
1 Parent(s): 965002e
Files changed (1) hide show
  1. opusparcus.py +2 -2
opusparcus.py CHANGED
@@ -176,7 +176,7 @@ class Opusparcus(datasets.GeneratorBasedBuilder):
176
  gen_kwargs={
177
  "lang": self.config.lang,
178
  "quality": self.config.quality,
179
- "filepath": data_dir["train"],
180
  "split": "train",
181
  },
182
  )
@@ -192,7 +192,7 @@ class Opusparcus(datasets.GeneratorBasedBuilder):
192
  # This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
193
  # The `key` is here for legacy reason (tfds) and is not important in itself.
194
  if split == datasets.Split.TRAIN:
195
- with bz2.open(filepath, "rt", encoding="utf-8") as f:
196
  # We know that this file only contains the desired language,
197
  # because for the training sets the languages are in separate
198
  # files, and only the desired language has been downloaded
 
176
  gen_kwargs={
177
  "lang": self.config.lang,
178
  "quality": self.config.quality,
179
+ "filepath": [data_dir["train"], data_dir["train"], data_dir["train"]],
180
  "split": "train",
181
  },
182
  )
 
192
  # This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
193
  # The `key` is here for legacy reason (tfds) and is not important in itself.
194
  if split == datasets.Split.TRAIN:
195
+ with bz2.open(filepath[0], "rt", encoding="utf-8") as f:
196
  # We know that this file only contains the desired language,
197
  # because for the training sets the languages are in separate
198
  # files, and only the desired language has been downloaded