parquet-converter commited on
Commit
5884c3a
·
1 Parent(s): 32feeae

Update parquet files

Browse files
README.md DELETED
@@ -1,209 +0,0 @@
1
- ---
2
- annotations_creators:
3
- - no-annotation
4
- language_creators:
5
- - expert-generated
6
- language:
7
- - en
8
- license:
9
- - cc-by-4.0
10
- multilinguality:
11
- - monolingual
12
- size_categories:
13
- - 10K<n<100K
14
- source_datasets:
15
- - original
16
- task_categories:
17
- - summarization
18
- task_ids: []
19
- pretty_name: GovReport
20
- ---
21
-
22
-
23
- # Dataset Card for GovReport
24
-
25
- ## Table of Contents
26
- - [Table of Contents](#table-of-contents)
27
- - [Dataset Description](#dataset-description)
28
- - [Dataset Summary](#dataset-summary)
29
- - [Versions](#versions)
30
- - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
31
- - [Languages](#languages)
32
- - [Dataset Structure](#dataset-structure)
33
- - [Data Instances](#data-instances)
34
- - [Data Fields](#data-fields)
35
- - [Data Splits](#data-splits)
36
- - [Dataset Creation](#dataset-creation)
37
- - [Curation Rationale](#curation-rationale)
38
- - [Source Data](#source-data)
39
- - [Annotations](#annotations)
40
- - [Personal and Sensitive Information](#personal-and-sensitive-information)
41
- - [Considerations for Using the Data](#considerations-for-using-the-data)
42
- - [Social Impact of Dataset](#social-impact-of-dataset)
43
- - [Discussion of Biases](#discussion-of-biases)
44
- - [Other Known Limitations](#other-known-limitations)
45
- - [Additional Information](#additional-information)
46
- - [Dataset Curators](#dataset-curators)
47
- - [Licensing Information](#licensing-information)
48
- - [Citation Information](#citation-information)
49
- - [Contributions](#contributions)
50
-
51
- ## Dataset Description
52
-
53
- - **Homepage:** [https://gov-report-data.github.io](https://gov-report-data.github.io)
54
- - **Repository:** [https://github.com/luyang-huang96/LongDocSum](https://github.com/luyang-huang96/LongDocSum)
55
- - **Paper:** [https://aclanthology.org/2021.naacl-main.112/](https://aclanthology.org/2021.naacl-main.112/)
56
- - **Leaderboard:** [Needs More Information]
57
- - **Point of Contact:** [Needs More Information]
58
-
59
- ### Dataset Summary
60
-
61
- Government report dataset consists of reports and associated summaries written by government research agencies including Congressional Research Service and U.S. Government Accountability Office.
62
-
63
- Compared with other long document summarization datasets, government report dataset has longer summaries and documents and requires reading in more context to cover salient words to be summarized.
64
-
65
- ### Versions
66
-
67
- - `1.0.1` (default): remove extra whitespace.
68
- - `1.0.0`: the dataset used in the original paper.
69
-
70
- To use different versions, set the `revision` argument of the `load_dataset` function.
71
-
72
- ### Supported Tasks and Leaderboards
73
-
74
- [More Information Needed]
75
-
76
- ### Languages
77
-
78
- English
79
-
80
- ## Dataset Structure
81
-
82
- Three configs are available:
83
- - **plain_text** (default): the text-to-text summarization setting used as in the original paper.
84
- - **plain_text_with_recommendations**: the text-to-text summarization setting, with "What GAO recommends" included in the summary.
85
- - **structure**: data with the section structure.
86
-
87
- To use different configs, set the `name` argument of the `load_dataset` function.
88
-
89
- ### Data Instances
90
-
91
- #### plain_text & plain_text_with_recommendations
92
-
93
- An example looks as follows.
94
- ```
95
- {
96
- "id": "GAO_123456",
97
- "document": "This is a test document.",
98
- "summary": "This is a test summary"
99
- }
100
- ```
101
-
102
- #### structure
103
-
104
- An example looks as follows.
105
- ```
106
- {
107
- "id": "GAO_123456",
108
- "document_sections": {
109
- "title": ["test docment section 1 title", "test docment section 1.1 title"],
110
- "paragraphs": ["test document\nsection 1 paragraphs", "test document\nsection 1.1 paragraphs"],
111
- "depth": [1, 2]
112
- },
113
- "summary_sections": {
114
- "title": ["test summary section 1 title", "test summary section 2 title"],
115
- "paragraphs": ["test summary\nsection 1 paragraphs", "test summary\nsection 2 paragraphs"]
116
- }
117
- }
118
- ```
119
-
120
- ### Data Fields
121
-
122
- #### plain_text & plain_text_with_recommendations
123
-
124
- - `id`: a `string` feature.
125
- - `document`: a `string` feature.
126
- - `summary`: a `string` feature.
127
-
128
- #### structure
129
-
130
- - `id`: a `string` feature.
131
- - `document_sections`: a dictionary feature containing lists of (each element corresponds to a section):
132
- - `title`: a `string` feature.
133
- - `paragraphs`: a of `string` feature, with `\n` separating different paragraphs.
134
- - `depth`: a `int32` feature.
135
- - `summary_sections`: a dictionary feature containing lists of (each element corresponds to a section):
136
- - `title`: a `string` feature.
137
- - `paragraphs`: a `string` feature, with `\n` separating different paragraphs.
138
-
139
- ### Data Splits
140
-
141
- - train: 17519
142
- - valid: 974
143
- - test: 973
144
-
145
- ## Dataset Creation
146
-
147
- ### Curation Rationale
148
-
149
- [More Information Needed]
150
-
151
- ### Source Data
152
-
153
- #### Initial Data Collection and Normalization
154
-
155
- [More Information Needed]
156
-
157
- #### Who are the source language producers?
158
-
159
- Editors of the Congressional Research Service and U.S. Government Accountability Office.
160
-
161
- ### Personal and Sensitive Information
162
-
163
- None.
164
-
165
- ## Considerations for Using the Data
166
-
167
- ### Social Impact of Dataset
168
-
169
- [More Information Needed]
170
-
171
- ### Discussion of Biases
172
-
173
- [More Information Needed]
174
-
175
- ### Other Known Limitations
176
-
177
- [More Information Needed]
178
-
179
- ## Additional Information
180
-
181
- ### Dataset Curators
182
-
183
- [More Information Needed]
184
-
185
- ### Licensing Information
186
-
187
- CC BY 4.0
188
-
189
- ### Citation Information
190
-
191
- ```
192
- @inproceedings{huang-etal-2021-efficient,
193
- title = "Efficient Attentions for Long Document Summarization",
194
- author = "Huang, Luyang and
195
- Cao, Shuyang and
196
- Parulian, Nikolaus and
197
- Ji, Heng and
198
- Wang, Lu",
199
- booktitle = "Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
200
- month = jun,
201
- year = "2021",
202
- address = "Online",
203
- publisher = "Association for Computational Linguistics",
204
- url = "https://aclanthology.org/2021.naacl-main.112",
205
- doi = "10.18653/v1/2021.naacl-main.112",
206
- pages = "1419--1436",
207
- abstract = "The quadratic computational and memory complexities of large Transformers have limited their scalability for long document summarization. In this paper, we propose Hepos, a novel efficient encoder-decoder attention with head-wise positional strides to effectively pinpoint salient information from the source. We further conduct a systematic study of existing efficient self-attentions. Combined with Hepos, we are able to process ten times more tokens than existing models that use full attentions. For evaluation, we present a new dataset, GovReport, with significantly longer documents and summaries. Results show that our models produce significantly higher ROUGE scores than competitive comparisons, including new state-of-the-art results on PubMed. Human evaluation also shows that our models generate more informative summaries with fewer unfaithful errors.",
208
- }
209
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/gao_train.jsonl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:ee7a981a768c7f0c68d635e4a3cbfac03b95e45284181232d6c7021d511ea729
3
- size 709026557
 
 
 
 
gov_report.py DELETED
@@ -1,225 +0,0 @@
1
- """GovReport: The Government Report Long Document Summarization Dataset."""
2
-
3
-
4
- import json
5
-
6
- import datasets
7
-
8
-
9
- logger = datasets.logging.get_logger(__name__)
10
-
11
-
12
- _CITATION = """\
13
- @inproceedings{huang-etal-2021-efficient,
14
- title = "Efficient Attentions for Long Document Summarization",
15
- author = "Huang, Luyang and
16
- Cao, Shuyang and
17
- Parulian, Nikolaus and
18
- Ji, Heng and
19
- Wang, Lu",
20
- booktitle = "Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
21
- month = jun,
22
- year = "2021",
23
- address = "Online",
24
- publisher = "Association for Computational Linguistics",
25
- url = "https://aclanthology.org/2021.naacl-main.112",
26
- doi = "10.18653/v1/2021.naacl-main.112",
27
- pages = "1419--1436",
28
- abstract = "The quadratic computational and memory complexities of large Transformers have limited their scalability for long document summarization. In this paper, we propose Hepos, a novel efficient encoder-decoder attention with head-wise positional strides to effectively pinpoint salient information from the source. We further conduct a systematic study of existing efficient self-attentions. Combined with Hepos, we are able to process ten times more tokens than existing models that use full attentions. For evaluation, we present a new dataset, GovReport, with significantly longer documents and summaries. Results show that our models produce significantly higher ROUGE scores than competitive comparisons, including new state-of-the-art results on PubMed. Human evaluation also shows that our models generate more informative summaries with fewer unfaithful errors.",
29
- }
30
- """
31
-
32
- _DESCRIPTION = """\
33
- GovReport long document summarization dataset.
34
-
35
- There are three configs:
36
- - plain_text: plain text document-to-summary pairs
37
- - plain_text_with_recommendations: plain text doucment-summary pairs, with "What GAO recommends" included in the summary
38
- - structure: data with section structure
39
- """
40
-
41
- _URL = "https://huggingface.co/datasets/launch/gov_report/resolve/main/data/"
42
- _URLS = {
43
- "gao_train": _URL + "gao_train.jsonl",
44
- "gao_valid": _URL + "gao_valid.jsonl",
45
- "gao_test": _URL + "gao_test.jsonl",
46
- "crs_train": _URL + "crs_train.jsonl",
47
- "crs_valid": _URL + "crs_valid.jsonl",
48
- "crs_test": _URL + "crs_test.jsonl",
49
- }
50
-
51
-
52
- def _recursive_load(section, keep_letter=False, depth=0):
53
- sections = []
54
- if section["section_title"] != "Letter" or (section["section_title"] == "Letter" and keep_letter):
55
- sections.append({
56
- "title": " ".join(section["section_title"].strip().split()),
57
- "paragraphs": "\n".join([" ".join(paragraph.strip().split()) for paragraph in section["paragraphs"]]),
58
- "depth": depth
59
- })
60
- for subsection in section["subsections"]:
61
- child_sections = _recursive_load(subsection, keep_letter, depth + 1)
62
- sections.extend(child_sections)
63
- else:
64
- for subsection in section["subsections"]:
65
- child_sections = _recursive_load(subsection, keep_letter, depth)
66
- sections.extend(child_sections)
67
-
68
- return sections
69
-
70
-
71
- class GovReportConfig(datasets.BuilderConfig):
72
- """BuilderConfig for GovReport."""
73
-
74
- def __init__(self, **kwargs):
75
- """BuilderConfig for GovReport.
76
- Args:
77
- **kwargs: keyword arguments forwarded to super.
78
- """
79
- super(GovReportConfig, self).__init__(**kwargs)
80
-
81
-
82
- class GovReport(datasets.GeneratorBasedBuilder):
83
- VERSION = datasets.Version("1.0.1")
84
-
85
- DEFAULT_CONFIG_NAME = "plain_text"
86
-
87
- BUILDER_CONFIGS = [
88
- GovReportConfig(
89
- name="plain_text",
90
- version=VERSION,
91
- description="Plain text",
92
- ),
93
- GovReportConfig(
94
- name="plain_text_with_recommendations",
95
- version=VERSION,
96
- description="Plain text with GAO recommendations",
97
- ),
98
- GovReportConfig(
99
- name="structure",
100
- version=VERSION,
101
- description="structure data",
102
- )
103
- ]
104
-
105
- def _info(self):
106
- if self.config.name in ["plain_text", "plain_text_with_recommendations"]:
107
- features = datasets.Features(
108
- {
109
- "id": datasets.Value("string"),
110
- "document": datasets.Value("string"),
111
- "summary": datasets.Value("string")
112
- }
113
- )
114
- elif self.config.name == "structure":
115
- features = datasets.Features(
116
- {
117
- "id": datasets.Value("string"),
118
- "document_sections": datasets.features.Sequence(
119
- {
120
- "title": datasets.Value("string"),
121
- "paragraphs": datasets.Value("string"),
122
- "depth": datasets.Value("int32"),
123
- }
124
- ),
125
- "summary_sections": datasets.features.Sequence(
126
- {
127
- "title": datasets.Value("string"),
128
- "paragraphs": datasets.Value("string"),
129
- }
130
- ),
131
- }
132
- )
133
- else:
134
- raise ValueError("Unsupported config name {}".format(self.config.name))
135
-
136
- return datasets.DatasetInfo(
137
- description=_DESCRIPTION,
138
- features=features,
139
- supervised_keys=None,
140
- homepage="",
141
- citation=_CITATION,
142
- )
143
-
144
- def _split_generators(self, dl_manager):
145
- downloaded_files = dl_manager.download_and_extract(_URLS)
146
-
147
- return [
148
- datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"gao_filepath": downloaded_files["gao_train"], "crs_filepath": downloaded_files["crs_train"]}),
149
- datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"gao_filepath": downloaded_files["gao_valid"], "crs_filepath": downloaded_files["crs_valid"]}),
150
- datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"gao_filepath": downloaded_files["gao_test"], "crs_filepath": downloaded_files["crs_test"]}),
151
- ]
152
-
153
- def _generate_examples(self, gao_filepath, crs_filepath):
154
- """This function returns the examples in the raw (text) form."""
155
- logger.info(f"generating examples from = (GAO) {gao_filepath} and (CRS) {crs_filepath}")
156
-
157
- with open(gao_filepath, "r") as f:
158
- for line in f:
159
- line = line.strip()
160
- if not line:
161
- continue
162
- data = json.loads(line)
163
-
164
- _id = 'GAO_' + data["id"]
165
-
166
- document_sections = []
167
- for lv1_section in data["report"]:
168
- document_sections.extend(_recursive_load(lv1_section, keep_letter=False, depth=1))
169
- summary_sections = [
170
- {
171
- "title": " ".join(highlight_section["section_title"].strip().split()),
172
- "paragraphs": "\n".join([" ".join(paragraph.strip().split()) for paragraph in highlight_section["paragraphs"]])
173
- } for highlight_section in data["highlight"]
174
- ]
175
-
176
- if self.config.name == "plain_text":
177
- yield _id, {
178
- "id": _id,
179
- "document": " ".join([section["title"] + " " + section["paragraphs"] if section["paragraphs"] else section["title"] for section in document_sections]).replace("\n", " ").strip(),
180
- "summary": " ".join([section["paragraphs"] for section in summary_sections if section["title"] != "What GAO Recommends"]).replace("\n", " ").strip(),
181
- }
182
- elif self.config.name == "plain_text_with_recommendations":
183
- yield _id, {
184
- "id": _id,
185
- "document": " ".join([section["title"] + " " + section["paragraphs"] if section["paragraphs"] else section["title"] for section in document_sections]).replace("\n", " ").strip(),
186
- "summary": " ".join([section["paragraphs"] for section in summary_sections]).replace("\n", " ").strip(),
187
- }
188
- elif self.config.name == "structure":
189
- yield _id, {
190
- "id": _id,
191
- "document_sections": document_sections,
192
- "summary_sections": summary_sections
193
- }
194
- else:
195
- raise ValueError("Unsupported config name {}".format(self.config.name))
196
-
197
- with open(crs_filepath, "r") as f:
198
- for line in f:
199
- line = line.strip()
200
- if not line:
201
- continue
202
- data = json.loads(line)
203
-
204
- _id = 'CRS_' + data["id"]
205
-
206
- document_sections = _recursive_load(data["reports"], keep_letter=True, depth=0)
207
- summary_sections = [{
208
- "title": "",
209
- "paragraphs": "\n".join([" ".join(paragraph.strip().split()) for paragraph in data["summary"]])
210
- }]
211
-
212
- if self.config.name in ["plain_text", "plain_text_with_recommendations"]:
213
- yield _id, {
214
- "id": _id,
215
- "document": " ".join([section["title"] + " " + section["paragraphs"] if section["paragraphs"] else section["title"] for section in document_sections]).replace("\n", " ").strip(),
216
- "summary": " ".join([section["paragraphs"] for section in summary_sections]).replace("\n", " ").strip(),
217
- }
218
- elif self.config.name == "structure":
219
- yield _id, {
220
- "id": _id,
221
- "document_sections": document_sections,
222
- "summary_sections": summary_sections
223
- }
224
- else:
225
- raise ValueError("Unsupported config name {}".format(self.config.name))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/gao_test.jsonl → plain_text/gov_report-test.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5285ee273ae430003c1e8fdb45ed7c6757349c114d2cae45160845ef60a49a94
3
- size 39973256
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e664c682fe5fa0f0ae08e1408bb1769346781e763ba7cd170d5de0e0b9a8b6f
3
+ size 24542327
data/crs_train.jsonl → plain_text/gov_report-train-00000-of-00002.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5de865c921b76c4f1bc5f7f73fd38f9eeeef3ab7fe7cff205089853f079f74c6
3
- size 359025392
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc52a9ebf5fc77d3c6e30cdb4e836ca73df4e20465a486c6a053beda30bf7967
3
+ size 239932044
plain_text/gov_report-train-00001-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ba1cdca155cb14dc6cb0bb2a44316d426e6be4feec47f200014a1d84e3a7a476
3
+ size 226289862
data/crs_test.jsonl → plain_text/gov_report-validation.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:bef184f1f4249ee4f145214b9f836a277152d5074395b879bd9ea891c519dece
3
- size 19779267
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e4b8717715a5ab01cd1205dadf06d82af60e7e8505fa677fef8cb1446218125a
3
+ size 26667049
data/gao_valid.jsonl → plain_text_with_recommendations/gov_report-test.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9cae7d5fecbcb507d1e84ecf8d476f26796d50a6690ac7c79fabe7b0e13a9b16
3
- size 41604401
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a537ace35cd0797a9c35e1948512a1e79ff55c3f58ecc032e296abc388179e4b
3
+ size 24609322
plain_text_with_recommendations/gov_report-train-00000-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:353d87b0dc22adfedbe4dbb9494808699d7036a7aeb24e1cb0417fdb4ece9d74
3
+ size 240256152
plain_text_with_recommendations/gov_report-train-00001-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:20431070b210278119f456a389d727f8a5493bf7a84d27df7c7629430fd3f316
3
+ size 226370365
data/crs_valid.jsonl → plain_text_with_recommendations/gov_report-validation.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f56ff5bdbf381c053f106deadd566ad0ae3324b78c0d6ebe83c69121ecbdd24a
3
- size 22496525
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5fd111e72ab0e0c24bd6dfa440e08f50221798cd4e545d2625ebca9b7fe7e58e
3
+ size 26735205
structure/gov_report-test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:786cfa137db1ffa732a67a5efe5667484ffaf7bf3f5c6aa9693ef11a11905106
3
+ size 24792447
structure/gov_report-train-00000-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:787698ef3d02f0c88c342e4865a3918eb95f0a0cb9ba3d8aca64f4cd9c85a593
3
+ size 241784590
structure/gov_report-train-00001-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c4998eba397a86722523d91e083931fbda05c5a27180cd8fecc5fc1f6f52fc0a
3
+ size 228603651
structure/gov_report-validation.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3f530252af206e678a71c4ca6fcd1297b3952e90ff58649d63b4ade2bd312798
3
+ size 26968365