new json file
Browse files- dataset_infos.json +0 -0
- tatoeba_mt.py +10 -10
dataset_infos.json
CHANGED
The diff for this file is too large to render.
See raw diff
|
|
tatoeba_mt.py
CHANGED
@@ -112,7 +112,7 @@ class tatoebaMT(datasets.GeneratorBasedBuilder):
|
|
112 |
|
113 |
files = {
|
114 |
"test": os.path.join("test", f"tatoeba-test.{lang_pair}.tsv"),
|
115 |
-
"validation": os.path.join("dev", f"tatoeba-dev.{lang_pair}.tsv")
|
116 |
}
|
117 |
data_dir = dl_manager.download_and_extract(files)
|
118 |
|
@@ -127,15 +127,15 @@ class tatoebaMT(datasets.GeneratorBasedBuilder):
|
|
127 |
)
|
128 |
output.append(test)
|
129 |
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
|
140 |
return output
|
141 |
|
|
|
112 |
|
113 |
files = {
|
114 |
"test": os.path.join("test", f"tatoeba-test.{lang_pair}.tsv"),
|
115 |
+
# "validation": os.path.join("dev", f"tatoeba-dev.{lang_pair}.tsv")
|
116 |
}
|
117 |
data_dir = dl_manager.download_and_extract(files)
|
118 |
|
|
|
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 |
|