Datasets:

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

Delete loading script

Browse files
Files changed (1) hide show
  1. medical_questions_pairs.py +0 -83
medical_questions_pairs.py DELETED
@@ -1,83 +0,0 @@
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
-
18
- import csv
19
-
20
- import datasets
21
-
22
-
23
- # TODO: Add BibTeX citation
24
- # Find for instance the citation on arxiv or on the dataset repo/website
25
- _CITATION = """\
26
- @misc{mccreery2020effective,
27
- title={Effective Transfer Learning for Identifying Similar Questions: Matching User Questions to COVID-19 FAQs},
28
- author={Clara H. McCreery and Namit Katariya and Anitha Kannan and Manish Chablani and Xavier Amatriain},
29
- year={2020},
30
- eprint={2008.13546},
31
- archivePrefix={arXiv},
32
- primaryClass={cs.IR}
33
- }
34
- """
35
-
36
-
37
- _DESCRIPTION = """\
38
- This dataset consists of 3048 similar and dissimilar medical question pairs hand-generated and labeled by Curai's doctors.
39
- """
40
-
41
- _HOMEPAGE = "https://github.com/curai/medical-question-pair-dataset"
42
-
43
- _LICENSE = ""
44
-
45
-
46
- _URL = "https://raw.githubusercontent.com/curai/medical-question-pair-dataset/master/mqp.csv"
47
-
48
-
49
- class MedicalQuestionsPairs(datasets.GeneratorBasedBuilder):
50
- """Medical Question Pairs (MQP) Dataset"""
51
-
52
- def _info(self):
53
- features = datasets.Features(
54
- {
55
- "dr_id": datasets.Value("int32"),
56
- "question_1": datasets.Value("string"),
57
- "question_2": datasets.Value("string"),
58
- "label": datasets.features.ClassLabel(num_classes=2, names=[0, 1]),
59
- }
60
- )
61
- return datasets.DatasetInfo(
62
- description=_DESCRIPTION,
63
- features=features,
64
- homepage=_HOMEPAGE,
65
- license=_LICENSE,
66
- citation=_CITATION,
67
- )
68
-
69
- def _split_generators(self, dl_manager):
70
- data_file = dl_manager.download_and_extract(_URL)
71
- return [datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_file})]
72
-
73
- def _generate_examples(self, filepath):
74
- """Yields examples."""
75
- with open(filepath, encoding="utf-8") as f:
76
- data = csv.reader(f)
77
- for id_, row in enumerate(data):
78
- yield id_, {
79
- "dr_id": row[0],
80
- "question_1": row[1],
81
- "question_2": row[2],
82
- "label": row[3],
83
- }