Commit ·
73684a4
1
Parent(s): 25da418
Update tatoeba_mt.py
Browse files- tatoeba_mt.py +10 -4
tatoeba_mt.py
CHANGED
|
@@ -109,11 +109,17 @@ class tatoebaMT(datasets.GeneratorBasedBuilder):
|
|
| 109 |
|
| 110 |
lang_pair = self.config.language_pair
|
| 111 |
# release = self.config.release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
|
| 119 |
output = []
|
|
|
|
| 109 |
|
| 110 |
lang_pair = self.config.language_pair
|
| 111 |
# release = self.config.release
|
| 112 |
+
|
| 113 |
+
files = {}
|
| 114 |
+
|
| 115 |
+
test_path = os.path.join("test", f"tatoeba-test.{lang_pair}.tsv")
|
| 116 |
+
if os.path.exists(test_path):
|
| 117 |
+
files["test"] = test_path
|
| 118 |
+
|
| 119 |
+
valid_path = os.path.join("test", f"tatoeba-dev.{lang_pair}.tsv")
|
| 120 |
+
if os.path.exists(valid_path):
|
| 121 |
+
files["validation"] = test_path
|
| 122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
data_dir = dl_manager.download_and_extract(files)
|
| 124 |
|
| 125 |
output = []
|