Datasets:
Update files from the datasets library (from 1.4.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.4.0
- covid_qa_castorini.py +4 -2
covid_qa_castorini.py
CHANGED
@@ -17,11 +17,13 @@
|
|
17 |
from __future__ import absolute_import, division, print_function
|
18 |
|
19 |
import json
|
20 |
-
import logging
|
21 |
|
22 |
import datasets
|
23 |
|
24 |
|
|
|
|
|
|
|
25 |
_CITATION = """\
|
26 |
@article{tang2020rapidly,
|
27 |
title={Rapidly Bootstrapping a Question Answering Dataset for COVID-19},
|
@@ -92,7 +94,7 @@ class CovidQaCastorini(datasets.GeneratorBasedBuilder):
|
|
92 |
|
93 |
def _generate_examples(self, filepath):
|
94 |
"""This function returns the examples in the raw (text) form."""
|
95 |
-
|
96 |
with open(filepath, encoding="utf-8") as f:
|
97 |
covid_qa = json.load(f)
|
98 |
for article in covid_qa["categories"]:
|
|
|
17 |
from __future__ import absolute_import, division, print_function
|
18 |
|
19 |
import json
|
|
|
20 |
|
21 |
import datasets
|
22 |
|
23 |
|
24 |
+
logger = datasets.logging.get_logger(__name__)
|
25 |
+
|
26 |
+
|
27 |
_CITATION = """\
|
28 |
@article{tang2020rapidly,
|
29 |
title={Rapidly Bootstrapping a Question Answering Dataset for COVID-19},
|
|
|
94 |
|
95 |
def _generate_examples(self, filepath):
|
96 |
"""This function returns the examples in the raw (text) form."""
|
97 |
+
logger.info("generating examples from = %s", filepath)
|
98 |
with open(filepath, encoding="utf-8") as f:
|
99 |
covid_qa = json.load(f)
|
100 |
for article in covid_qa["categories"]:
|