Sebastian Gehrmann commited on
Commit
43577d3
1 Parent(s): 9b7245a

fix naming

Browse files
Files changed (1) hide show
  1. RotoWire_English-German.py +5 -1
RotoWire_English-German.py CHANGED
@@ -145,6 +145,8 @@ class RotowireEnglishGerman(datasets.GeneratorBasedBuilder):
145
  "summary_en": datasets.Sequence(datasets.Value("string")),
146
  "sentence_end_index_en": datasets.Sequence(datasets.Value("int32")),
147
  "summary_de": datasets.Sequence(datasets.Value("string")),
 
 
148
  "sentence_end_index_de": datasets.Sequence(datasets.Value("int32")),
149
  "linearized_input": datasets.Value("string")
150
  }
@@ -465,7 +467,7 @@ class RotowireEnglishGerman(datasets.GeneratorBasedBuilder):
465
  linearized_input = " ".join(output)
466
  linearized_input = linearized_input.replace(" ", " ")
467
  return linearized_input
468
-
469
  def _generate_examples(
470
  self, filepath, split # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
471
  ):
@@ -477,4 +479,6 @@ class RotowireEnglishGerman(datasets.GeneratorBasedBuilder):
477
  all_data = json.load(f)
478
  for id_, data in enumerate(all_data):
479
  data['linearized_input'] = self.linearize_input(data)
 
 
480
  yield id_, data
 
145
  "summary_en": datasets.Sequence(datasets.Value("string")),
146
  "sentence_end_index_en": datasets.Sequence(datasets.Value("int32")),
147
  "summary_de": datasets.Sequence(datasets.Value("string")),
148
+ "target": datasets.Value("string"),
149
+ "references": [datasets.Value("string")],
150
  "sentence_end_index_de": datasets.Sequence(datasets.Value("int32")),
151
  "linearized_input": datasets.Value("string")
152
  }
 
467
  linearized_input = " ".join(output)
468
  linearized_input = linearized_input.replace(" ", " ")
469
  return linearized_input
470
+
471
  def _generate_examples(
472
  self, filepath, split # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
473
  ):
 
479
  all_data = json.load(f)
480
  for id_, data in enumerate(all_data):
481
  data['linearized_input'] = self.linearize_input(data)
482
+ data['target'] = data['summary_de'][0]
483
+ data['references'] = data['summary_de']
484
  yield id_, data