Datasets:
parquet-converter
commited on
Commit
•
81a3843
1
Parent(s):
75ec0e2
Update parquet files
Browse files- README.md +0 -254
- dataset_infos.json +0 -1
- default/partial/train/0000.parquet +3 -0
- default/partial/train/0001.parquet +3 -0
- default/partial/train/0002.parquet +3 -0
- default/partial/train/0003.parquet +3 -0
- default/partial/train/0004.parquet +3 -0
- default/partial/train/0005.parquet +3 -0
- default/partial/train/0006.parquet +3 -0
- default/partial/train/0007.parquet +3 -0
- default/partial/train/0008.parquet +3 -0
- default/partial/train/0009.parquet +3 -0
- reddit.py +0 -101
README.md
DELETED
@@ -1,254 +0,0 @@
|
|
1 |
-
---
|
2 |
-
annotations_creators:
|
3 |
-
- no-annotation
|
4 |
-
language_creators:
|
5 |
-
- crowdsourced
|
6 |
-
language:
|
7 |
-
- en
|
8 |
-
license:
|
9 |
-
- cc-by-4.0
|
10 |
-
multilinguality:
|
11 |
-
- monolingual
|
12 |
-
paperswithcode_id: null
|
13 |
-
pretty_name: Reddit Webis-TLDR-17
|
14 |
-
size_categories:
|
15 |
-
- 1M<n<10M
|
16 |
-
source_datasets:
|
17 |
-
- original
|
18 |
-
task_categories:
|
19 |
-
- summarization
|
20 |
-
task_ids: []
|
21 |
-
train-eval-index:
|
22 |
-
- config: default
|
23 |
-
task: summarization
|
24 |
-
task_id: summarization
|
25 |
-
splits:
|
26 |
-
train_split: train
|
27 |
-
col_mapping:
|
28 |
-
content: text
|
29 |
-
summary: target
|
30 |
-
metrics:
|
31 |
-
- type: rouge
|
32 |
-
name: Rouge
|
33 |
-
tags:
|
34 |
-
- reddit-posts-summarization
|
35 |
-
dataset_info:
|
36 |
-
features:
|
37 |
-
- name: author
|
38 |
-
dtype: string
|
39 |
-
- name: body
|
40 |
-
dtype: string
|
41 |
-
- name: normalizedBody
|
42 |
-
dtype: string
|
43 |
-
- name: subreddit
|
44 |
-
dtype: string
|
45 |
-
- name: subreddit_id
|
46 |
-
dtype: string
|
47 |
-
- name: id
|
48 |
-
dtype: string
|
49 |
-
- name: content
|
50 |
-
dtype: string
|
51 |
-
- name: summary
|
52 |
-
dtype: string
|
53 |
-
splits:
|
54 |
-
- name: train
|
55 |
-
num_bytes: 18940542951
|
56 |
-
num_examples: 3848330
|
57 |
-
download_size: 3141854161
|
58 |
-
dataset_size: 18940542951
|
59 |
-
---
|
60 |
-
|
61 |
-
# Dataset Card for Reddit Webis-TLDR-17
|
62 |
-
|
63 |
-
## Table of Contents
|
64 |
-
- [Dataset Description](#dataset-description)
|
65 |
-
- [Dataset Summary](#dataset-summary)
|
66 |
-
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
67 |
-
- [Languages](#languages)
|
68 |
-
- [Dataset Structure](#dataset-structure)
|
69 |
-
- [Data Instances](#data-instances)
|
70 |
-
- [Data Fields](#data-fields)
|
71 |
-
- [Data Splits](#data-splits)
|
72 |
-
- [Dataset Creation](#dataset-creation)
|
73 |
-
- [Curation Rationale](#curation-rationale)
|
74 |
-
- [Source Data](#source-data)
|
75 |
-
- [Annotations](#annotations)
|
76 |
-
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
77 |
-
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
78 |
-
- [Social Impact of Dataset](#social-impact-of-dataset)
|
79 |
-
- [Discussion of Biases](#discussion-of-biases)
|
80 |
-
- [Other Known Limitations](#other-known-limitations)
|
81 |
-
- [Additional Information](#additional-information)
|
82 |
-
- [Dataset Curators](#dataset-curators)
|
83 |
-
- [Licensing Information](#licensing-information)
|
84 |
-
- [Citation Information](#citation-information)
|
85 |
-
- [Contributions](#contributions)
|
86 |
-
|
87 |
-
## Dataset Description
|
88 |
-
|
89 |
-
- **Homepage:** [https://webis.de/data/webis-tldr-17.html](https://webis.de/data/webis-tldr-17.html)
|
90 |
-
- **Repository:** [https://github.com/webis-de/webis-tldr-17-corpus](https://github.com/webis-de/webis-tldr-17-corpus)
|
91 |
-
- **Paper:** [https://aclanthology.org/W17-4508]
|
92 |
-
- **Point of Contact:** [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
|
93 |
-
- **Size of downloaded dataset files:** 2996.31 MB
|
94 |
-
- **Size of the generated dataset:** 18063.11 MB
|
95 |
-
- **Total amount of disk used:** 21059.41 MB
|
96 |
-
|
97 |
-
### Dataset Summary
|
98 |
-
|
99 |
-
This corpus contains preprocessed posts from the Reddit dataset (Webis-TLDR-17).
|
100 |
-
The dataset consists of 3,848,330 posts with an average length of 270 words for content,
|
101 |
-
and 28 words for the summary.
|
102 |
-
|
103 |
-
Features includes strings: author, body, normalizedBody, content, summary, subreddit, subreddit_id.
|
104 |
-
Content is used as document and summary is used as summary.
|
105 |
-
|
106 |
-
### Supported Tasks and Leaderboards
|
107 |
-
|
108 |
-
Summarization (abstractive)
|
109 |
-
|
110 |
-
Known ROUGE scores achieved for the Webis-TLDR-17:
|
111 |
-
|
112 |
-
| Model | ROUGE-1 | ROUGE-2 | ROUGE-L | Paper/Source |
|
113 |
-
|-------|-------|-------|-------|------:|
|
114 |
-
| Transformer + Copy (Gehrmann et al., 2019) | 22 | 6 | 17 | Generating Summaries with Finetuned Language Models |
|
115 |
-
| Unified VAE + PGN (Choi et al., 2019) | 19 | 4 | 15 | VAE-PGN based Abstractive Model in Multi-stage Architecture for Text Summarization |
|
116 |
-
|
117 |
-
(Source: https://github.com/sebastianruder/NLP-progress/blob/master/english/summarization.md)
|
118 |
-
|
119 |
-
### Languages
|
120 |
-
|
121 |
-
English
|
122 |
-
|
123 |
-
## Dataset Structure
|
124 |
-
|
125 |
-
### Data Instances
|
126 |
-
|
127 |
-
#### default
|
128 |
-
|
129 |
-
- **Size of downloaded dataset files:** 2996.31 MB
|
130 |
-
- **Size of the generated dataset:** 18063.11 MB
|
131 |
-
- **Total amount of disk used:** 21059.41 MB
|
132 |
-
|
133 |
-
An example of 'train' looks as follows.
|
134 |
-
```
|
135 |
-
{
|
136 |
-
"author": "me",
|
137 |
-
"body": "<>",
|
138 |
-
"content": "input document.",
|
139 |
-
"id": "1",
|
140 |
-
"normalizedBody": "",
|
141 |
-
"subreddit": "machinelearning",
|
142 |
-
"subreddit_id": "2",
|
143 |
-
"summary": "output summary."
|
144 |
-
}
|
145 |
-
```
|
146 |
-
|
147 |
-
### Data Fields
|
148 |
-
|
149 |
-
The data fields are the same among all splits.
|
150 |
-
|
151 |
-
#### default
|
152 |
-
- `author`: a `string` feature.
|
153 |
-
- `body`: a `string` feature.
|
154 |
-
- `normalizedBody`: a `string` feature.
|
155 |
-
- `subreddit`: a `string` feature.
|
156 |
-
- `subreddit_id`: a `string` feature.
|
157 |
-
- `id`: a `string` feature.
|
158 |
-
- `content`: a `string` feature.
|
159 |
-
- `summary`: a `string` feature.
|
160 |
-
|
161 |
-
### Data Splits
|
162 |
-
|
163 |
-
| name | train |
|
164 |
-
|-------|------:|
|
165 |
-
|default|3848330|
|
166 |
-
|
167 |
-
This corpus does not contain a separate test set. Thus it is up to the users to divide the corpus into appropriate training, validation and test sets.
|
168 |
-
|
169 |
-
## Dataset Creation
|
170 |
-
|
171 |
-
### Curation Rationale
|
172 |
-
|
173 |
-
In the scope of the task of absractive summarization the creators of the Webis-TLDR-17 propose mining social media for author-provided summaries and taking advantage of the common practice of appending a "TL;DR" to long posts. A large Reddit crawl was used to yield the Webis-TLDR-17 corpus. This dataset intends to complement the existing summarization corpora primarily from the news genre.
|
174 |
-
|
175 |
-
### Source Data
|
176 |
-
|
177 |
-
Reddit subreddits posts (submissions & comments) containing "TL;DR" from 2006 to 2016. Multiple subreddits are included.
|
178 |
-
|
179 |
-
#### Initial Data Collection and Normalization
|
180 |
-
|
181 |
-
Initial data: a set of 286 million submissions and 1.6 billion comments posted to Reddit between 2006 and 2016.
|
182 |
-
Then a five-step pipeline of consecutive filtering steps was applied.
|
183 |
-
|
184 |
-
#### Who are the source language producers?
|
185 |
-
|
186 |
-
The contents of the dataset are produced by human authors, bot-generated content was eliminated by filtering out all bot accounts with the help of an extensive list provided by the Reddit community, as well as manual inspection of cases where the user name contained the substring "bot."
|
187 |
-
|
188 |
-
### Annotations
|
189 |
-
|
190 |
-
#### Annotation process
|
191 |
-
|
192 |
-
[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
|
193 |
-
|
194 |
-
#### Who are the annotators?
|
195 |
-
|
196 |
-
[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
|
197 |
-
|
198 |
-
### Personal and Sensitive Information
|
199 |
-
|
200 |
-
[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
|
201 |
-
|
202 |
-
## Considerations for Using the Data
|
203 |
-
|
204 |
-
### Social Impact of Dataset
|
205 |
-
|
206 |
-
This dataset has been created to serve as a source of large-scale summarization training data. It is primarily geared towards the automatic abstractive summarization task, that can be considered one of the most challenging variants of automatic summarization. It also aims to tackle the lack of genre diversity in the summarization datasets (most are news-related).
|
207 |
-
|
208 |
-
### Discussion of Biases
|
209 |
-
|
210 |
-
[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
|
211 |
-
|
212 |
-
### Other Known Limitations
|
213 |
-
|
214 |
-
Reddit users write TL;DRs with various intentions, such as providing a “true” summary, asking questions or for help, or forming judgments and conclusions. As noted in the paper introducing the dataset, although the first kind of TL;DR posts are most important for training summarization models, yet, the latter allow for various alternative summarization-related tasks.
|
215 |
-
|
216 |
-
Although filtering was performed abusive language maybe still be present.
|
217 |
-
|
218 |
-
## Additional Information
|
219 |
-
|
220 |
-
### Dataset Curators
|
221 |
-
|
222 |
-
Michael Völske, Martin Potthast, Shahbaz Syed, Benno Stein
|
223 |
-
|
224 |
-
### Licensing Information
|
225 |
-
|
226 |
-
[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
|
227 |
-
|
228 |
-
### Citation Information
|
229 |
-
|
230 |
-
```
|
231 |
-
|
232 |
-
@inproceedings{volske-etal-2017-tl,
|
233 |
-
title = "{TL};{DR}: Mining {R}eddit to Learn Automatic Summarization",
|
234 |
-
author = {V{"o}lske, Michael and
|
235 |
-
Potthast, Martin and
|
236 |
-
Syed, Shahbaz and
|
237 |
-
Stein, Benno},
|
238 |
-
booktitle = "Proceedings of the Workshop on New Frontiers in Summarization",
|
239 |
-
month = sep,
|
240 |
-
year = "2017",
|
241 |
-
address = "Copenhagen, Denmark",
|
242 |
-
publisher = "Association for Computational Linguistics",
|
243 |
-
url = "https://www.aclweb.org/anthology/W17-4508",
|
244 |
-
doi = "10.18653/v1/W17-4508",
|
245 |
-
pages = "59--63",
|
246 |
-
abstract = "Recent advances in automatic text summarization have used deep neural networks to generate high-quality abstractive summaries, but the performance of these models strongly depends on large amounts of suitable training data. We propose a new method for mining social media for author-provided summaries, taking advantage of the common practice of appending a {``}TL;DR{''} to long posts. A case study using a large Reddit crawl yields the Webis-TLDR-17 dataset, complementing existing corpora primarily from the news genre. Our technique is likely applicable to other social media sites and general web crawls.",
|
247 |
-
}
|
248 |
-
|
249 |
-
```
|
250 |
-
|
251 |
-
|
252 |
-
### Contributions
|
253 |
-
|
254 |
-
Thanks to [@mariamabarham](https://github.com/mariamabarham), [@patrickvonplaten](https://github.com/patrickvonplaten), [@thomwolf](https://github.com/thomwolf) for adding this dataset.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dataset_infos.json
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"default": {"description": "\nThis corpus contains preprocessed posts from the Reddit dataset.\nThe dataset consists of 3,848,330 posts with an average length of 270 words for content,\nand 28 words for the summary.\n\nFeatures includes strings: author, body, normalizedBody, content, summary, subreddit, subreddit_id.\nContent is used as document and summary is used as summary.\n", "citation": "\n@inproceedings{volske-etal-2017-tl,\n title = \"{TL};{DR}: Mining {R}eddit to Learn Automatic Summarization\",\n author = {V{\"o}lske, Michael and\n Potthast, Martin and\n Syed, Shahbaz and\n Stein, Benno},\n booktitle = \"Proceedings of the Workshop on New Frontiers in Summarization\",\n month = sep,\n year = \"2017\",\n address = \"Copenhagen, Denmark\",\n publisher = \"Association for Computational Linguistics\",\n url = \"https://www.aclweb.org/anthology/W17-4508\",\n doi = \"10.18653/v1/W17-4508\",\n pages = \"59--63\",\n abstract = \"Recent advances in automatic text summarization have used deep neural networks to generate high-quality abstractive summaries, but the performance of these models strongly depends on large amounts of suitable training data. We propose a new method for mining social media for author-provided summaries, taking advantage of the common practice of appending a {``}TL;DR{''} to long posts. A case study using a large Reddit crawl yields the Webis-TLDR-17 dataset, complementing existing corpora primarily from the news genre. Our technique is likely applicable to other social media sites and general web crawls.\",\n}\n", "homepage": "https://github.com/webis-de/webis-tldr-17-corpus", "license": "", "features": {"author": {"dtype": "string", "id": null, "_type": "Value"}, "body": {"dtype": "string", "id": null, "_type": "Value"}, "normalizedBody": {"dtype": "string", "id": null, "_type": "Value"}, "subreddit": {"dtype": "string", "id": null, "_type": "Value"}, "subreddit_id": {"dtype": "string", "id": null, "_type": "Value"}, "id": {"dtype": "string", "id": null, "_type": "Value"}, "content": {"dtype": "string", "id": null, "_type": "Value"}, "summary": {"dtype": "string", "id": null, "_type": "Value"}}, "supervised_keys": null, "builder_name": "reddit", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "datasets_version_to_prepare": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 18940542951, "num_examples": 3848330, "dataset_name": "reddit"}}, "download_checksums": {"https://zenodo.org/record/1043504/files/corpus-webis-tldr-17.zip?download=1": {"num_bytes": 3141854161, "checksum": "c1a0f8c4374c7314d3c9ec50dd505303c536062d87037d4dca7035b89b36938a"}}, "download_size": 3141854161, "dataset_size": 18940542951, "size_in_bytes": 22082397112}}
|
|
|
|
default/partial/train/0000.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c4ce550dc47ca17268a19cc58aa1c7f76cacbedcba01d4e59d12f511709a19a9
|
3 |
+
size 320955109
|
default/partial/train/0001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:add95b75531a3bb14df2fdb7ae2a9f8193f3bc4afc01d689d59170d715662569
|
3 |
+
size 322267000
|
default/partial/train/0002.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8d7f566df9366bf62cbc446e5f31585c9f6ebb7606640cfe43e81c9bba908e98
|
3 |
+
size 320825346
|
default/partial/train/0003.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:18e7678e599ff9cc700d8c21167d23a353fe92e24a93f752d64ede2912aef9b5
|
3 |
+
size 320580976
|
default/partial/train/0004.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:768664c06d277c3105b41ffaeae08eadd4f906c1da9c7848bf1bcf1ab8834e62
|
3 |
+
size 320442406
|
default/partial/train/0005.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0524a8e578be1ce48dcd28d72aaae4477bd0a64a45669ebd7e0f144dad56cfe5
|
3 |
+
size 321098689
|
default/partial/train/0006.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:343e34cde36e59ce0aa3ad55bf98fac5d59dc39fdcfae375312317a939013373
|
3 |
+
size 321983919
|
default/partial/train/0007.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4d626c907f5c0abd37b356f6be3226bbffb90fca51b1e1ac24d1bca581cdef06
|
3 |
+
size 321267424
|
default/partial/train/0008.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a9d256a0ad567862c1ace3fd8fc9d9bb21d0dd600bf740fb1e406545dfc0b6c1
|
3 |
+
size 320484624
|
default/partial/train/0009.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:495db4cba3f531a03a380e2715143bcb791ebb6d98550c2aabefd0b4c1714c96
|
3 |
+
size 310980702
|
reddit.py
DELETED
@@ -1,101 +0,0 @@
|
|
1 |
-
# coding=utf-8
|
2 |
-
# Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors.
|
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 |
-
|
16 |
-
# Lint as: python3
|
17 |
-
"""Reddit dataset using tldr as summaries."""
|
18 |
-
|
19 |
-
import json
|
20 |
-
import os
|
21 |
-
|
22 |
-
import datasets
|
23 |
-
|
24 |
-
|
25 |
-
_CITATION = """
|
26 |
-
@inproceedings{volske-etal-2017-tl,
|
27 |
-
title = {TL;DR: Mining {R}eddit to Learn Automatic Summarization},
|
28 |
-
author = {V{\"o}lske, Michael and Potthast, Martin and Syed, Shahbaz and Stein, Benno},
|
29 |
-
booktitle = {Proceedings of the Workshop on New Frontiers in Summarization},
|
30 |
-
month = {sep},
|
31 |
-
year = {2017},
|
32 |
-
address = {Copenhagen, Denmark},
|
33 |
-
publisher = {Association for Computational Linguistics},
|
34 |
-
url = {https://www.aclweb.org/anthology/W17-4508},
|
35 |
-
doi = {10.18653/v1/W17-4508},
|
36 |
-
pages = {59--63},
|
37 |
-
abstract = {Recent advances in automatic text summarization have used deep neural networks to generate high-quality abstractive summaries, but the performance of these models strongly depends on large amounts of suitable training data. We propose a new method for mining social media for author-provided summaries, taking advantage of the common practice of appending a {``}TL;DR{''} to long posts. A case study using a large Reddit crawl yields the Webis-TLDR-17 dataset, complementing existing corpora primarily from the news genre. Our technique is likely applicable to other social media sites and general web crawls.},
|
38 |
-
}
|
39 |
-
"""
|
40 |
-
|
41 |
-
_DESCRIPTION = """
|
42 |
-
This corpus contains preprocessed posts from the Reddit dataset.
|
43 |
-
The dataset consists of 3,848,330 posts with an average length of 270 words for content,
|
44 |
-
and 28 words for the summary.
|
45 |
-
|
46 |
-
Features includes strings: author, body, normalizedBody, content, summary, subreddit, subreddit_id.
|
47 |
-
Content is used as document and summary is used as summary.
|
48 |
-
"""
|
49 |
-
|
50 |
-
_URL = "https://zenodo.org/record/1043504/files/corpus-webis-tldr-17.zip?download=1"
|
51 |
-
|
52 |
-
_DOCUMENT = "content"
|
53 |
-
_SUMMARY = "summary"
|
54 |
-
_ADDITIONAL_FEATURES = ["author", "body", "normalizedBody", "subreddit", "subreddit_id", "id"]
|
55 |
-
|
56 |
-
|
57 |
-
class Reddit(datasets.GeneratorBasedBuilder):
|
58 |
-
"""Reddit Dataset."""
|
59 |
-
|
60 |
-
VERSION = datasets.Version("1.0.0")
|
61 |
-
|
62 |
-
def _info(self):
|
63 |
-
return datasets.DatasetInfo(
|
64 |
-
description=_DESCRIPTION,
|
65 |
-
features=datasets.Features(
|
66 |
-
{k: datasets.Value("string") for k in _ADDITIONAL_FEATURES + [_DOCUMENT, _SUMMARY]}
|
67 |
-
),
|
68 |
-
supervised_keys=None,
|
69 |
-
homepage="https://github.com/webis-de/webis-tldr-17-corpus",
|
70 |
-
citation=_CITATION,
|
71 |
-
)
|
72 |
-
|
73 |
-
def _split_generators(self, dl_manager):
|
74 |
-
"""Returns SplitGenerators."""
|
75 |
-
dl_path = dl_manager.download_and_extract(_URL)
|
76 |
-
return [
|
77 |
-
datasets.SplitGenerator(
|
78 |
-
name=datasets.Split.TRAIN,
|
79 |
-
gen_kwargs={"path": os.path.join(dl_path, "corpus-webis-tldr-17.json")},
|
80 |
-
)
|
81 |
-
]
|
82 |
-
|
83 |
-
def _generate_examples(self, path=None):
|
84 |
-
"""Yields examples."""
|
85 |
-
with open(path, "rb") as f:
|
86 |
-
for i, line in enumerate(f):
|
87 |
-
# possible keys are:
|
88 |
-
# author: string (nullable = true)
|
89 |
-
# body: string (nullable = true)
|
90 |
-
# normalizedBody: string (nullable = true)
|
91 |
-
# content: string (nullable = true)
|
92 |
-
# content_len: long (nullable = true)
|
93 |
-
# summary: string (nullable = true)
|
94 |
-
# summary_len: long (nullable = true)
|
95 |
-
# id: string (nullable = true)
|
96 |
-
# subreddit: string (nullable = true)
|
97 |
-
# subreddit_id: string (nullable = true)
|
98 |
-
# title: string (nullable = true)
|
99 |
-
d = json.loads(line)
|
100 |
-
if _SUMMARY in d and _DOCUMENT in d:
|
101 |
-
yield i, {k: d.get(k, "") for k in _ADDITIONAL_FEATURES + [_DOCUMENT, _SUMMARY]}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|