Datasets:
Commit
·
85acda7
0
Parent(s):
Update files from the datasets library (from 1.2.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.2.0
- .gitattributes +27 -0
- README.md +167 -0
- covid_qa_deepset.py +120 -0
- dataset_infos.json +1 -0
- dummy/covid_qa_deepset/1.0.0/dummy_data.zip +3 -0
.gitattributes
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
20 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
24 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
25 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
26 |
+
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
27 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- expert-generated
|
4 |
+
language_creators:
|
5 |
+
- found
|
6 |
+
languages:
|
7 |
+
- en
|
8 |
+
licenses:
|
9 |
+
- apache-2-0
|
10 |
+
multilinguality:
|
11 |
+
- monolingual
|
12 |
+
size_categories:
|
13 |
+
- 1K<n<10K
|
14 |
+
source_datasets:
|
15 |
+
- original
|
16 |
+
task_categories:
|
17 |
+
- question-answering
|
18 |
+
task_ids:
|
19 |
+
- closed-domain-qa
|
20 |
+
- extractive-qa
|
21 |
+
---
|
22 |
+
|
23 |
+
|
24 |
+
# Dataset Card for COVID-QA
|
25 |
+
|
26 |
+
## Table of Contents
|
27 |
+
- [Dataset Description](#dataset-description)
|
28 |
+
- [Dataset Summary](#dataset-summary)
|
29 |
+
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
30 |
+
- [Languages](#languages)
|
31 |
+
- [Dataset Structure](#dataset-structure)
|
32 |
+
- [Data Instances](#data-instances)
|
33 |
+
- [Data Fields](#data-instances)
|
34 |
+
- [Data Splits](#data-instances)
|
35 |
+
- [Dataset Creation](#dataset-creation)
|
36 |
+
- [Curation Rationale](#curation-rationale)
|
37 |
+
- [Source Data](#source-data)
|
38 |
+
- [Annotations](#annotations)
|
39 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
40 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
41 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
42 |
+
- [Discussion of Biases](#discussion-of-biases)
|
43 |
+
- [Other Known Limitations](#other-known-limitations)
|
44 |
+
- [Additional Information](#additional-information)
|
45 |
+
- [Dataset Curators](#dataset-curators)
|
46 |
+
- [Licensing Information](#licensing-information)
|
47 |
+
- [Citation Information](#citation-information)
|
48 |
+
|
49 |
+
## Dataset Description
|
50 |
+
|
51 |
+
- **Repository:** https://github.com/deepset-ai/COVID-QA
|
52 |
+
- **Paper:** https://openreview.net/forum?id=JENSKEEzsoU
|
53 |
+
- **Point of Contact:** [deepset AI](https://github.com/deepset-ai)
|
54 |
+
|
55 |
+
### Dataset Summary
|
56 |
+
|
57 |
+
COVID-QA is a Question Answering dataset consisting of 2,019 question/answer pairs annotated by volunteer biomedical experts on scientific articles related to COVID-19.
|
58 |
+
A total of 147 scientific articles from the CORD-19 dataset were annotated by 15 experts.
|
59 |
+
|
60 |
+
### Supported Tasks and Leaderboards
|
61 |
+
|
62 |
+
[More Information Needed]
|
63 |
+
|
64 |
+
### Languages
|
65 |
+
|
66 |
+
The text in the dataset is in English.
|
67 |
+
|
68 |
+
## Dataset Structure
|
69 |
+
|
70 |
+
### Data Instances
|
71 |
+
|
72 |
+
**What do the instances that comprise the dataset represent?**
|
73 |
+
Each represents a question, a context (document passage from the CORD19 dataset) and an answer.
|
74 |
+
|
75 |
+
**How many instances are there in total?**
|
76 |
+
2019 instances
|
77 |
+
|
78 |
+
**What data does each instance consist of?**
|
79 |
+
Each instance is a question, a set of answers, and an id associated with each answer.
|
80 |
+
|
81 |
+
[More Information Needed]
|
82 |
+
|
83 |
+
### Data Fields
|
84 |
+
|
85 |
+
The data was annotated in SQuAD style fashion, where each row contains:
|
86 |
+
|
87 |
+
* **question**: Query question
|
88 |
+
* **context**: Context text to obtain the answer from
|
89 |
+
* **document_id** The document ID of the context text
|
90 |
+
* **answer**: Dictionary containing the answer string and the start index
|
91 |
+
|
92 |
+
### Data Splits
|
93 |
+
|
94 |
+
**data/COVID-QA.json**: 2,019 question/answer pairs annotated by volunteer biomedical experts on scientific articles related to COVID-19.
|
95 |
+
|
96 |
+
[More Information Needed]
|
97 |
+
|
98 |
+
## Dataset Creation
|
99 |
+
|
100 |
+
### Curation Rationale
|
101 |
+
|
102 |
+
[More Information Needed]
|
103 |
+
|
104 |
+
### Source Data
|
105 |
+
|
106 |
+
#### Initial Data Collection and Normalization
|
107 |
+
|
108 |
+
The inital data collected comes from 147 scientific articles from the CORD-19 dataset. Question and answers were then
|
109 |
+
annotated afterwards.
|
110 |
+
|
111 |
+
#### Who are the source language producers?
|
112 |
+
|
113 |
+
[More Information Needed]
|
114 |
+
|
115 |
+
### Annotations
|
116 |
+
|
117 |
+
#### Annotation process
|
118 |
+
|
119 |
+
While annotators were volunteers, they were required to have at least a Master’s degree in biomedical sciences.
|
120 |
+
The annotation team was led by a medical doctor (G.A.R.) who vetted the volunteer’s credentials and
|
121 |
+
manually verified each question/answer pair produced. We used an existing, web-based annotation tool that had been
|
122 |
+
created by deepset and is available at their Neural Search framework [haystack](https://github.com/deepset-ai/haystack).
|
123 |
+
|
124 |
+
#### Who are the annotators?
|
125 |
+
|
126 |
+
The annotators are 15 volunteer biomedical experts on scientific articles related to COVID-19.
|
127 |
+
|
128 |
+
### Personal and Sensitive Information
|
129 |
+
|
130 |
+
[More Information Needed]
|
131 |
+
|
132 |
+
## Considerations for Using the Data
|
133 |
+
|
134 |
+
### Social Impact of Dataset
|
135 |
+
|
136 |
+
The dataset aims to help build question answering models serving clinical and scientific researchers, public health authorities, and frontline workers.
|
137 |
+
These QA systems can help them find answers and patterns in research papers by locating relevant answers to common questions from scientific articles.
|
138 |
+
|
139 |
+
### Discussion of Biases
|
140 |
+
|
141 |
+
[More Information Needed]
|
142 |
+
|
143 |
+
### Other Known Limitations
|
144 |
+
|
145 |
+
## Additional Information
|
146 |
+
|
147 |
+
The listed authors in the homepage are maintaining/supporting the dataset.
|
148 |
+
|
149 |
+
### Dataset Curators
|
150 |
+
|
151 |
+
[More Information Needed]
|
152 |
+
|
153 |
+
The Proto_qa dataset is licensed under
|
154 |
+
the [Apache License 2.0](https://github.com/deepset-ai/COVID-QA/blob/master/LICENSE)
|
155 |
+
|
156 |
+
[More Information Needed]
|
157 |
+
|
158 |
+
### Citation Information
|
159 |
+
|
160 |
+
```
|
161 |
+
@inproceedings{moller2020covid,
|
162 |
+
title={COVID-QA: A Question Answering Dataset for COVID-19},
|
163 |
+
author={M{\"o}ller, Timo and Reina, Anthony and Jayakumar, Raghavan and Pietsch, Malte},
|
164 |
+
booktitle={Proceedings of the 1st Workshop on NLP for COVID-19 at ACL 2020},
|
165 |
+
year={2020}
|
166 |
+
}
|
167 |
+
```
|
covid_qa_deepset.py
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# coding=utf-8
|
2 |
+
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
|
3 |
+
#
|
4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5 |
+
# you may not use this file except in compliance with the License.
|
6 |
+
# You may obtain a copy of the License at
|
7 |
+
#
|
8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9 |
+
#
|
10 |
+
# Unless required by applicable law or agreed to in writing, software
|
11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
+
# See the License for the specific language governing permissions and
|
14 |
+
# limitations under the License.
|
15 |
+
"""COVID-QA: A Question Answering Dataset for COVID-19."""
|
16 |
+
|
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 |
+
@inproceedings{moller2020covid,
|
27 |
+
title={COVID-QA: A Question Answering Dataset for COVID-19},
|
28 |
+
author={M{\"o}ller, Timo and Reina, Anthony and Jayakumar, Raghavan and Pietsch, Malte},
|
29 |
+
booktitle={Proceedings of the 1st Workshop on NLP for COVID-19 at ACL 2020},
|
30 |
+
year={2020}
|
31 |
+
}
|
32 |
+
"""
|
33 |
+
|
34 |
+
# You can copy an official description
|
35 |
+
_DESCRIPTION = """\
|
36 |
+
COVID-QA is a Question Answering dataset consisting of 2,019 question/answer pairs annotated by volunteer biomedical \
|
37 |
+
experts on scientific articles related to COVID-19.
|
38 |
+
"""
|
39 |
+
|
40 |
+
_HOMEPAGE = "https://github.com/deepset-ai/COVID-QA"
|
41 |
+
|
42 |
+
_LICENSE = "Apache License 2.0"
|
43 |
+
|
44 |
+
_URL = "https://raw.githubusercontent.com/deepset-ai/COVID-QA/master/data/question-answering/"
|
45 |
+
_URLs = {"covid_qa_deepset": _URL + "COVID-QA.json"}
|
46 |
+
|
47 |
+
|
48 |
+
class CovidQADeepset(datasets.GeneratorBasedBuilder):
|
49 |
+
VERSION = datasets.Version("1.0.0")
|
50 |
+
|
51 |
+
BUILDER_CONFIGS = [
|
52 |
+
datasets.BuilderConfig(name="covid_qa_deepset", version=VERSION, description="COVID-QA deepset"),
|
53 |
+
]
|
54 |
+
|
55 |
+
def _info(self):
|
56 |
+
features = datasets.Features(
|
57 |
+
{
|
58 |
+
"document_id": datasets.Value("int32"),
|
59 |
+
"context": datasets.Value("string"),
|
60 |
+
"question": datasets.Value("string"),
|
61 |
+
"is_impossible": datasets.Value("bool"),
|
62 |
+
"id": datasets.Value("int32"),
|
63 |
+
"answers": datasets.features.Sequence(
|
64 |
+
{
|
65 |
+
"text": datasets.Value("string"),
|
66 |
+
"answer_start": datasets.Value("int32"),
|
67 |
+
}
|
68 |
+
),
|
69 |
+
}
|
70 |
+
)
|
71 |
+
return datasets.DatasetInfo(
|
72 |
+
description=_DESCRIPTION,
|
73 |
+
features=features,
|
74 |
+
supervised_keys=None,
|
75 |
+
homepage=_HOMEPAGE,
|
76 |
+
license=_LICENSE,
|
77 |
+
citation=_CITATION,
|
78 |
+
)
|
79 |
+
|
80 |
+
def _split_generators(self, dl_manager):
|
81 |
+
url = _URLs[self.config.name]
|
82 |
+
downloaded_filepath = dl_manager.download_and_extract(url)
|
83 |
+
|
84 |
+
return [
|
85 |
+
datasets.SplitGenerator(
|
86 |
+
name=datasets.Split.TRAIN,
|
87 |
+
gen_kwargs={"filepath": downloaded_filepath},
|
88 |
+
),
|
89 |
+
]
|
90 |
+
|
91 |
+
def _generate_examples(self, filepath):
|
92 |
+
"""This function returns the examples in the raw (text) form."""
|
93 |
+
logging.info("generating examples from = %s", filepath)
|
94 |
+
with open(filepath, encoding="utf-8") as f:
|
95 |
+
covid_qa = json.load(f)
|
96 |
+
for article in covid_qa["data"]:
|
97 |
+
for paragraph in article["paragraphs"]:
|
98 |
+
context = paragraph["context"].strip()
|
99 |
+
document_id = paragraph["document_id"]
|
100 |
+
for qa in paragraph["qas"]:
|
101 |
+
question = qa["question"].strip()
|
102 |
+
is_impossible = qa["is_impossible"]
|
103 |
+
id_ = qa["id"]
|
104 |
+
|
105 |
+
answer_starts = [answer["answer_start"] for answer in qa["answers"]]
|
106 |
+
answers = [answer["text"].strip() for answer in qa["answers"]]
|
107 |
+
|
108 |
+
# Features currently used are "context", "question", and "answers".
|
109 |
+
# Others are extracted here for the ease of future expansions.
|
110 |
+
yield id_, {
|
111 |
+
"document_id": document_id,
|
112 |
+
"context": context,
|
113 |
+
"question": question,
|
114 |
+
"is_impossible": is_impossible,
|
115 |
+
"id": id_,
|
116 |
+
"answers": {
|
117 |
+
"answer_start": answer_starts,
|
118 |
+
"text": answers,
|
119 |
+
},
|
120 |
+
}
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"covid_qa_deepset": {"description": "COVID-QA is a Question Answering dataset consisting of 2,019 question/answer pairs annotated by volunteer biomedical experts on scientific articles related to COVID-19.\n", "citation": "@inproceedings{moller2020covid,\n title={COVID-QA: A Question Answering Dataset for COVID-19},\n author={M{\"o}ller, Timo and Reina, Anthony and Jayakumar, Raghavan and Pietsch, Malte},\n booktitle={Proceedings of the 1st Workshop on NLP for COVID-19 at ACL 2020},\n year={2020}\n}\n", "homepage": "https://github.com/deepset-ai/COVID-QA", "license": "Apache License 2.0", "features": {"document_id": {"dtype": "int32", "id": null, "_type": "Value"}, "context": {"dtype": "string", "id": null, "_type": "Value"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "is_impossible": {"dtype": "bool", "id": null, "_type": "Value"}, "id": {"dtype": "int32", "id": null, "_type": "Value"}, "answers": {"feature": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "answer_start": {"dtype": "int32", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "covid_qa_deepset", "config_name": "covid_qa_deepset", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 65151262, "num_examples": 2019, "dataset_name": "covid_qa_deepset"}}, "download_checksums": {"https://raw.githubusercontent.com/deepset-ai/COVID-QA/master/data/question-answering/COVID-QA.json": {"num_bytes": 4418117, "checksum": "291abf17f4bc2bd343838fd8ef5debb6278bbbb61b262db1f1bd58048fff76b9"}}, "download_size": 4418117, "post_processing_size": null, "dataset_size": 65151262, "size_in_bytes": 69569379}}
|
dummy/covid_qa_deepset/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:81fc18531ae3619c401353c898190cc4f7daa003215bd906f6f8e69dc2599615
|
3 |
+
size 29341
|