atenglens commited on
Commit
c23cabb
1 Parent(s): f0d4d13

Update taiwanese_english_translation.py

Browse files
Files changed (1) hide show
  1. taiwanese_english_translation.py +2 -3
taiwanese_english_translation.py CHANGED
@@ -103,8 +103,7 @@ class TaiwaneseEnglishTranslation(datasets.GeneratorBasedBuilder):
103
  # TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
104
  source, target = self.config.language_pair
105
  features = datasets.Features(
106
- {"id": datasets.Value("string"),
107
- "translation": datasets.features.Translation(languages=self.config.language_pair)}
108
  )
109
  return datasets.DatasetInfo(
110
  # This is the description that will appear on the datasets page.
@@ -160,4 +159,4 @@ class TaiwaneseEnglishTranslation(datasets.GeneratorBasedBuilder):
160
  result = {"translation": {source: l1, target: l2}}
161
  # Make sure that both translations are non-empty.
162
  if all(result.values()):
163
- yield {"id": str(idx)}, result
 
103
  # TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
104
  source, target = self.config.language_pair
105
  features = datasets.Features(
106
+ {"translation": datasets.features.Translation(languages=self.config.language_pair)}
 
107
  )
108
  return datasets.DatasetInfo(
109
  # This is the description that will appear on the datasets page.
 
159
  result = {"translation": {source: l1, target: l2}}
160
  # Make sure that both translations are non-empty.
161
  if all(result.values()):
162
+ yield idx, result