download and extract for mmteb miracl
Browse files- mmteb-miracl.py +9 -6
mmteb-miracl.py
CHANGED
@@ -169,34 +169,37 @@ class MMTEBMIRACL(datasets.GeneratorBasedBuilder):
|
|
169 |
|
170 |
if name.startswith('corpus-'):
|
171 |
language = name.replace('corpus-', '')
|
172 |
-
downloaded_files = dl_manager.download_and_extract(
|
|
|
173 |
splits = [
|
174 |
datasets.SplitGenerator(
|
175 |
name='corpus',
|
176 |
gen_kwargs={
|
177 |
-
'filepaths': downloaded_files
|
178 |
},
|
179 |
),
|
180 |
]
|
181 |
elif name.startswith('queries-'):
|
182 |
language = name.replace('queries-', '')
|
183 |
-
downloaded_files = dl_manager.download_and_extract(
|
|
|
184 |
splits = [
|
185 |
datasets.SplitGenerator(
|
186 |
name='queries',
|
187 |
gen_kwargs={
|
188 |
-
'filepaths': downloaded_files
|
189 |
},
|
190 |
),
|
191 |
]
|
192 |
else:
|
193 |
language = name
|
194 |
-
downloaded_files = dl_manager.download_and_extract(
|
|
|
195 |
splits = [
|
196 |
datasets.SplitGenerator(
|
197 |
name='dev',
|
198 |
gen_kwargs={
|
199 |
-
'filepaths': downloaded_files
|
200 |
},
|
201 |
),
|
202 |
]
|
|
|
169 |
|
170 |
if name.startswith('corpus-'):
|
171 |
language = name.replace('corpus-', '')
|
172 |
+
downloaded_files = dl_manager.download_and_extract(
|
173 |
+
_DATASET_URLS[language]['corpus'])
|
174 |
splits = [
|
175 |
datasets.SplitGenerator(
|
176 |
name='corpus',
|
177 |
gen_kwargs={
|
178 |
+
'filepaths': downloaded_files,
|
179 |
},
|
180 |
),
|
181 |
]
|
182 |
elif name.startswith('queries-'):
|
183 |
language = name.replace('queries-', '')
|
184 |
+
downloaded_files = dl_manager.download_and_extract(
|
185 |
+
_DATASET_URLS[language]['queries'])
|
186 |
splits = [
|
187 |
datasets.SplitGenerator(
|
188 |
name='queries',
|
189 |
gen_kwargs={
|
190 |
+
'filepaths': downloaded_files,
|
191 |
},
|
192 |
),
|
193 |
]
|
194 |
else:
|
195 |
language = name
|
196 |
+
downloaded_files = dl_manager.download_and_extract(
|
197 |
+
_DATASET_URLS[language]['dev'])
|
198 |
splits = [
|
199 |
datasets.SplitGenerator(
|
200 |
name='dev',
|
201 |
gen_kwargs={
|
202 |
+
'filepaths': downloaded_files,
|
203 |
},
|
204 |
),
|
205 |
]
|