Mikolaj Pudo
commited on
Commit
·
f09cbff
1
Parent(s):
7c40382
fix
Browse files- MOCKS-test.py +16 -18
MOCKS-test.py
CHANGED
|
@@ -55,7 +55,6 @@ _DL_URLS_TEMPLATE = {
|
|
| 55 |
|
| 56 |
_MOCKS_SETS = [
|
| 57 |
"en.LS-clean",
|
| 58 |
-
]
|
| 59 |
# "en.LS-other",
|
| 60 |
# "en.MCV",
|
| 61 |
# "de.MCV",
|
|
@@ -116,10 +115,10 @@ class Mocks(datasets.GeneratorBasedBuilder):
|
|
| 116 |
k: v%(subset_lang, subset_name, "offline")
|
| 117 |
for k, v in _DL_URLS_TEMPLATE.items()
|
| 118 |
})
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
|
| 124 |
split_offline = [datasets.SplitGenerator(
|
| 125 |
name="offline",
|
|
@@ -132,19 +131,18 @@ class Mocks(datasets.GeneratorBasedBuilder):
|
|
| 132 |
)
|
| 133 |
]
|
| 134 |
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
return split_offline
|
| 148 |
|
| 149 |
|
| 150 |
def _read_transcription(self, transcription_path):
|
|
|
|
| 55 |
|
| 56 |
_MOCKS_SETS = [
|
| 57 |
"en.LS-clean",
|
|
|
|
| 58 |
# "en.LS-other",
|
| 59 |
# "en.MCV",
|
| 60 |
# "de.MCV",
|
|
|
|
| 115 |
k: v%(subset_lang, subset_name, "offline")
|
| 116 |
for k, v in _DL_URLS_TEMPLATE.items()
|
| 117 |
})
|
| 118 |
+
online_archive_path = dl_manager.download({
|
| 119 |
+
k: v%(subset_lang, subset_name, "online")
|
| 120 |
+
for k, v in _DL_URLS_TEMPLATE.items()
|
| 121 |
+
})
|
| 122 |
|
| 123 |
split_offline = [datasets.SplitGenerator(
|
| 124 |
name="offline",
|
|
|
|
| 131 |
)
|
| 132 |
]
|
| 133 |
|
| 134 |
+
split_online = [datasets.SplitGenerator(
|
| 135 |
+
name="online",
|
| 136 |
+
gen_kwargs={
|
| 137 |
+
"audio_files": dl_manager.iter_archive(online_archive_path["data"]),
|
| 138 |
+
"transcription_keyword": offline_archive_path["transcription"],
|
| 139 |
+
"transcription_test": online_archive_path["transcription"],
|
| 140 |
+
"pairs": [online_archive_path[pair_type] for pair_type in pairs_types],
|
| 141 |
+
}
|
| 142 |
+
)
|
| 143 |
+
]
|
| 144 |
+
|
| 145 |
+
return split_offline + split_online
|
|
|
|
| 146 |
|
| 147 |
|
| 148 |
def _read_transcription(self, transcription_path):
|