Datasets:

Languages:
English
ArXiv:
License:
README.md CHANGED
@@ -21,6 +21,7 @@ pretty_name: SAMSum Corpus
21
  tags:
22
  - conversations-summarization
23
  dataset_info:
 
24
  features:
25
  - name: id
26
  dtype: string
@@ -28,19 +29,28 @@ dataset_info:
28
  dtype: string
29
  - name: summary
30
  dtype: string
31
- config_name: samsum
32
  splits:
33
  - name: train
34
- num_bytes: 9479141
35
  num_examples: 14732
36
  - name: test
37
- num_bytes: 534492
38
  num_examples: 819
39
  - name: validation
40
- num_bytes: 516431
41
  num_examples: 818
42
- download_size: 2944100
43
- dataset_size: 10530064
 
 
 
 
 
 
 
 
 
 
44
  train-eval-index:
45
  - config: samsum
46
  task: summarization
 
21
  tags:
22
  - conversations-summarization
23
  dataset_info:
24
+ config_name: samsum
25
  features:
26
  - name: id
27
  dtype: string
 
29
  dtype: string
30
  - name: summary
31
  dtype: string
 
32
  splits:
33
  - name: train
34
+ num_bytes: 9479117
35
  num_examples: 14732
36
  - name: test
37
+ num_bytes: 534480
38
  num_examples: 819
39
  - name: validation
40
+ num_bytes: 516419
41
  num_examples: 818
42
+ download_size: 6737198
43
+ dataset_size: 10530016
44
+ configs:
45
+ - config_name: samsum
46
+ data_files:
47
+ - split: train
48
+ path: samsum/train-*
49
+ - split: test
50
+ path: samsum/test-*
51
+ - split: validation
52
+ path: samsum/validation-*
53
+ default: true
54
  train-eval-index:
55
  - config: samsum
56
  task: summarization
samsum.py DELETED
@@ -1,112 +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
- """SAMSum dataset."""
16
-
17
-
18
- import json
19
-
20
- import py7zr
21
-
22
- import datasets
23
-
24
-
25
- _CITATION = """
26
- @article{gliwa2019samsum,
27
- title={SAMSum Corpus: A Human-annotated Dialogue Dataset for Abstractive Summarization},
28
- author={Gliwa, Bogdan and Mochol, Iwona and Biesek, Maciej and Wawer, Aleksander},
29
- journal={arXiv preprint arXiv:1911.12237},
30
- year={2019}
31
- }
32
- """
33
-
34
- _DESCRIPTION = """
35
- SAMSum Corpus contains over 16k chat dialogues with manually annotated
36
- summaries.
37
- There are two features:
38
- - dialogue: text of dialogue.
39
- - summary: human written summary of the dialogue.
40
- - id: id of a example.
41
- """
42
-
43
- _HOMEPAGE = "https://arxiv.org/abs/1911.12237"
44
-
45
- _LICENSE = "CC BY-NC-ND 4.0"
46
-
47
- _URL = "https://huggingface.co/datasets/samsum/resolve/main/data/corpus.7z"
48
-
49
-
50
- class Samsum(datasets.GeneratorBasedBuilder):
51
- """SAMSum Corpus dataset."""
52
-
53
- VERSION = datasets.Version("1.1.0")
54
-
55
- BUILDER_CONFIGS = [
56
- datasets.BuilderConfig(name="samsum"),
57
- ]
58
-
59
- def _info(self):
60
- features = datasets.Features(
61
- {
62
- "id": datasets.Value("string"),
63
- "dialogue": datasets.Value("string"),
64
- "summary": datasets.Value("string"),
65
- }
66
- )
67
- return datasets.DatasetInfo(
68
- description=_DESCRIPTION,
69
- features=features,
70
- supervised_keys=None,
71
- homepage=_HOMEPAGE,
72
- license=_LICENSE,
73
- citation=_CITATION,
74
- )
75
-
76
- def _split_generators(self, dl_manager):
77
- """Returns SplitGenerators."""
78
- path = dl_manager.download(_URL)
79
- return [
80
- datasets.SplitGenerator(
81
- name=datasets.Split.TRAIN,
82
- gen_kwargs={
83
- "filepath": (path, "train.json"),
84
- "split": "train",
85
- },
86
- ),
87
- datasets.SplitGenerator(
88
- name=datasets.Split.TEST,
89
- gen_kwargs={
90
- "filepath": (path, "test.json"),
91
- "split": "test",
92
- },
93
- ),
94
- datasets.SplitGenerator(
95
- name=datasets.Split.VALIDATION,
96
- gen_kwargs={
97
- "filepath": (path, "val.json"),
98
- "split": "val",
99
- },
100
- ),
101
- ]
102
-
103
- def _generate_examples(self, filepath, split):
104
- """Yields examples."""
105
- path, fname = filepath
106
- with open(path, "rb") as f:
107
- with py7zr.SevenZipFile(f, "r") as z:
108
- for name, bio in z.readall().items():
109
- if name == fname:
110
- data = json.load(bio)
111
- for example in data:
112
- yield example["id"], example
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/corpus.7z → samsum/test-00000-of-00001.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a97674c66726f66b98a08ca5e8868fb8af9d4843f2b05c4f839bc5cfe91e8899
3
- size 2944100
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d58c0264690a142123aaf017893223b09f484c53cee65b9df2d3583481dd1ded
3
+ size 347351
samsum/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fcff8b4a523fcfcc55b02b8ca71491c69ad644f67a9c594fedf856215df9568d
3
+ size 6055313
samsum/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:797970d992e4be1e9d324ab60f71297d02788f267da91709059fbdd76f448455
3
+ size 334534