File size: 2,478 Bytes
23f48cd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2c1cb37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23f48cd
 
 
 
 
f8e7011
23f48cd
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
task_categories:
- summarization
- text-generation
language:
- en
pretty_name: BookSum Summarization Dataset Clean
size_categories:
- 1K<n<10K
configs:
- config_name: books
  data_files: "books/*.jsonl"
- config_name: chapters
  data_files: "chapters/*.jsonl"
---
# Description:
This repository contains the Booksum dataset introduced in the paper [BookSum: A Collection of Datasets for Long-form Narrative Summarization
](https://arxiv.org/abs/2105.08209).

This dataset includes both book and chapter summaries from the BookSum dataset (unlike the kmfoda/booksum one which only contains the chapter dataset). Junk information has been discarded. Contains minimal text-to-summary rows. As there are multiple summaries for a given text, each row contains an array of summaries.


# Distribution

<div style="display: inline-block; vertical-align: top; width: 45%;">
  
## Chapters Dataset

| Split   | Total Sum. | Missing Sum. | Successfully Processed | Rows |
|---------|------------|--------------|------------------------|------|
| Train   | 9712       | 178          | 9534 (98.17%)          | 5653 |
| Test    | 1432       | 0            | 1432 (100.0%)          | 950  |
| Val     | 1485       | 0            | 1485 (100.0%)          | 854  |

</div>

<div style="display: inline-block; vertical-align: top; width: 45%; margin-left: 5%;">

## Books Dataset

| Split   | Total Sum. | Missing Sum. | Successfully Processed | Rows |
|---------|------------|--------------|------------------------|------|
| Train   | 314        | 0            | 314 (100.0%)           | 151  |
| Test    | 46         | 0            | 46 (100.0%)            | 17   |
| Val     | 45         | 0            | 45 (100.0%)            | 19   |

</div>


# Structure:
```
Chapters Dataset
  0 - bid (book id) NOT unique for each row
  1 - book_title
  2 - chapter_id
  3 - text (raw chapter text)
  4 - summary [] (list of summaries from different sources)
      - {source, text (summary), analysis}
      ...
  5 - is_aggregate (bool) (if true, then the text contains more than one chapter)

Books Dataset:
  0 - bid (book id) unique for each row
  1 - title
  2 - text (raw text)
  4 - summary [] (list of summaries from different sources)
      - {source, text (summary), analysis}
      ...
```

# Usage
```
from datasets import load_dataset

book_data = load_dataset("ubaada/booksum-complete-cleaned", "books")
chapter_data = load_dataset("ubaada/booksum-complete-cleaned", "chapters")
```