atenglens commited on
Commit
f0d4d13
1 Parent(s): 0222bce

Update taiwanese_english_translation.py

Browse files
Files changed (1) hide show
  1. taiwanese_english_translation.py +2 -3
taiwanese_english_translation.py CHANGED
@@ -157,8 +157,7 @@ class TaiwaneseEnglishTranslation(datasets.GeneratorBasedBuilder):
157
  target_sentences.append(row[1])
158
  source, target = self.config.language_pair
159
  for idx, (l1, l2) in enumerate(zip(source_sentences, target_sentences)):
160
- result = {"id": str(idx),
161
- "translation": {source: l1, target: l2}}
162
  # Make sure that both translations are non-empty.
163
  if all(result.values()):
164
- yield result
 
157
  target_sentences.append(row[1])
158
  source, target = self.config.language_pair
159
  for idx, (l1, l2) in enumerate(zip(source_sentences, target_sentences)):
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