Convert dataset to Parquet

#6
by albertvillanova HF staff - opened
README.md CHANGED
@@ -1,15 +1,14 @@
1
  ---
2
  annotations_creators:
3
  - crowdsourced
4
- language:
5
- - en
6
  language_creators:
7
  - found
 
 
8
  license:
9
  - unknown
10
  multilinguality:
11
  - monolingual
12
- pretty_name: 'AESLC: Annotated Enron Subject Line Corpus'
13
  size_categories:
14
  - 10K<n<100K
15
  source_datasets:
@@ -18,6 +17,7 @@ task_categories:
18
  - summarization
19
  task_ids: []
20
  paperswithcode_id: aeslc
 
21
  tags:
22
  - aspect-based-summarization
23
  - conversations-summarization
@@ -31,16 +31,25 @@ dataset_info:
31
  dtype: string
32
  splits:
33
  - name: train
34
- num_bytes: 11902668
35
  num_examples: 14436
36
  - name: validation
37
- num_bytes: 1660730
38
  num_examples: 1960
39
  - name: test
40
- num_bytes: 1384177
41
  num_examples: 1906
42
- download_size: 11643743
43
- dataset_size: 14947575
 
 
 
 
 
 
 
 
 
44
  ---
45
 
46
  # Dataset Card for "aeslc"
 
1
  ---
2
  annotations_creators:
3
  - crowdsourced
 
 
4
  language_creators:
5
  - found
6
+ language:
7
+ - en
8
  license:
9
  - unknown
10
  multilinguality:
11
  - monolingual
 
12
  size_categories:
13
  - 10K<n<100K
14
  source_datasets:
 
17
  - summarization
18
  task_ids: []
19
  paperswithcode_id: aeslc
20
+ pretty_name: 'AESLC: Annotated Enron Subject Line Corpus'
21
  tags:
22
  - aspect-based-summarization
23
  - conversations-summarization
 
31
  dtype: string
32
  splits:
33
  - name: train
34
+ num_bytes: 11897245
35
  num_examples: 14436
36
  - name: validation
37
+ num_bytes: 1659987
38
  num_examples: 1960
39
  - name: test
40
+ num_bytes: 1383452
41
  num_examples: 1906
42
+ download_size: 7948020
43
+ dataset_size: 14940684
44
+ configs:
45
+ - config_name: default
46
+ data_files:
47
+ - split: train
48
+ path: data/train-*
49
+ - split: validation
50
+ path: data/validation-*
51
+ - split: test
52
+ path: data/test-*
53
  ---
54
 
55
  # Dataset Card for "aeslc"
