Datasets:
Sean MacAvaney
commited on
Commit
•
9355249
1
Parent(s):
8d619c2
trying to fix dataset preview
Browse files- neumarco.py +5 -4
neumarco.py
CHANGED
@@ -2,8 +2,9 @@ import tarfile
|
|
2 |
import os
|
3 |
import datasets
|
4 |
|
5 |
-
|
6 |
-
|
|
|
7 |
|
8 |
class Neumarco(datasets.GeneratorBasedBuilder):
|
9 |
VERSION = datasets.Version("1.0.0")
|
@@ -17,12 +18,12 @@ class Neumarco(datasets.GeneratorBasedBuilder):
|
|
17 |
)
|
18 |
|
19 |
def _split_generators(self, dl_manager):
|
20 |
-
|
21 |
return [
|
22 |
datasets.SplitGenerator(
|
23 |
name=lang,
|
24 |
gen_kwargs={
|
25 |
-
"filepath":
|
26 |
"tarpath": f'eng-{lang}/msmarco.collection.20210731-scale21-sockeye2-tm1.tsv'
|
27 |
})
|
28 |
for lang in ['fas', 'rus', 'zho']
|
|
|
2 |
import os
|
3 |
import datasets
|
4 |
|
5 |
+
_URLS = {
|
6 |
+
"neumarco": "https://huggingface.co/datasets/neuclir/neumarco/resolve/main/data/neumarco.tar.gz"
|
7 |
+
}
|
8 |
|
9 |
class Neumarco(datasets.GeneratorBasedBuilder):
|
10 |
VERSION = datasets.Version("1.0.0")
|
|
|
18 |
)
|
19 |
|
20 |
def _split_generators(self, dl_manager):
|
21 |
+
paths = dl_manager.download(_URLS)
|
22 |
return [
|
23 |
datasets.SplitGenerator(
|
24 |
name=lang,
|
25 |
gen_kwargs={
|
26 |
+
"filepath": paths['neumarco'],
|
27 |
"tarpath": f'eng-{lang}/msmarco.collection.20210731-scale21-sockeye2-tm1.tsv'
|
28 |
})
|
29 |
for lang in ['fas', 'rus', 'zho']
|