Xinyu Crystina ZHANG
commited on
Commit
·
a0e07ab
1
Parent(s):
73aa0c3
init
Browse files- mmarco-corpus.py +4 -9
mmarco-corpus.py
CHANGED
@@ -121,22 +121,17 @@ class MMarco(datasets.GeneratorBasedBuilder):
|
|
121 |
datasets.SplitGenerator(
|
122 |
name=datasets.Split.TRAIN,
|
123 |
gen_kwargs={
|
124 |
-
"files": dl_path["train"],
|
125 |
-
"
|
126 |
-
"collection": dl_path["collection"],
|
127 |
-
},
|
128 |
},
|
129 |
)
|
130 |
]
|
131 |
|
132 |
-
def _generate_examples(self, files
|
133 |
"""Yields examples."""
|
134 |
|
135 |
-
# languages = [self.config.name] if self.config.name in LANGUAGES else LANGUAGES
|
136 |
-
language = self.config.name
|
137 |
-
|
138 |
# loading
|
139 |
-
collection_path =
|
140 |
|
141 |
with open(collection_path, encoding="utf-8") as f:
|
142 |
for line in f:
|
|
|
121 |
datasets.SplitGenerator(
|
122 |
name=datasets.Split.TRAIN,
|
123 |
gen_kwargs={
|
124 |
+
# "files": dl_path["train"],
|
125 |
+
'files': dl_path["collection"],
|
|
|
|
|
126 |
},
|
127 |
)
|
128 |
]
|
129 |
|
130 |
+
def _generate_examples(self, files):
|
131 |
"""Yields examples."""
|
132 |
|
|
|
|
|
|
|
133 |
# loading
|
134 |
+
collection_path = files
|
135 |
|
136 |
with open(collection_path, encoding="utf-8") as f:
|
137 |
for line in f:
|