Datasets:
Update files from the datasets library (from 1.4.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.4.0
- id_newspapers_2018.py +4 -2
id_newspapers_2018.py
CHANGED
@@ -18,12 +18,14 @@ from __future__ import absolute_import, division, print_function
|
|
18 |
|
19 |
import glob
|
20 |
import json
|
21 |
-
import logging
|
22 |
import os
|
23 |
|
24 |
import datasets
|
25 |
|
26 |
|
|
|
|
|
|
|
27 |
_CITATION = """\
|
28 |
@inproceedings{id_newspapers_2018,
|
29 |
author = {},
|
@@ -104,7 +106,7 @@ class IdNewspapers2018(datasets.GeneratorBasedBuilder):
|
|
104 |
]
|
105 |
|
106 |
def _generate_examples(self, article_dir, split):
|
107 |
-
|
108 |
id = 0
|
109 |
for path in sorted(glob.glob(os.path.join(article_dir, "**/*.json"), recursive=True)):
|
110 |
with open(path, encoding="utf-8") as f:
|
|
|
18 |
|
19 |
import glob
|
20 |
import json
|
|
|
21 |
import os
|
22 |
|
23 |
import datasets
|
24 |
|
25 |
|
26 |
+
logger = datasets.logging.get_logger(__name__)
|
27 |
+
|
28 |
+
|
29 |
_CITATION = """\
|
30 |
@inproceedings{id_newspapers_2018,
|
31 |
author = {},
|
|
|
106 |
]
|
107 |
|
108 |
def _generate_examples(self, article_dir, split):
|
109 |
+
logger.info("⏳ Generating %s examples from = %s", split, article_dir)
|
110 |
id = 0
|
111 |
for path in sorted(glob.glob(os.path.join(article_dir, "**/*.json"), recursive=True)):
|
112 |
with open(path, encoding="utf-8") as f:
|