Update taiwanese_english_translation.py
Browse files
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 = {"
|
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
|