albertvillanova HF staff commited on
Commit
2de1243
1 Parent(s): 2fe9cee

Convert dataset to Parquet (#2)

Browse files

- Convert dataset to Parquet (8df203ff9fc456f7d556f6633e586bb5d58efe0e)
- Add ParaphraseRC data files (9a65b20d783dc0069598fe59e248510b17528075)
- Delete loading script (b9a503041393154e8dbe1bb2f9c69b6d4e2f4ce5)
- Delete legacy dataset_infos.json (6bb234bf3db175bb17a1b1d7bfda6dfbda4197c5)

ParaphraseRC/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6365f9178c615f3301f15b61dd04763c1148c9ec1b992e05733e4a22383162ba
3
+ size 6136591
ParaphraseRC/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:081f23715a05ebaa6310c2e5349c5ef2c4b1abcc5cdd9ef9c30aa2bcaf4400ee
3
+ size 26005668
ParaphraseRC/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6890b9d6e21dbedf7bc4b5dcc2ec4df89461b96d731f2113241f04df53a73482
3
+ size 5566868
README.md CHANGED
@@ -22,8 +22,11 @@ task_ids:
22
  - extractive-qa
23
  paperswithcode_id: duorc
24
  pretty_name: DuoRC
 
 
 
25
  dataset_info:
26
- - config_name: SelfRC
27
  features:
28
  - name: plot_id
29
  dtype: string
@@ -41,17 +44,17 @@ dataset_info:
41
  dtype: bool
42
  splits:
43
  - name: train
44
- num_bytes: 239852925
45
- num_examples: 60721
46
  - name: validation
47
- num_bytes: 51662575
48
- num_examples: 12961
49
  - name: test
50
- num_bytes: 49142766
51
- num_examples: 12559
52
- download_size: 34462660
53
- dataset_size: 340658266
54
- - config_name: ParaphraseRC
55
  features:
56
  - name: plot_id
57
  dtype: string
@@ -69,19 +72,33 @@ dataset_info:
69
  dtype: bool
70
  splits:
71
  - name: train
72
- num_bytes: 496683105
73
- num_examples: 69524
74
  - name: validation
75
- num_bytes: 106510545
76
- num_examples: 15591
77
  - name: test
78
- num_bytes: 115215816
79
- num_examples: 15857
80
- download_size: 62921050
81
- dataset_size: 718409466
82
- config_names:
83
- - ParaphraseRC
84
- - SelfRC
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  ---
86
 
87
  # Dataset Card for duorc
22
  - extractive-qa
23
  paperswithcode_id: duorc
24
  pretty_name: DuoRC
25
+ config_names:
26
+ - ParaphraseRC
27
+ - SelfRC
28
  dataset_info:
29
+ - config_name: ParaphraseRC
30
  features:
31
  - name: plot_id
32
  dtype: string
44
  dtype: bool
45
  splits:
46
  - name: train
47
+ num_bytes: 496682909
48
+ num_examples: 69524
49
  - name: validation
50
+ num_bytes: 106510489
51
+ num_examples: 15591
52
  - name: test
53
+ num_bytes: 115215760
54
+ num_examples: 15857
55
+ download_size: 37709127
56
+ dataset_size: 718409158
57
+ - config_name: SelfRC
58
  features:
59
  - name: plot_id
60
  dtype: string
72
  dtype: bool
73
  splits:
74
  - name: train
75
+ num_bytes: 239852729
76
+ num_examples: 60721
77
  - name: validation
78
+ num_bytes: 51662519
79
+ num_examples: 12961
80
  - name: test
81
+ num_bytes: 49142710
82
+ num_examples: 12559
83
+ download_size: 21001846
84
+ dataset_size: 340657958
85
+ configs:
86
+ - config_name: ParaphraseRC
87
+ data_files:
88
+ - split: train
89
+ path: ParaphraseRC/train-*
90
+ - split: validation
91
+ path: ParaphraseRC/validation-*
92
+ - split: test
93
+ path: ParaphraseRC/test-*
94
+ - config_name: SelfRC
95
+ data_files:
96
+ - split: train
97
+ path: SelfRC/train-*
98
+ - split: validation
99
+ path: SelfRC/validation-*
100
+ - split: test
101
+ path: SelfRC/test-*
102
  ---
103
 
104
  # Dataset Card for duorc
SelfRC/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd763f41d30133c1161015dd01478e2ddedac98362299d7713eec8c50a0fa8e5
3
+ size 3035736
SelfRC/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c0180bed6eea525a15e6d8c2eaf12be1f13ff3a3cc31e7409a75350f248ee41
3
+ size 14851720
SelfRC/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c904b300cb5f475d6b01ed9abb384a9bfdc6219aa7551d2b80841fd28c8cf76a
3
+ size 3114390
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"SelfRC": {"description": "DuoRC contains 186,089 unique question-answer pairs created from a collection of 7680 pairs of movie plots where each pair in the collection reflects two versions of the same movie.\n", "citation": "@inproceedings{DuoRC,\nauthor = { Amrita Saha and Rahul Aralikatte and Mitesh M. Khapra and Karthik Sankaranarayanan},title = {{DuoRC: Towards Complex Language Understanding with Paraphrased Reading Comprehension}},\nbooktitle = {Meeting of the Association for Computational Linguistics (ACL)},\nyear = {2018}\n}\n", "homepage": "https://duorc.github.io/", "license": "https://raw.githubusercontent.com/duorc/duorc/master/LICENSE", "features": {"plot_id": {"dtype": "string", "id": null, "_type": "Value"}, "plot": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "question_id": {"dtype": "string", "id": null, "_type": "Value"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "answers": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "no_answer": {"dtype": "bool", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "duorc", "config_name": "SelfRC", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 239852925, "num_examples": 60721, "dataset_name": "duorc"}, "validation": {"name": "validation", "num_bytes": 51662575, "num_examples": 12961, "dataset_name": "duorc"}, "test": {"name": "test", "num_bytes": 49142766, "num_examples": 12559, "dataset_name": "duorc"}}, "download_checksums": {"https://raw.githubusercontent.com/duorc/duorc/master/dataset/SelfRC_train.json": {"num_bytes": 24388192, "checksum": "38c9dd56f3f0debc5d86ac9eadc42ab06e3bf4095feb0f7dd2c968a1555d774e"}, "https://raw.githubusercontent.com/duorc/duorc/master/dataset/SelfRC_dev.json": {"num_bytes": 5051240, "checksum": "003bc7f551041cbdbc433276cffbebf02a743d58e7d295b990c66bb643c75ffa"}, "https://raw.githubusercontent.com/duorc/duorc/master/dataset/SelfRC_test.json": {"num_bytes": 5023228, "checksum": "3372be8248a9dba7455eb22ff035378b40bf125cf8ae1409d9affebb4d2fe96f"}}, "download_size": 34462660, "post_processing_size": null, "dataset_size": 340658266, "size_in_bytes": 375120926}, "ParaphraseRC": {"description": "DuoRC contains 186,089 unique question-answer pairs created from a collection of 7680 pairs of movie plots where each pair in the collection reflects two versions of the same movie.\n", "citation": "@inproceedings{DuoRC,\nauthor = { Amrita Saha and Rahul Aralikatte and Mitesh M. Khapra and Karthik Sankaranarayanan},title = {{DuoRC: Towards Complex Language Understanding with Paraphrased Reading Comprehension}},\nbooktitle = {Meeting of the Association for Computational Linguistics (ACL)},\nyear = {2018}\n}\n", "homepage": "https://duorc.github.io/", "license": "https://raw.githubusercontent.com/duorc/duorc/master/LICENSE", "features": {"plot_id": {"dtype": "string", "id": null, "_type": "Value"}, "plot": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "question_id": {"dtype": "string", "id": null, "_type": "Value"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "answers": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "no_answer": {"dtype": "bool", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "duorc", "config_name": "ParaphraseRC", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 496683105, "num_examples": 69524, "dataset_name": "duorc"}, "validation": {"name": "validation", "num_bytes": 106510545, "num_examples": 15591, "dataset_name": "duorc"}, "test": {"name": "test", "num_bytes": 115215816, "num_examples": 15857, "dataset_name": "duorc"}}, "download_checksums": {"https://raw.githubusercontent.com/duorc/duorc/master/dataset/ParaphraseRC_train.json": {"num_bytes": 43374860, "checksum": "8a22500def833cf33a4eaaf7c00b5fc144b5fe26d40e6d94a96bd23a88056193"}, "https://raw.githubusercontent.com/duorc/duorc/master/dataset/ParaphraseRC_dev.json": {"num_bytes": 9319561, "checksum": "6d49a1ace1cebe7c73063551e91548725c75db505e1ada58af81c0e1dd21fe60"}, "https://raw.githubusercontent.com/duorc/duorc/master/dataset/ParaphraseRC_test.json": {"num_bytes": 10226629, "checksum": "98e471e3b8203664b1656f19fd22d50c3e8ec4e84792846ccf1ccbf0c1298799"}}, "download_size": 62921050, "post_processing_size": null, "dataset_size": 718409466, "size_in_bytes": 781330516}}
 
duorc.py DELETED
@@ -1,146 +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
- """DuoRC: A Paraphrased
16
- Reading Comprehension Question Answering Dataset"""
17
-
18
-
19
- import json
20
-
21
- import datasets
22
-
23
-
24
- _CITATION = """\
25
- @inproceedings{DuoRC,
26
- author = { Amrita Saha and Rahul Aralikatte and Mitesh M. Khapra and Karthik Sankaranarayanan},\
27
- title = {{DuoRC: Towards Complex Language Understanding with Paraphrased Reading Comprehension}},
28
- booktitle = {Meeting of the Association for Computational Linguistics (ACL)},
29
- year = {2018}
30
- }
31
- """
32
-
33
-
34
- _DESCRIPTION = """\
35
- DuoRC contains 186,089 unique question-answer pairs created from a collection of 7680 pairs of movie plots where each pair in the collection reflects two versions of the same movie.
36
- """
37
-
38
- _HOMEPAGE = "https://duorc.github.io/"
39
-
40
- _LICENSE = "https://raw.githubusercontent.com/duorc/duorc/master/LICENSE"
41
-
42
- _URL = "https://raw.githubusercontent.com/duorc/duorc/master/dataset/"
43
- _URLs = {
44
- "SelfRC": {
45
- "train": _URL + "SelfRC_train.json",
46
- "dev": _URL + "SelfRC_dev.json",
47
- "test": _URL + "SelfRC_test.json",
48
- },
49
- "ParaphraseRC": {
50
- "train": _URL + "ParaphraseRC_train.json",
51
- "dev": _URL + "ParaphraseRC_dev.json",
52
- "test": _URL + "ParaphraseRC_test.json",
53
- },
54
- }
55
-
56
-
57
- class DuorcConfig(datasets.BuilderConfig):
58
- """BuilderConfig for DuoRC SelfRC."""
59
-
60
- def __init__(self, **kwargs):
61
- """BuilderConfig for DuoRC SelfRC.
62
- Args:
63
- **kwargs: keyword arguments forwarded to super.
64
- """
65
- super(DuorcConfig, self).__init__(**kwargs)
66
-
67
-
68
- class Duorc(datasets.GeneratorBasedBuilder):
69
- """DuoRC Dataset"""
70
-
71
- VERSION = datasets.Version("1.0.0")
72
- BUILDER_CONFIGS = [
73
- DuorcConfig(name="SelfRC", version=VERSION, description="SelfRC dataset"),
74
- DuorcConfig(name="ParaphraseRC", version=VERSION, description="ParaphraseRC dataset"),
75
- ]
76
-
77
- def _info(self):
78
- return datasets.DatasetInfo(
79
- # This is the description that will appear on the datasets page.
80
- description=_DESCRIPTION,
81
- # This defines the different columns of the dataset and their types
82
- features=datasets.Features(
83
- {
84
- "plot_id": datasets.Value("string"),
85
- "plot": datasets.Value("string"),
86
- "title": datasets.Value("string"),
87
- "question_id": datasets.Value("string"),
88
- "question": datasets.Value("string"),
89
- "answers": datasets.features.Sequence(datasets.Value("string")),
90
- "no_answer": datasets.Value("bool"),
91
- }
92
- ),
93
- supervised_keys=None,
94
- homepage=_HOMEPAGE,
95
- license=_LICENSE,
96
- citation=_CITATION,
97
- )
98
-
99
- def _split_generators(self, dl_manager):
100
- """Returns SplitGenerators."""
101
- my_urls = _URLs[self.config.name]
102
- downloaded_files = dl_manager.download_and_extract(my_urls)
103
- return [
104
- datasets.SplitGenerator(
105
- name=datasets.Split.TRAIN,
106
- gen_kwargs={
107
- "filepath": downloaded_files["train"],
108
- },
109
- ),
110
- datasets.SplitGenerator(
111
- name=datasets.Split.VALIDATION,
112
- gen_kwargs={
113
- "filepath": downloaded_files["dev"],
114
- },
115
- ),
116
- datasets.SplitGenerator(
117
- name=datasets.Split.TEST,
118
- gen_kwargs={
119
- "filepath": downloaded_files["test"],
120
- },
121
- ),
122
- ]
123
-
124
- def _generate_examples(self, filepath):
125
- """This function returns the examples in the raw (text) form."""
126
- with open(filepath, encoding="utf-8") as f:
127
- duorc = json.load(f)
128
- for example in duorc:
129
- plot_id = example["id"]
130
- plot = example["plot"].strip()
131
- title = example["title"].strip()
132
- for qas in example["qa"]:
133
- question_id = qas["id"]
134
- question = qas["question"].strip()
135
- answers = [answer.strip() for answer in qas["answers"]]
136
- no_answer = qas["no_answer"]
137
-
138
- yield question_id, {
139
- "title": title,
140
- "plot": plot,
141
- "question": question,
142
- "plot_id": plot_id,
143
- "question_id": question_id,
144
- "answers": answers,
145
- "no_answer": no_answer,
146
- }