fix
Browse files
wmt14-en-de-pre-processed.py
CHANGED
|
@@ -113,9 +113,9 @@ class Wmt14EnDePreProcessed(datasets.GeneratorBasedBuilder):
|
|
| 113 |
|
| 114 |
def _generate_examples(self, source_file, target_file):
|
| 115 |
"""This function returns the examples in the raw (text) form."""
|
| 116 |
-
with open(source_file,
|
| 117 |
source_sentences = f.read().split("\n")
|
| 118 |
-
with open(target_file,
|
| 119 |
target_sentences = f.read().split("\n")
|
| 120 |
|
| 121 |
assert len(target_sentences) == len(source_sentences), "Sizes do not match: %d vs %d for %s vs %s." % (
|
|
|
|
| 113 |
|
| 114 |
def _generate_examples(self, source_file, target_file):
|
| 115 |
"""This function returns the examples in the raw (text) form."""
|
| 116 |
+
with open(source_file, mode="rb") as f:
|
| 117 |
source_sentences = f.read().split("\n")
|
| 118 |
+
with open(target_file, mode="rb") as f:
|
| 119 |
target_sentences = f.read().split("\n")
|
| 120 |
|
| 121 |
assert len(target_sentences) == len(source_sentences), "Sizes do not match: %d vs %d for %s vs %s." % (
|