ShaomuTan commited on
Commit
f246992
·
1 Parent(s): ccbe4b4

Update EC40.py

Browse files
Files changed (1) hide show
  1. EC40.py +2 -2
EC40.py CHANGED
@@ -134,9 +134,9 @@ class EC40(datasets.GeneratorBasedBuilder):
134
  src, tgt = None, None
135
 
136
  with open(filepath, encoding="utf-8") as f:
137
- src = f.read().decode("utf-8").split("\n")
138
  with open(labelpath, encoding="utf-8") as f:
139
- tgt = f.read().decode("utf-8").split("\n")
140
 
141
  if src is not None and tgt is not None:
142
  for idx, (s, t) in enumerate(zip(src, tgt)):
 
134
  src, tgt = None, None
135
 
136
  with open(filepath, encoding="utf-8") as f:
137
+ src = f.read().split("\n")[:-1]
138
  with open(labelpath, encoding="utf-8") as f:
139
+ tgt = f.read().split("\n")[:-1]
140
 
141
  if src is not None and tgt is not None:
142
  for idx, (s, t) in enumerate(zip(src, tgt)):