Update msmarco-passage-corpus.py
Browse files
msmarco-passage-corpus.py
CHANGED
@@ -34,7 +34,7 @@ class MsMarcoPassage(datasets.GeneratorBasedBuilder):
|
|
34 |
|
35 |
BUILDER_CONFIGS = [
|
36 |
datasets.BuilderConfig(version=VERSION,
|
37 |
-
description="MS MARCO passage
|
38 |
]
|
39 |
|
40 |
def _info(self):
|
@@ -62,7 +62,7 @@ class MsMarcoPassage(datasets.GeneratorBasedBuilder):
|
|
62 |
datasets.SplitGenerator(
|
63 |
name=split,
|
64 |
gen_kwargs={
|
65 |
-
"
|
66 |
},
|
67 |
) for split in downloaded_files
|
68 |
]
|
@@ -74,4 +74,4 @@ class MsMarcoPassage(datasets.GeneratorBasedBuilder):
|
|
74 |
texts = f.readlines()
|
75 |
for i, text in enumerate(texts):
|
76 |
text = json.loads(text)
|
77 |
-
yield i, text
|
|
|
34 |
|
35 |
BUILDER_CONFIGS = [
|
36 |
datasets.BuilderConfig(version=VERSION,
|
37 |
+
description="MS MARCO passage corpus"),
|
38 |
]
|
39 |
|
40 |
def _info(self):
|
|
|
62 |
datasets.SplitGenerator(
|
63 |
name=split,
|
64 |
gen_kwargs={
|
65 |
+
"filepath": [downloaded_files[split]] if isinstance(downloaded_files[split], str) else downloaded_files[split],
|
66 |
},
|
67 |
) for split in downloaded_files
|
68 |
]
|
|
|
74 |
texts = f.readlines()
|
75 |
for i, text in enumerate(texts):
|
76 |
text = json.loads(text)
|
77 |
+
yield i, text
|