Update EC40.py
Browse files
EC40.py
CHANGED
|
@@ -141,22 +141,3 @@ class EC40(datasets.GeneratorBasedBuilder):
|
|
| 141 |
if src is not None and tgt is not None:
|
| 142 |
for idx, (s, t) in enumerate(zip(src, tgt)):
|
| 143 |
yield idx, {"translation": {src_tag: s, tgt_tag: t}}
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
#for path, f in filepath:
|
| 147 |
-
# src = f.read().decode("utf-8").split("\n")
|
| 148 |
-
# tgt = f.read().decode("utf-8").split("\n")
|
| 149 |
-
# if src is not None and tgt is not None:
|
| 150 |
-
# for idx, (s, t) in enumerate(zip(src, tgt)):
|
| 151 |
-
# yield idx, {"translation": {src_tag: s, tgt_tag: t}}
|
| 152 |
-
# break
|
| 153 |
-
|
| 154 |
-
#for path, f in files:
|
| 155 |
-
# if path == filepath:
|
| 156 |
-
# src = f.read().decode("utf-8").split("\n")#[:-1]
|
| 157 |
-
# elif path == labelpath:
|
| 158 |
-
# tgt = f.read().decode("utf-8").split("\n")#[:-1]
|
| 159 |
-
# if src is not None and tgt is not None:
|
| 160 |
-
# for idx, (s, t) in enumerate(zip(src, tgt)):
|
| 161 |
-
# yield idx, {"translation": {src_tag: s, tgt_tag: t}}
|
| 162 |
-
# break
|
|
|
|
| 141 |
if src is not None and tgt is not None:
|
| 142 |
for idx, (s, t) in enumerate(zip(src, tgt)):
|
| 143 |
yield idx, {"translation": {src_tag: s, tgt_tag: t}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|