Datasets:
Update SourceData.py
Browse files- SourceData.py +4 -4
SourceData.py
CHANGED
@@ -177,9 +177,9 @@ class SourceData(datasets.GeneratorBasedBuilder):
|
|
177 |
try:
|
178 |
config_name = self.config.name if self.config.name != "default" else "NER"
|
179 |
urls = [
|
180 |
-
self._URLS[
|
181 |
-
self._URLS[
|
182 |
-
self._URLS[
|
183 |
]
|
184 |
data_files = dl_manager.download(urls)
|
185 |
except:
|
@@ -213,7 +213,7 @@ class SourceData(datasets.GeneratorBasedBuilder):
|
|
213 |
# logger.info("⏳ Generating examples from = %s", filepath)
|
214 |
for id_, row in enumerate(f):
|
215 |
data = json.loads(row)
|
216 |
-
if self.config.name
|
217 |
yield id_, {
|
218 |
"words": data["words"],
|
219 |
"labels": data["labels"],
|
|
|
177 |
try:
|
178 |
config_name = self.config.name if self.config.name != "default" else "NER"
|
179 |
urls = [
|
180 |
+
self._URLS[config_name]+"train.jsonl",
|
181 |
+
self._URLS[config_name]+"test.jsonl",
|
182 |
+
self._URLS[config_name]+"validation.jsonl"
|
183 |
]
|
184 |
data_files = dl_manager.download(urls)
|
185 |
except:
|
|
|
213 |
# logger.info("⏳ Generating examples from = %s", filepath)
|
214 |
for id_, row in enumerate(f):
|
215 |
data = json.loads(row)
|
216 |
+
if self.config.name in ["NER", "default"]:
|
217 |
yield id_, {
|
218 |
"words": data["words"],
|
219 |
"labels": data["labels"],
|