Convert dataset to Parquet (#1)
Browse files- Convert dataset to Parquet (2afbe3fbb5e25a3e9e667d43898d4a9cfe5ecbb4)
- Delete loading script (cbc69054432fb4f39d883e00946f6455080fe8c2)
- Delete data file (89dcb00f5b62c083aef90cdac77168840924d13a)
- Delete data file (8cfc5e4d61867931190908b9acf1419ce2ce1508)
- Delete data file (b467dd94d77320c09bc082a8e12a1ce467270874)
- Delete data file (149c2e898f90c5c0f73cadac97e49ef5c20e83b5)
- Delete data file (042802ce8e5d289cbfa4810ebe536902668c42d4)
- Delete data file (b938183677d3bf6e95c45312a4029a5e1d2c0cc1)
- README.md +29 -0
- data/test-00000-of-00001.parquet +3 -0
- data/train-00000-of-00001.parquet +3 -0
- data/validation-00000-of-00001.parquet +3 -0
- med_paragraph_simplification.py +0 -156
- test.source +0 -0
- test.target +0 -0
- train.source +0 -0
- train.target +0 -0
- valid.source +0 -0
- valid.target +0 -0
README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
dataset_info:
|
| 3 |
+
features:
|
| 4 |
+
- name: query
|
| 5 |
+
dtype: string
|
| 6 |
+
- name: answer
|
| 7 |
+
dtype: string
|
| 8 |
+
splits:
|
| 9 |
+
- name: train
|
| 10 |
+
num_bytes: 13113502
|
| 11 |
+
num_examples: 3568
|
| 12 |
+
- name: validation
|
| 13 |
+
num_bytes: 1478861
|
| 14 |
+
num_examples: 411
|
| 15 |
+
- name: test
|
| 16 |
+
num_bytes: 2197300
|
| 17 |
+
num_examples: 480
|
| 18 |
+
download_size: 8317119
|
| 19 |
+
dataset_size: 16789663
|
| 20 |
+
configs:
|
| 21 |
+
- config_name: default
|
| 22 |
+
data_files:
|
| 23 |
+
- split: train
|
| 24 |
+
path: data/train-*
|
| 25 |
+
- split: validation
|
| 26 |
+
path: data/validation-*
|
| 27 |
+
- split: test
|
| 28 |
+
path: data/test-*
|
| 29 |
+
---
|
data/test-00000-of-00001.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1d4361d36cd7c3d9da49a05c10dc8c37c3cf032c6e4346411481aa534a9a128b
|
| 3 |
+
size 1087845
|
data/train-00000-of-00001.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8b6f1b346b4ff10486e1afae9a000dacd799dd3a533baddbae79188fd70ed65d
|
| 3 |
+
size 6484808
|
data/validation-00000-of-00001.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:565daf7faec78e1e724d33b64369fc50a20204cf976724b89bb4957499fa99db
|
| 3 |
+
size 744466
|
med_paragraph_simplification.py
DELETED
|
@@ -1,156 +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 |
-
"""Covid Dialog dataset in English and Chinese"""
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
import copy
|
| 19 |
-
import os
|
| 20 |
-
import re
|
| 21 |
-
import textwrap
|
| 22 |
-
|
| 23 |
-
import datasets
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
# BibTeX citation
|
| 27 |
-
_CITATION = """\
|
| 28 |
-
@inproceedings{devaraj-etal-2021-paragraph,
|
| 29 |
-
title = "Paragraph-level Simplification of Medical Texts",
|
| 30 |
-
author = "Devaraj, Ashwin and Marshall, Iain and Wallace, Byron and Li, Junyi Jessy",
|
| 31 |
-
booktitle = "Proceedings of the 2021 Conference of the North American Chapter of the Association for
|
| 32 |
-
Computational Linguistics",
|
| 33 |
-
month = jun,
|
| 34 |
-
year = "2021",
|
| 35 |
-
publisher = "Association for Computational Linguistics",
|
| 36 |
-
url = "https://www.aclweb.org/anthology/2021.naacl-main.395",
|
| 37 |
-
pages = "4972--4984",
|
| 38 |
-
|
| 39 |
-
"""
|
| 40 |
-
|
| 41 |
-
# Official description of the dataset
|
| 42 |
-
_DESCRIPTION = textwrap.dedent(
|
| 43 |
-
"""
|
| 44 |
-
"Paragraph-level Simplification of Medical Texts" (Devaraj et al.) studies the problem of learning to simplify
|
| 45 |
-
medical texts. One of their contributions is a new corpus that is composed of technical abstracts and their
|
| 46 |
-
lay summaries on various clinical topics.
|
| 47 |
-
|
| 48 |
-
The author generated train/val/test splits, which are available in the GitHub repository linked in the paper.
|
| 49 |
-
|
| 50 |
-
The following is an example from the dataset:
|
| 51 |
-
|
| 52 |
-
{
|
| 53 |
-
"doi": "10.1002/14651858.CD011112.pub2",
|
| 54 |
-
"abstract": "We included six studies (reported as seven papers) involving 326 participants whose ages ranged
|
| 55 |
-
from 39 to 83 years, with a gender bias towards men (73% to 95% across studies), reflecting the characteristics
|
| 56 |
-
of patients with HNC. The risk of bias in the studies was generally high. We did not pool data from studies
|
| 57 |
-
because of significant differences in the interventions and outcomes evaluated. We found a lack of
|
| 58 |
-
standardisation and consistency in the outcomes measured and the endpoints at which they were evaluated.
|
| 59 |
-
We found no evidence that therapeutic exercises were better than TAU, or any other treatment, in improving the
|
| 60 |
-
safety and efficiency of oral swallowing (our primary outcome) or in improving any of the secondary outcomes.
|
| 61 |
-
Using the GRADE system, we classified the overall quality of the evidence for each outcome as very low, due to
|
| 62 |
-
the limited number of trials and their low quality. There were no adverse events reported that were directly
|
| 63 |
-
attributable to the intervention (swallowing exercises). We found no evidence that undertaking therapeutic
|
| 64 |
-
exercises before, during and/or immediately after HNC treatment leads to improvement in oral swallowing. This
|
| 65 |
-
absence of evidence may be due to the small participant numbers in trials, resulting in insufficient power to
|
| 66 |
-
detect any difference. Data from the identified trials could not be combined due to differences in the choice
|
| 67 |
-
of primary outcomes and in the measurement tools used to assess them, and the differing baseline and endpoints
|
| 68 |
-
across studies. Designing and implementing studies with stronger methodological rigour is essential. There needs
|
| 69 |
-
to be agreement about the key primary outcomes, the choice of validated assessment tools to measure them and the
|
| 70 |
-
time points at which those measurements are made.",
|
| 71 |
-
"pls": "We included six studies with 326 participants who undertook therapeutic exercises before, during and/or
|
| 72 |
-
after HNC treatment. We could not combine the results of the studies because of the variation in participants'
|
| 73 |
-
cancers, their treatments, the outcomes measured and the tools used to assess them, as well as the differing
|
| 74 |
-
time points for testing. Researchers have compared: (i) therapeutic exercises versus treatment as usual (TAU);
|
| 75 |
-
(ii) therapeutic exercises versus sham therapy; (iii) therapeutic exercises plus TAU versus TAU. The therapeutic
|
| 76 |
-
exercises varied in their design, timing and intensity. TAU involved managing patients' dysphagia when it
|
| 77 |
-
occurred, including inserting a tube for non-oral feeding. The evidence is up to date to 1 July 2016. We found
|
| 78 |
-
no evidence that therapeutic exercises were better than TAU, or any other treatment, in improving the safety and
|
| 79 |
-
efficiency of oral swallowing (our primary outcome) or in improving any of the secondary outcomes. However,
|
| 80 |
-
there is insufficient evidence to draw any clear conclusion about the effects of undertaking therapeutic
|
| 81 |
-
exercises before during and/or immediately after HNC treatment on preventing or reducing dysphagia. Studies had
|
| 82 |
-
small participant numbers, used complex interventions and varied in the choice of outcomes measured, making it
|
| 83 |
-
difficult to draw reliable conclusions. There were no reported adverse events directly attributable to the
|
| 84 |
-
intervention (swallowing exercises). The current quality of the evidence to support the use of therapeutic
|
| 85 |
-
exercises before, during and/or immediately after HNC treatment to prevent/reduce dysphagia is very low. We need
|
| 86 |
-
better designed, rigorous studies with larger participant numbers and agreed endpoints and outcome measurements
|
| 87 |
-
in order to draw clear(er) conclusions."
|
| 88 |
-
},
|
| 89 |
-
|
| 90 |
-
where "pls" stands for "plain-language summary".
|
| 91 |
-
|
| 92 |
-
Paper: http://arxiv.org/abs/2104.05767
|
| 93 |
-
Code: https://github.com/AshOlogn/Paragraph-level-Simplification-of-Medical-Texts
|
| 94 |
-
"""
|
| 95 |
-
)
|
| 96 |
-
|
| 97 |
-
# Link to an official homepage for the dataset here
|
| 98 |
-
_HOMEPAGE = "https://github.com/AshOlogn/Paragraph-level-Simplification-of-Medical-Texts"
|
| 99 |
-
|
| 100 |
-
_LICENSE = ""
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
import datasets
|
| 104 |
-
import os
|
| 105 |
-
import json
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
class Builder(datasets.GeneratorBasedBuilder):
|
| 109 |
-
VERSION = datasets.Version("1.0.0")
|
| 110 |
-
|
| 111 |
-
BUILDER_CONFIGS = [datasets.BuilderConfig(name="default", version=datasets.Version("1.0.0"), description=_DESCRIPTION)]
|
| 112 |
-
|
| 113 |
-
def _info(self):
|
| 114 |
-
features = datasets.Features(
|
| 115 |
-
{
|
| 116 |
-
"query": datasets.Value("string"),
|
| 117 |
-
"answer": datasets.Value("string"),
|
| 118 |
-
}
|
| 119 |
-
)
|
| 120 |
-
return datasets.DatasetInfo(
|
| 121 |
-
description=f"Covid Dialogue dataset, as preprocessed and shuffled in HELM",
|
| 122 |
-
features=features,
|
| 123 |
-
homepage=_HOMEPAGE,
|
| 124 |
-
license=_LICENSE,
|
| 125 |
-
citation=_CITATION,
|
| 126 |
-
)
|
| 127 |
-
|
| 128 |
-
def _split_generators(self, dl_manager):
|
| 129 |
-
test_target = dl_manager.download("test.source")
|
| 130 |
-
test_source = dl_manager.download("test.source")
|
| 131 |
-
train_source = dl_manager.download("train.source")
|
| 132 |
-
train_target = dl_manager.download("train.target")
|
| 133 |
-
val_source = dl_manager.download("valid.source")
|
| 134 |
-
val_target = dl_manager.download("valid.target")
|
| 135 |
-
|
| 136 |
-
return [
|
| 137 |
-
datasets.SplitGenerator(
|
| 138 |
-
name=datasets.Split.TRAIN,
|
| 139 |
-
gen_kwargs={"target": train_target, "source": train_source},
|
| 140 |
-
),
|
| 141 |
-
datasets.SplitGenerator(
|
| 142 |
-
name=datasets.Split.VALIDATION,
|
| 143 |
-
gen_kwargs={"target": val_target, "source": val_source},
|
| 144 |
-
),
|
| 145 |
-
datasets.SplitGenerator(
|
| 146 |
-
name=datasets.Split.TEST,
|
| 147 |
-
gen_kwargs={"target": test_target, "source": test_source},
|
| 148 |
-
),
|
| 149 |
-
]
|
| 150 |
-
|
| 151 |
-
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
| 152 |
-
def _generate_examples(self, source, target):
|
| 153 |
-
with open(source, encoding="utf-8") as f_source:
|
| 154 |
-
with open(target, encoding="utf-8") as f_target:
|
| 155 |
-
for idx, (s, t) in enumerate(zip(f_source, f_target)):
|
| 156 |
-
yield idx, {"query": s.rstrip(), "answer": t.rstrip()}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test.source
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
test.target
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
train.source
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
train.target
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
valid.source
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
valid.target
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|