albertvillanova HF staff commited on
Commit
84df3eb
1 Parent(s): df0c4ed

Convert dataset to Parquet (#2)

Browse files

- Convert dataset to Parquet (8f3028acd62f35553fa92d9cf541eb68d23b7ccd)
- Add extractive data files (6958faa6cf2e2fb2b33dbad376304accd30bd86a)
- Delete loading script (5ee2de3c67b3c9cd8e1c52282ea8215e9abdbbb2)
- Delete legacy dataset_infos.json (116f04f85f8fe2f5a892665c0134e56e4ef56860)

README.md CHANGED
@@ -39,16 +39,16 @@ dataset_info:
39
  dtype: string
40
  splits:
41
  - name: train
42
- num_bytes: 6434909
43
  num_examples: 6253
44
  - name: test
45
- num_bytes: 843181
46
  num_examples: 811
47
  - name: validation
48
- num_bytes: 689109
49
  num_examples: 661
50
- download_size: 7755161
51
- dataset_size: 7967199
52
  - config_name: extractive
53
  features:
54
  - name: query
@@ -59,16 +59,33 @@ dataset_info:
59
  dtype: string
60
  splits:
61
  - name: train
62
- num_bytes: 6434909
63
  num_examples: 6253
64
  - name: test
65
- num_bytes: 843181
66
  num_examples: 811
67
  - name: validation
68
- num_bytes: 689109
69
  num_examples: 661
70
- download_size: 7755161
71
- dataset_size: 7967199
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  ---
73
 
74
  # Dataset Card for AQuaMuSe
 
39
  dtype: string
40
  splits:
41
  - name: train
42
+ num_bytes: 6434893
43
  num_examples: 6253
44
  - name: test
45
+ num_bytes: 843165
46
  num_examples: 811
47
  - name: validation
48
+ num_bytes: 689093
49
  num_examples: 661
50
+ download_size: 5167854
51
+ dataset_size: 7967151
52
  - config_name: extractive
53
  features:
54
  - name: query
 
59
  dtype: string
60
  splits:
61
  - name: train
62
+ num_bytes: 6434893
63
  num_examples: 6253
64
  - name: test
65
+ num_bytes: 843165
66
  num_examples: 811
67
  - name: validation
68
+ num_bytes: 689093
69
  num_examples: 661
70
+ download_size: 5162151
71
+ dataset_size: 7967151
72
+ configs:
73
+ - config_name: abstractive
74
+ data_files:
75
+ - split: train
76
+ path: abstractive/train-*
77
+ - split: test
78
+ path: abstractive/test-*
79
+ - split: validation
80
+ path: abstractive/validation-*
81
+ - config_name: extractive
82
+ data_files:
83
+ - split: train
84
+ path: extractive/train-*
85
+ - split: test
86
+ path: extractive/test-*
87
+ - split: validation
88
+ path: extractive/validation-*
89
  ---
90
 
91
  # Dataset Card for AQuaMuSe
abstractive/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0233791433515f5e906da847e3a808e157f8a1bb3891ae68126476f8c95ddf24
3
+ size 543352
abstractive/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:13484e28ade720920ee06fb1e1c4e5be4e9bb7ce95e73625aef5883a667dc4ed
3
+ size 4177513
abstractive/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7c1fa26da92681958b9ebe263b95918b144902bdb7dce3672b1cf9520317ecef
3
+ size 446989
aquamuse.py DELETED
@@ -1,154 +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
- """AQuaMuSe is a novel scalable approach to automatically mine dual query based multi-document summarization datasets for extractive and abstractive summaries using question answering dataset (Google Natural Questions) and large document corpora (Common Crawl)"""
16
-
17
-
18
- import os
19
- from os import listdir
20
- from os.path import isfile, join
21
-
22
- import tensorflow as tf
23
-
24
- import datasets
25
-
26
-
27
- _CITATION = """\
28
- @misc{kulkarni2020aquamuse,
29
- title={AQuaMuSe: Automatically Generating Datasets for Query-Based Multi-Document Summarization},
30
- author={Sayali Kulkarni and Sheide Chammas and Wan Zhu and Fei Sha and Eugene Ie},
31
- year={2020},
32
- eprint={2010.12694},
33
- archivePrefix={arXiv},
34
- primaryClass={cs.CL}
35
- }
36
- """
37
-
38
- _DESCRIPTION = """AQuaMuSe is a novel scalable approach to automatically mine dual query based multi-document summarization datasets for extractive and abstractive summaries using question answering dataset (Google Natural Questions) and large document corpora (Common Crawl)"""
39
-
40
- _HOMEPAGE = "https://github.com/google-research-datasets/aquamuse"
41
-
42
- _LICENSE = ""
43
-
44
- zipped_data_url = "https://github.com/google-research-datasets/aquamuse/raw/main/v2/aquamuse_v2.zip"
45
-
46
-
47
- class Aquamuse(datasets.GeneratorBasedBuilder):
48
- """Dataset for Query-based Multi-Document Summarization"""
49
-
50
- VERSION = datasets.Version("2.3.0")
51
-
52
- BUILDER_CONFIGS = [
53
- datasets.BuilderConfig(
54
- name="abstractive", version=VERSION, description="Abstractive query-based multi-document summarization"
55
- ),
56
- datasets.BuilderConfig(
57
- name="extractive", version=VERSION, description="Extractive query-based multi-document summarization"
58
- ),
59
- ]
60
-
61
- # DEFAULT_CONFIG_NAME = "abstractive" # It's not mandatory to have a default configuration. Just use one if it make sense.
62
-
63
- def _info(self):
64
- features = datasets.Features(
65
- {
66
- "query": datasets.Value("string"),
67
- "input_urls": datasets.Sequence(datasets.Value("string")),
68
- "target": datasets.Value("string"),
69
- }
70
- )
71
-
72
- return datasets.DatasetInfo(
73
- description=_DESCRIPTION,
74
- features=features,
75
- supervised_keys=None,
76
- homepage=_HOMEPAGE,
77
- license=_LICENSE,
78
- citation=_CITATION,
79
- )
80
-
81
- def _split_generators(self, dl_manager):
82
- """Returns SplitGenerators."""
83
-
84
- if self.config.name == "abstractive":
85
- data_dir = dl_manager.download_and_extract(zipped_data_url)
86
- return [
87
- datasets.SplitGenerator(
88
- name=datasets.Split.TRAIN,
89
- # These kwargs will be passed to _generate_examples
90
- gen_kwargs={
91
- "filepath": os.path.join(data_dir, "v2.3/abstractive/train/"),
92
- "split": "train",
93
- },
94
- ),
95
- datasets.SplitGenerator(
96
- name=datasets.Split.TEST,
97
- # These kwargs will be passed to _generate_examples
98
- gen_kwargs={
99
- "filepath": os.path.join(data_dir, "v2.3/abstractive/test/"),
100
- "split": "test",
101
- },
102
- ),
103
- datasets.SplitGenerator(
104
- name=datasets.Split.VALIDATION,
105
- # These kwargs will be passed to _generate_examples
106
- gen_kwargs={
107
- "filepath": os.path.join(data_dir, "v2.3/abstractive/dev/"),
108
- "split": "dev",
109
- },
110
- ),
111
- ]
112
-
113
- else:
114
- data_dir = dl_manager.download_and_extract(zipped_data_url)
115
- return [
116
- datasets.SplitGenerator(
117
- name=datasets.Split.TRAIN,
118
- # These kwargs will be passed to _generate_examples
119
- gen_kwargs={
120
- "filepath": os.path.join(data_dir, "v2.3/extractive/train/"),
121
- "split": "train",
122
- },
123
- ),
124
- datasets.SplitGenerator(
125
- name=datasets.Split.TEST,
126
- # These kwargs will be passed to _generate_examples
127
- gen_kwargs={
128
- "filepath": os.path.join(data_dir, "v2.3/extractive/test/"),
129
- "split": "test",
130
- },
131
- ),
132
- datasets.SplitGenerator(
133
- name=datasets.Split.VALIDATION,
134
- # These kwargs will be passed to _generate_examples
135
- gen_kwargs={
136
- "filepath": os.path.join(data_dir, "v2.3/extractive/dev/"),
137
- "split": "dev",
138
- },
139
- ),
140
- ]
141
-
142
- def _generate_examples(self, filepath, split):
143
- """Yields examples."""
144
- filepath = [join(filepath, f) for f in listdir(filepath) if isfile(join(filepath, f))]
145
- filepath = sorted(filepath)
146
- raw_dataset = tf.data.TFRecordDataset(filepath)
147
- for id_, raw_record in enumerate(raw_dataset):
148
- example = tf.train.Example()
149
- example.ParseFromString(raw_record.numpy())
150
- yield id_, {
151
- "query": example.features.feature["query"].bytes_list.value[0].decode(),
152
- "input_urls": example.features.feature["input_urls"].bytes_list.value[0].decode().split("<EOD>"),
153
- "target": example.features.feature["target"].bytes_list.value[0].decode(),
154
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"abstractive": {"description": "AQuaMuSe is a novel scalable approach to automatically mine dual query based multi-document summarization datasets for extractive and abstractive summaries using question answering dataset (Google Natural Questions) and large document corpora (Common Crawl)", "citation": "@misc{kulkarni2020aquamuse,title={AQuaMuSe: Automatically Generating Datasets for Query-Based Multi-Document Summarization}, author={Sayali Kulkarni and Sheide Chammas and Wan Zhu and Fei Sha and Eugene Ie}, year={2020}, eprint={2010.12694}, archivePrefix={arXiv}, primaryClass={cs.CL}}", "homepage": "https://github.com/google-research-datasets/aquamuse", "license": "", "features": {"query": {"dtype": "string", "id": null, "_type": "Value"}, "input_urls": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "target": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "aquamuse", "config_name": "abstractive", "version": {"version_str": "2.3.0", "description": null, "major": 2, "minor": 3, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 6434909, "num_examples": 6253, "dataset_name": "aquamuse"}, "test": {"name": "test", "num_bytes": 843181, "num_examples": 811, "dataset_name": "aquamuse"}, "validation": {"name": "validation", "num_bytes": 689109, "num_examples": 661, "dataset_name": "aquamuse"}}, "download_checksums": {"https://github.com/google-research-datasets/aquamuse/raw/main/v2/aquamuse_v2.zip": {"num_bytes": 7755161, "checksum": "f2b4d9523031a986e545a7c0fdc8180670519696340d09179a39514fc76466d0"}}, "download_size": 7755161, "post_processing_size": null, "dataset_size": 7967199, "size_in_bytes": 15722360}, "extractive": {"description": "AQuaMuSe is a novel scalable approach to automatically mine dual query based multi-document summarization datasets for extractive and abstractive summaries using question answering dataset (Google Natural Questions) and large document corpora (Common Crawl)", "citation": "@misc{kulkarni2020aquamuse,title={AQuaMuSe: Automatically Generating Datasets for Query-Based Multi-Document Summarization}, author={Sayali Kulkarni and Sheide Chammas and Wan Zhu and Fei Sha and Eugene Ie}, year={2020}, eprint={2010.12694}, archivePrefix={arXiv}, primaryClass={cs.CL}}", "homepage": "https://github.com/google-research-datasets/aquamuse", "license": "", "features": {"query": {"dtype": "string", "id": null, "_type": "Value"}, "input_urls": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "target": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "aquamuse", "config_name": "extractive", "version": {"version_str": "2.3.0", "description": null, "major": 2, "minor": 3, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 6434909, "num_examples": 6253, "dataset_name": "aquamuse"}, "test": {"name": "test", "num_bytes": 843181, "num_examples": 811, "dataset_name": "aquamuse"}, "validation": {"name": "validation", "num_bytes": 689109, "num_examples": 661, "dataset_name": "aquamuse"}}, "download_checksums": {"https://github.com/google-research-datasets/aquamuse/raw/main/v2/aquamuse_v2.zip": {"num_bytes": 7755161, "checksum": "f2b4d9523031a986e545a7c0fdc8180670519696340d09179a39514fc76466d0"}}, "download_size": 7755161, "post_processing_size": null, "dataset_size": 7967199, "size_in_bytes": 15722360}}
 
 
extractive/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1380d318b80ebab447002b05ccd69faf58ba9e431af41179181273c420f784e1
3
+ size 543635
extractive/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:24fb5984380b3319a1824bcb623eda558835c3142c2107930c97956c029ee1ab
3
+ size 4172824
extractive/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:db41f77100bb9746fc39052a3377ff5af0f52fa26a79ce84548146850162839a
3
+ size 445692