Convert dataset to Parquet
#4
by albertvillanova HF Staff - opened
Files changed (6)
- README.md+14-5
- data/test-00000-of-00001.parquetAdded+3
- data/train-00000-of-00001.parquetAdded+3
- data/validation-00000-of-00001.parquetAdded+3
- dataset_infos.jsonDeleted-1
- medmcqa.pyDeleted-116
52 unmodified lines5354555657585960616263646566676852 unmodified linesdtype: stringsplits:- name: trainnum_bytes: 131904057num_examples: 182822- name: testnum_bytes: 1447829num_examples: 6150- name: validationnum_bytes: 2221468num_examples: 4183download_size: 55285460dataset_size: 135573354---# Dataset Card for MedMCQA52 unmodified lines5354555657585960616263646566676869707172737475767752 unmodified linesdtype: stringsplits:- name: trainnum_bytes: 131903297num_examples: 182822- name: testnum_bytes: 1399350num_examples: 6150- name: validationnum_bytes: 2221428num_examples: 4183download_size: 88311487dataset_size: 135524075configs:- config_name: defaultdata_files:- split: trainpath: data/train-*- split: testpath: data/test-*- split: validationpath: data/validation-*---# Dataset Card for MedMCQA
123version https://git-lfs.github.com/spec/v1oid sha256:1d308841f0c82df363d3d638b33b69b8abd266b1e615ae5d2607dbb24c70beb1size 936358123version https://git-lfs.github.com/spec/v1oid sha256:b119434ba551517a6ec0ba1f7e0b4c029165ed284a4704f262ce37c791c493c5size 85899025123version https://git-lfs.github.com/spec/v1oid sha256:b768a1ea34afc9f80d3106d9b21f80fa8a00ec450a1f6cd641af72ca9e591021size 14761041{"default": {"description": "MedMCQA is a large-scale, Multiple-Choice Question Answering (MCQA) dataset designed to address real-world medical entrance exam questions. \nMedMCQA has more than 194k high-quality AIIMS & NEET PG entrance exam MCQs covering 2.4k healthcare topics and 21 medical subjects are collected with an average token length of 12.77 and high topical diversity.\nThe dataset contains questions about the following topics: Anesthesia, Anatomy, Biochemistry, Dental, ENT, Forensic Medicine (FM)\nObstetrics and Gynecology (O&G), Medicine, Microbiology, Ophthalmology, Orthopedics Pathology, Pediatrics, Pharmacology, Physiology, \nPsychiatry, Radiology Skin, Preventive & Social Medicine (PSM) and Surgery\n", "citation": "CHILL'2022", "homepage": "https://medmcqa.github.io", "license": "Apache License 2.0", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "opa": {"dtype": "string", "id": null, "_type": "Value"}, "opb": {"dtype": "string", "id": null, "_type": "Value"}, "opc": {"dtype": "string", "id": null, "_type": "Value"}, "opd": {"dtype": "string", "id": null, "_type": "Value"}, "cop": {"num_classes": 4, "names": ["a", "b", "c", "d"], "id": null, "_type": "ClassLabel"}, "choice_type": {"dtype": "string", "id": null, "_type": "Value"}, "exp": {"dtype": "string", "id": null, "_type": "Value"}, "subject_name": {"dtype": "string", "id": null, "_type": "Value"}, "topic_name": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "med_mcqa", "config_name": "default", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 131904057, "num_examples": 182822, "dataset_name": "med_mcqa"}, "test": {"name": "test", "num_bytes": 1447829, "num_examples": 6150, "dataset_name": "med_mcqa"}, "validation": {"name": "validation", "num_bytes": 2221468, "num_examples": 4183, "dataset_name": "med_mcqa"}}, "download_checksums": {"https://drive.google.com/uc?export=download&id=15VkJdq5eyWIkfb_aoD3oS8i4tScbHYky": {"num_bytes": 55285460, "checksum": "16c1fbc6f47d548d2af7837b18e893aa45f45c0be9bda0a9adfff3c625bf9262"}}, "download_size": 55285460, "post_processing_size": null, "dataset_size": 135573354, "size_in_bytes": 190858814}}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116# coding=utf-8# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.## Licensed under the Apache License, Version 2.0 (the "License");# you may not use this file except in compliance with the License.# You may obtain a copy of the License at## http://www.apache.org/licenses/LICENSE-2.0## Unless required by applicable law or agreed to in writing, software# distributed under the License is distributed on an "AS IS" BASIS,# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License."""MedMCQA : A Large-scale Multi-Subject Multi-Choice Dataset for Medical domain Question Answering"""
import jsonimport os
import datasets
_DESCRIPTION = """\MedMCQA is a large-scale, Multiple-Choice Question Answering (MCQA) dataset designed to address real-world medical entrance exam questions.MedMCQA has more than 194k high-quality AIIMS & NEET PG entrance exam MCQs covering 2.4k healthcare topics and 21 medical subjects are collected with an average token length of 12.77 and high topical diversity.The dataset contains questions about the following topics: Anesthesia, Anatomy, Biochemistry, Dental, ENT, Forensic Medicine (FM)Obstetrics and Gynecology (O&G), Medicine, Microbiology, Ophthalmology, Orthopedics Pathology, Pediatrics, Pharmacology, Physiology,Psychiatry, Radiology Skin, Preventive & Social Medicine (PSM) and Surgery"""
_HOMEPAGE = "https://medmcqa.github.io"
_LICENSE = "Apache License 2.0"_URL = "https://drive.google.com/uc?export=download&id=15VkJdq5eyWIkfb_aoD3oS8i4tScbHYky"_CITATION = """\@InProceedings{pmlr-v174-pal22a, title = {MedMCQA: A Large-scale Multi-Subject Multi-Choice Dataset for Medical domain Question Answering}, author = {Pal, Ankit and Umapathi, Logesh Kumar and Sankarasubbu, Malaikannan}, booktitle = {Proceedings of the Conference on Health, Inference, and Learning}, pages = {248--260}, year = {2022}, editor = {Flores, Gerardo and Chen, George H and Pollard, Tom and Ho, Joyce C and Naumann, Tristan}, volume = {174}, series = {Proceedings of Machine Learning Research}, month = {07--08 Apr}, publisher = {PMLR}, pdf = {https://proceedings.mlr.press/v174/pal22a/pal22a.pdf}, url = {https://proceedings.mlr.press/v174/pal22a.html}, abstract = {This paper introduces MedMCQA, a new large-scale, Multiple-Choice Question Answering (MCQA) dataset designed to address real-world medical entrance exam questions. More than 194k high-quality AIIMS & NEET PG entrance exam MCQs covering 2.4k healthcare topics and 21 medical subjects are collected with an average token length of 12.77 and high topical diversity. Each sample contains a question, correct answer(s), and other options which requires a deeper language understanding as it tests the 10+ reasoning abilities of a model across a wide range of medical subjects & topics. A detailed explanation of the solution, along with the above information, is provided in this study.}}"""
class MedMCQA(datasets.GeneratorBasedBuilder): """MedMCQA : A Large-scale Multi-Subject Multi-Choice Dataset for Medical domain Question Answering"""
VERSION = datasets.Version("1.1.0")
def _info(self):
features = datasets.Features( { "id": datasets.Value("string"), "question": datasets.Value("string"), "opa": datasets.Value("string"), "opb": datasets.Value("string"), "opc": datasets.Value("string"), "opd": datasets.Value("string"), "cop": datasets.features.ClassLabel(names=["a", "b", "c", "d"]), "choice_type": datasets.Value("string"), "exp": datasets.Value("string"), "subject_name": datasets.Value("string"), "topic_name": datasets.Value("string"), } ) return datasets.DatasetInfo( description=_DESCRIPTION, features=features, homepage=_HOMEPAGE, license=_LICENSE, citation=_CITATION, )
def _split_generators(self, dl_manager): """Returns SplitGenerators.""" data_dir = dl_manager.download_and_extract(_URL) return [ datasets.SplitGenerator( name=datasets.Split.TRAIN, gen_kwargs={ "filepath": os.path.join(data_dir, "train.json"), }, ), datasets.SplitGenerator( name=datasets.Split.TEST, gen_kwargs={ "filepath": os.path.join(data_dir, "test.json"), }, ), datasets.SplitGenerator( name=datasets.Split.VALIDATION, gen_kwargs={ "filepath": os.path.join(data_dir, "dev.json"), }, ), ]
def _generate_examples(self, filepath): with open(filepath, encoding="utf-8") as f: for key, row in enumerate(f): data = json.loads(row) data["cop"] = int(data.get("cop", 0)) - 1 data["exp"] = data.get("exp", "") yield key, dataREADME.md+14-5
data/test-00000-of-00001.parquetAdded+3
data/train-00000-of-00001.parquetAdded+3
data/validation-00000-of-00001.parquetAdded+3
dataset_infos.jsonDeleted-1
medmcqa.pyDeleted-116