Update EC40.py
Browse files
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().
|
138 |
with open(labelpath, encoding="utf-8") as f:
|
139 |
-
tgt = f.read().
|
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)):
|