clefourrier HF Staff commited on
Commit
82dfe66
·
1 Parent(s): 0742b9b

Update sacrebleu_manual.py

Browse files
Files changed (1) hide show
  1. sacrebleu_manual.py +2 -2
sacrebleu_manual.py CHANGED
@@ -33,7 +33,7 @@ class SacrebleuManual(datasets.GeneratorBasedBuilder):
33
  VERSION = datasets.Version("1.0.0")
34
 
35
  BUILDER_CONFIGS = [
36
- datasets.BuilderConfig(name=f"{name.replace('/', ' ')} {langpair}", version=datasets.Version("1.0.0"), description="")
37
  for name in sacrebleu.get_available_testsets()
38
  for langpair in sacrebleu.get_langpairs_for_testset(name)
39
  ]
@@ -62,6 +62,6 @@ class SacrebleuManual(datasets.GeneratorBasedBuilder):
62
 
63
  # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
64
  def _generate_examples(self):
65
- with open(f"{os.path.join(self.config.name.split(' '))}.jsonl", encoding="utf-8") as f:
66
  for key, row in enumerate(f):
67
  yield key, json.loads(row)
 
33
  VERSION = datasets.Version("1.0.0")
34
 
35
  BUILDER_CONFIGS = [
36
+ datasets.BuilderConfig(name=f"{name.replace('/', '_')}_{langpair}", version=datasets.Version("1.0.0"), description="")
37
  for name in sacrebleu.get_available_testsets()
38
  for langpair in sacrebleu.get_langpairs_for_testset(name)
39
  ]
 
62
 
63
  # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
64
  def _generate_examples(self):
65
+ with open(f"{os.path.join(self.config.name.split('_'))}.jsonl", encoding="utf-8") as f:
66
  for key, row in enumerate(f):
67
  yield key, json.loads(row)