data load script
Browse files- tatoeba_mt.py +19 -7
tatoeba_mt.py
CHANGED
|
@@ -117,13 +117,25 @@ class tatoebaMT(datasets.GeneratorBasedBuilder):
|
|
| 117 |
data_dir = dl_manager.download_and_extract(files)
|
| 118 |
|
| 119 |
output = []
|
| 120 |
-
if os.path.exists(data_dir["test"]):
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
|
| 128 |
return output
|
| 129 |
|
|
|
|
| 117 |
data_dir = dl_manager.download_and_extract(files)
|
| 118 |
|
| 119 |
output = []
|
| 120 |
+
# if os.path.exists(data_dir["test"]):
|
| 121 |
+
test = datasets.SplitGenerator(
|
| 122 |
+
name=datasets.Split.TEST,
|
| 123 |
+
gen_kwargs={
|
| 124 |
+
"filepath": data_dir["test"],
|
| 125 |
+
"split": "test"
|
| 126 |
+
}
|
| 127 |
+
)
|
| 128 |
+
output.append(test)
|
| 129 |
+
|
| 130 |
+
# if os.path.exists(data_dir["validation"]):
|
| 131 |
+
valid = datasets.SplitGenerator(
|
| 132 |
+
name=datasets.Split.VALIDATION,
|
| 133 |
+
gen_kwargs={
|
| 134 |
+
"filepath": data_dir["validation"],
|
| 135 |
+
"split": "validation"
|
| 136 |
+
}
|
| 137 |
+
)
|
| 138 |
+
output.append(valid)
|
| 139 |
|
| 140 |
return output
|
| 141 |
|