aeslc.py DELETED
@@ -1,107 +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
- """Annotated Enron Subject Line Corpus Dataset."""
18
-
19
-
20
- import glob
21
- import os
22
-
23
- import datasets
24
-
25
-
26
- _CITATION = """
27
- @misc{zhang2019email,
28
- title={This Email Could Save Your Life: Introducing the Task of Email Subject Line Generation},
29
- author={Rui Zhang and Joel Tetreault},
30
- year={2019},
31
- eprint={1906.03497},
32
- archivePrefix={arXiv},
33
- primaryClass={cs.CL}
34
- }
35
- """
36
-
37
- _DESCRIPTION = """
38
- A collection of email messages of employees in the Enron Corporation.
39
-
40
- There are two features:
41
- - email_body: email body text.
42
- - subject_line: email subject text.
43
- """
44
-
45
- # From: https://github.com/ryanzhumich/AESLC/archive/master.zip
46
- _URL = "data.zip"
47
-
48
- _DOCUMENT = "email_body"
49
- _SUMMARY = "subject_line"
50
-
51
-
52
- class Aeslc(datasets.GeneratorBasedBuilder):
53
- """Annotated Enron Subject Line Corpus Dataset."""
54
-
55
- VERSION = datasets.Version("1.0.0")
56
-
57
- def _info(self):
58
- return datasets.DatasetInfo(
59
- description=_DESCRIPTION,
60
- features=datasets.Features({_DOCUMENT: datasets.Value("string"), _SUMMARY: datasets.Value("string")}),
61
- supervised_keys=(_DOCUMENT, _SUMMARY),
62
- homepage="https://github.com/ryanzhumich/AESLC",
63
- citation=_CITATION,
64
- )
65
-
66
- def _split_generators(self, dl_manager):
67
- """Returns SplitGenerators."""
68
- dl_path = dl_manager.download_and_extract(_URL)
69
- input_path = os.path.join(dl_path, "AESLC-master", "enron_subject_line")
70
- return [
71
- datasets.SplitGenerator(
72
- name=datasets.Split.TRAIN,
73
- gen_kwargs={"pattern": os.path.join(input_path, "train", "*.subject")},
74
- ),
75
- datasets.SplitGenerator(
76
- name=datasets.Split.VALIDATION,
77
- gen_kwargs={"pattern": os.path.join(input_path, "dev", "*.subject")},
78
- ),
79
- datasets.SplitGenerator(
80
- name=datasets.Split.TEST,
81
- gen_kwargs={"pattern": os.path.join(input_path, "test", "*.subject")},
82
- ),
83
- ]
84
-
85
- def _generate_examples(self, pattern=None):
86
- """Yields examples."""
87
- for filename in sorted(glob.glob(pattern)):
88
- email_body, subject_line = _parse_email_file(filename)
89
- key = os.path.basename(filename).rstrip(".subject")
90
- yield key, {_DOCUMENT: email_body, _SUMMARY: subject_line}
91
-
92
-
93
- def _parse_email_file(filename):
94
- """Parse email file text for email body and subject."""
95
- with open(filename, encoding="utf-8") as f:
96
- email_body = ""
97
- for line in f:
98
- if line == "\n":
99
- break
100
- email_body += line
101
- line = next(f)
102
- subject = ""
103
- for line in f:
104
- if line == "\n":
105
- break
106
- subject += line
107
- return email_body, subject
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data.zip → data/test-00000-of-00001.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:cd042fa034790609468250518d44060017df153c382ae888091a37d5fa320032
3
- size 11650497
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dff0f917c2b64531f979c3fb3596e4d48a22576da2e3519b6c70fe6258b47c15
3
+ size 793541
data/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bfad0418f557b9f7431efcb43db1a3ee96332842bd6ceefcfc039b8cc8ff4e16
3
+ size 6258274
data/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e56639d30fe8a4935f6b20a85baed8f992915dfd12aac935590c170c22671478
3
+ size 896205
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"default": {"description": "\nA collection of email messages of employees in the Enron Corporation.\n\nThere are two features:\n - email_body: email body text.\n - subject_line: email subject text.\n", "citation": "\n@misc{zhang2019email,\n title={This Email Could Save Your Life: Introducing the Task of Email Subject Line Generation},\n author={Rui Zhang and Joel Tetreault},\n year={2019},\n eprint={1906.03497},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}\n", "homepage": "https://github.com/ryanzhumich/AESLC", "license": "", "features": {"email_body": {"dtype": "string", "id": null, "_type": "Value"}, "subject_line": {"dtype": "string", "id": null, "_type": "Value"}}, "supervised_keys": {"input": "email_body", "output": "subject_line"}, "builder_name": "aeslc", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "datasets_version_to_prepare": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"test": {"name": "test", "num_bytes": 1384177, "num_examples": 1906, "dataset_name": "aeslc"}, "train": {"name": "train", "num_bytes": 11902668, "num_examples": 14436, "dataset_name": "aeslc"}, "validation": {"name": "validation", "num_bytes": 1660730, "num_examples": 1960, "dataset_name": "aeslc"}}, "download_checksums": {"https://github.com/ryanzhumich/AESLC/archive/master.zip": {"num_bytes": 11643743, "checksum": "b5ea2ffb837c5cfb9b033d62b3940a8a2330a9eb69bd2a39a9f55db6a23a40a4"}}, "download_size": 11643743, "dataset_size": 14947575, "size_in_bytes": 26591318}}