stas commited on
Commit
5429791
1 Parent(s): 0f3636f
Files changed (1) hide show
  1. wmt14-en-de-pre-processed.py +2 -2
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, encoding="utf-8") as f:
117
  source_sentences = f.read().split("\n")
118
- with open(target_file, encoding="utf-8") 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." % (
 
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, encoding="utf-8", mode="rb") as f:
117
  source_sentences = f.read().split("\n")
118
+ with open(target_file, encoding="utf-8", 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." % (