Datasets:

Languages:
English
Multilinguality:
monolingual
Size Categories:
1K<n<10K
Language Creators:
other
Annotations Creators:
expert-generated
Source Datasets:
original
ArXiv:
Tags:
License:
system HF staff commited on
Commit
62d7f1a
0 Parent(s):

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.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,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - other
6
+ languages:
7
+ - en
8
+ licenses:
9
+ - unknown
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 1K<n<10K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - text-classification
18
+ task_ids:
19
+ - semantic-similarity-classification
20
+ ---
21
+
22
+ # Dataset Card for [medical_questions_pairs]
23
+
24
+ ## Table of Contents
25
+ - [Dataset Description](#dataset-description)
26
+ - [Dataset Summary](#dataset-summary)
27
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
28
+ - [Languages](#languages)
29
+ - [Dataset Structure](#dataset-structure)
30
+ - [Data Instances](#data-instances)
31
+ - [Data Fields](#data-instances)
32
+ - [Data Splits](#data-instances)
33
+ - [Dataset Creation](#dataset-creation)
34
+ - [Curation Rationale](#curation-rationale)
35
+ - [Source Data](#source-data)
36
+ - [Annotations](#annotations)
37
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
38
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
39
+ - [Social Impact of Dataset](#social-impact-of-dataset)
40
+ - [Discussion of Biases](#discussion-of-biases)
41
+ - [Other Known Limitations](#other-known-limitations)
42
+ - [Additional Information](#additional-information)
43
+ - [Dataset Curators](#dataset-curators)
44
+ - [Licensing Information](#licensing-information)
45
+ - [Citation Information](#citation-information)
46
+
47
+ ## Dataset Description
48
+ - **Repository:** [Medical questions pairs repository](https://github.com/curai/medical-question-pair-dataset)
49
+ - **Paper:** [Effective Transfer Learning for Identifying Similar Questions:Matching User Questions to COVID-19 FAQs](https://arxiv.org/abs/2008.13546)
50
+
51
+ ### Dataset Summary
52
+
53
+ This dataset consists of 3048 similar and dissimilar medical question pairs hand-generated and labeled by Curai's doctors. Doctors with a list of 1524 patient-asked questions randomly sampled from the publicly available crawl of [HealthTap](https://github.com/durakkerem/Medical-Question-Answer-Datasets). Each question results in one similar and one different pair through the following instructions provided to the labelers:
54
+
55
+ - Rewrite the original question in a different way while maintaining the same intent. Restructure the syntax as much as possible and change medical details that would not impact your response. e.g. "I'm a 22-y-o female" could become "My 26 year old daughter"
56
+ - Come up with a related but dissimilar question for which the answer to the original question would be WRONG OR IRRELEVANT. Use similar key words.
57
+
58
+ The first instruction generates a positive question pair (similar) and the second generates a negative question pair (different). With the above instructions, the task was intentionally framed such that positive question pairs can look very different by superficial metrics, and negative question pairs can conversely look very similar. This ensures that the task is not trivial.
59
+
60
+
61
+ ### Supported Tasks and Leaderboards
62
+
63
+ - `text-classification` : The dataset can be used to train a model to identify similar and non similar medical question pairs.
64
+
65
+ ### Languages
66
+
67
+ The text in the dataset is in English.
68
+
69
+ ## Dataset Structure
70
+
71
+ ### Data Instances
72
+
73
+ The dataset contains dr_id, question_1, question_2, label. 11 different doctors were used for this task so dr_id ranges from 1 to 11. The label is 1 if the question pair is similar and 0 otherwise.
74
+
75
+
76
+ ### Data Fields
77
+
78
+ - `dr_id`: 11 different doctors were used for this task so dr_id ranges from 1 to 11
79
+ - `question_1`: Original Question
80
+ - `question_2`: Rewritten Question maintaining the same intent like Original Question
81
+ - `label`: The label is 1 if the question pair is similar and 0 otherwise.
82
+
83
+ ### Data Splits
84
+
85
+ The dataset as of now consists of only one split(train) but can be split seperately based on the requirement
86
+
87
+ | | Tain |
88
+ | ----- | ------ |
89
+ | Non similar Question Pairs | 1524 |
90
+ | Similar Question Pairs | 1524 |
91
+
92
+ ## Dataset Creation
93
+ Doctors with a list of 1524 patient-asked questions randomly sampled from the publicly available crawl of [HealthTap](https://github.com/durakkerem/Medical-Question-Answer-Datasets). Each question results in one similar and one different pair through the following instructions provided to the labelers:
94
+
95
+ - Rewrite the original question in a different way while maintaining the same intent. Restructure the syntax as much as possible and change medical details that would not impact your response. e.g. "I'm a 22-y-o female" could become "My 26 year old daughter"
96
+ - Come up with a related but dissimilar question for which the answer to the original question would be WRONG OR IRRELEVANT. Use similar key words.
97
+
98
+ The first instruction generates a positive question pair (similar) and the second generates a negative question pair (different). With the above instructions, the task was intentionally framed such that positive question pairs can look very different by superficial metrics, and negative question pairs can conversely look very similar. This ensures that the task is not trivial.
99
+
100
+ ### Curation Rationale
101
+ [More Information Needed]
102
+
103
+ ### Source Data
104
+ 1524 patient-asked questions randomly sampled from the publicly available crawl of [HealthTap](https://github.com/durakkerem/Medical-Question-Answer-Datasets)
105
+
106
+ #### Initial Data Collection and Normalization
107
+ [More Information Needed]
108
+
109
+ #### Who are the source language producers?
110
+ [More Information Needed]
111
+
112
+ ### Annotations
113
+ [More Information Needed]
114
+
115
+ #### Annotation process
116
+
117
+ Doctors with a list of 1524 patient-asked questions randomly sampled from the publicly available crawl of [HealthTap](https://github.com/durakkerem/Medical-Question-Answer-Datasets). Each question results in one similar and one different pair through the following instructions provided to the labelers:
118
+
119
+ - Rewrite the original question in a different way while maintaining the same intent. Restructure the syntax as much as possible and change medical details that would not impact your response. e.g. "I'm a 22-y-o female" could become "My 26 year old daughter"
120
+ - Come up with a related but dissimilar question for which the answer to the original question would be WRONG OR IRRELEVANT. Use similar key words.
121
+
122
+ The first instruction generates a positive question pair (similar) and the second generates a negative question pair (different). With the above instructions, the task was intentionally framed such that positive question pairs can look very different by superficial metrics, and negative question pairs can conversely look very similar. This ensures that the task is not trivial.
123
+
124
+ #### Who are the annotators?
125
+ **Curai's doctors**
126
+
127
+ ### Personal and Sensitive Information
128
+ [More Information Needed]
129
+
130
+ ## Considerations for Using the Data
131
+ [More Information Needed]
132
+
133
+ ### Social Impact of Dataset
134
+ [More Information Needed]
135
+
136
+ ### Discussion of Biases
137
+ [More Information Needed]
138
+
139
+ ### Other Known Limitations
140
+ [More Information Needed]
141
+
142
+ ## Additional Information
143
+ [More Information Needed]
144
+
145
+ ### Dataset Curators
146
+ [More Information Needed]
147
+
148
+ ### Licensing Information
149
+ [More Information Needed]
150
+
151
+ ### Citation Information
152
+ ```
153
+ @misc{mccreery2020effective,
154
+ title={Effective Transfer Learning for Identifying Similar Questions: Matching User Questions to COVID-19 FAQs},
155
+ author={Clara H. McCreery and Namit Katariya and Anitha Kannan and Manish Chablani and Xavier Amatriain},
156
+ year={2020},
157
+ eprint={2008.13546},
158
+ archivePrefix={arXiv},
159
+ primaryClass={cs.IR}
160
+ }
161
+ ```
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"default": {"description": "This dataset consists of 3048 similar and dissimilar medical question pairs hand-generated and labeled by Curai's doctors.\n", "citation": "", "homepage": "https://github.com/curai/medical-question-pair-dataset", "license": "", "features": {"dr_id": {"dtype": "int32", "id": null, "_type": "Value"}, "question_1": {"dtype": "string", "id": null, "_type": "Value"}, "question_2": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 2, "names": [0, 1], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "medical_questions_pairs", "config_name": "default", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 701650, "num_examples": 3048, "dataset_name": "medical_questions_pairs"}}, "download_checksums": {"https://raw.githubusercontent.com/curai/medical-question-pair-dataset/master/mqp.csv": {"num_bytes": 665688, "checksum": "94ecd609a9ca9350e1cff2438aa55a034762f01c1a68732aaae3e4be7b03cf57"}}, "download_size": 665688, "post_processing_size": null, "dataset_size": 701650, "size_in_bytes": 1367338}}
dummy/0.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed01ae0e65ae951198dfcd7c597b5c532d29177af66798a8263b04e2eaf27c94
3
+ size 598
medical_questions_pairs.py ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """Medical Question Pairs (MQP) Dataset"""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import csv
20
+
21
+ import datasets
22
+
23
+
24
+ # TODO: Add BibTeX citation
25
+ # Find for instance the citation on arxiv or on the dataset repo/website
26
+ _CITATION = """\
27
+ @misc{mccreery2020effective,
28
+ title={Effective Transfer Learning for Identifying Similar Questions: Matching User Questions to COVID-19 FAQs},
29
+ author={Clara H. McCreery and Namit Katariya and Anitha Kannan and Manish Chablani and Xavier Amatriain},
30
+ year={2020},
31
+ eprint={2008.13546},
32
+ archivePrefix={arXiv},
33
+ primaryClass={cs.IR}
34
+ }
35
+ """
36
+
37
+
38
+ _DESCRIPTION = """\
39
+ This dataset consists of 3048 similar and dissimilar medical question pairs hand-generated and labeled by Curai's doctors.
40
+ """
41
+
42
+ _HOMEPAGE = "https://github.com/curai/medical-question-pair-dataset"
43
+
44
+ _LICENSE = ""
45
+
46
+
47
+ _URL = "https://raw.githubusercontent.com/curai/medical-question-pair-dataset/master/mqp.csv"
48
+
49
+
50
+ class MedicalQuestionsPairs(datasets.GeneratorBasedBuilder):
51
+ """Medical Question Pairs (MQP) Dataset"""
52
+
53
+ def _info(self):
54
+ features = datasets.Features(
55
+ {
56
+ "dr_id": datasets.Value("int32"),
57
+ "question_1": datasets.Value("string"),
58
+ "question_2": datasets.Value("string"),
59
+ "label": datasets.features.ClassLabel(num_classes=2, names=[0, 1]),
60
+ }
61
+ )
62
+ return datasets.DatasetInfo(
63
+ description=_DESCRIPTION,
64
+ features=features,
65
+ homepage=_HOMEPAGE,
66
+ license=_LICENSE,
67
+ citation=_CITATION,
68
+ )
69
+
70
+ def _split_generators(self, dl_manager):
71
+ data_file = dl_manager.download_and_extract(_URL)
72
+ return [datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_file})]
73
+
74
+ def _generate_examples(self, filepath):
75
+ """ Yields examples. """
76
+ with open(filepath, encoding="utf-8") as f:
77
+ data = csv.reader(f)
78
+ for id_, row in enumerate(data):
79
+ yield id_, {
80
+ "dr_id": row[0],
81
+ "question_1": row[1],
82
+ "question_2": row[2],
83
+ "label": row[3],
84
+ }