Datasets:

Modalities:
Text
Languages:
English
Libraries:
Datasets
License:
shuyangcao commited on
Commit
b70be86
1 Parent(s): 65e803e

remove extra whitespace

Browse files
Files changed (2) hide show
  1. README.md +8 -0
  2. gov_report.py +3 -3
README.md CHANGED
@@ -27,6 +27,7 @@ pretty_name: GovReport
27
  - [Table of Contents](#table-of-contents)
28
  - [Dataset Description](#dataset-description)
29
  - [Dataset Summary](#dataset-summary)
 
30
  - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
31
  - [Languages](#languages)
32
  - [Dataset Structure](#dataset-structure)
@@ -62,6 +63,13 @@ Government report dataset consists of reports and associated summaries written b
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
  ### Supported Tasks and Leaderboards
66
 
67
  [More Information Needed]
 
27
  - [Table of Contents](#table-of-contents)
28
  - [Dataset Description](#dataset-description)
29
  - [Dataset Summary](#dataset-summary)
30
+ - [Versions](#versions)
31
  - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
32
  - [Languages](#languages)
33
  - [Dataset Structure](#dataset-structure)
 
63
 
64
  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.
65
 
66
+ ### Versions
67
+
68
+ - `1.0.1` (default): remove extra whitespace.
69
+ - `1.0.0`: the dataset used in the original paper.
70
+
71
+ To use different versions, set the `revision` argument of the `load_dataset` function.
72
+
73
  ### Supported Tasks and Leaderboards
74
 
75
  [More Information Needed]
gov_report.py CHANGED
@@ -53,8 +53,8 @@ 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": section["section_title"].strip(),
57
- "paragraphs": "\n".join(section["paragraphs"]),
58
  "depth": depth
59
  })
60
  for subsection in section["subsections"]:
@@ -80,7 +80,7 @@ class GovReportConfig(datasets.BuilderConfig):
80
 
81
 
82
  class GovReport(datasets.GeneratorBasedBuilder):
83
- VERSION = datasets.Version("1.0.0")
84
 
85
  DEFAULT_CONFIG_NAME = "plain_text"
86
 
 
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"]:
 
80
 
81
 
82
  class GovReport(datasets.GeneratorBasedBuilder):
83
+ VERSION = datasets.Version("1.0.1")
84
 
85
  DEFAULT_CONFIG_NAME = "plain_text"
86