system HF staff commited on
Commit
5792bfb
0 Parent(s):

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.0

Files changed (5) hide show
  1. .gitattributes +27 -0
  2. README.md +180 -0
  3. dataset_infos.json +1 -0
  4. dummy/0.0.0/dummy_data.zip +3 -0
  5. e2e_nlg.py +96 -0
.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - crowdsourced
4
+ language_creators:
5
+ - crowdsourced
6
+ languages:
7
+ - en
8
+ licenses:
9
+ - cc-by-sa-4-0
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 10K<n<100K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - conditional-text-generation
18
+ task_ids:
19
+ - conditional-text-generation-other-meaning-representtion-to-text
20
+ ---
21
+
22
+ # Dataset Card Creation Guide
23
+
24
+ ## Table of Contents
25
+ - [Dataset Description](#dataset-description)
26
+ - [Dataset Summary](#dataset-summary)
27
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
28
+ - [Languages](#languages)
29
+ - [Dataset Structure](#dataset-structure)
30
+ - [Data Instances](#data-instances)
31
+ - [Data Fields](#data-instances)
32
+ - [Data Splits](#data-instances)
33
+ - [Dataset Creation](#dataset-creation)
34
+ - [Curation Rationale](#curation-rationale)
35
+ - [Source Data](#source-data)
36
+ - [Annotations](#annotations)
37
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
38
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
39
+ - [Social Impact of Dataset](#social-impact-of-dataset)
40
+ - [Discussion of Biases](#discussion-of-biases)
41
+ - [Other Known Limitations](#other-known-limitations)
42
+ - [Additional Information](#additional-information)
43
+ - [Dataset Curators](#dataset-curators)
44
+ - [Licensing Information](#licensing-information)
45
+ - [Citation Information](#citation-information)
46
+
47
+ ## Dataset Description
48
+
49
+ - **Homepage:** [homepage](http://www.macs.hw.ac.uk/InteractionLab/E2E/)
50
+ - **Repository:** [repository](https://github.com/tuetschek/e2e-dataset/)
51
+ - **Paper:** [paper](https://arxiv.org/abs/1706.09254)
52
+ - **Leaderboard:** [leaderboard](http://www.macs.hw.ac.uk/InteractionLab/E2E/)
53
+
54
+
55
+ ### Dataset Summary
56
+
57
+ The E2E dataset is used for training end-to-end, data-driven natural language generation systems in the restaurant domain, which is ten times bigger than existing, frequently used datasets in this area.
58
+ The E2E dataset poses new challenges:
59
+ (1) its human reference texts show more lexical richness and syntactic variation, including discourse phenomena;
60
+ (2) generating from this set requires content selection. As such, learning from this dataset promises more natural, varied and less template-like system utterances.
61
+
62
+ E2E is released in the following paper where you can find more details and baseline results:
63
+ https://arxiv.org/abs/1706.09254
64
+
65
+ ### Supported Tasks and Leaderboards
66
+
67
+ - `conditional-text-generation-other-meaning-representtion-to-text`: The dataset can be used to train a model to generate descriptions in the restaurant domain from meaning representations, which consists in taking as input some data about a restaurant and generate a sentence in natural language that presents the different aspects of the data about the restaurant.. Success on this task is typically measured by achieving a *high* [BLEU](https://huggingface.co/metrics/bleu), [NIST](https://huggingface.co/metrics/nist), [METEOR](https://huggingface.co/metrics/meteor), [Rouge-L](https://huggingface.co/metrics/rouge), [CIDEr](https://huggingface.co/metrics/cider). The TGen model (Dusek and Jurcıcek, 2016a) was used a baseline, had the following scores:
68
+
69
+ | | BLEU | NIST | METEOR | ROUGE_L | CIDEr |
70
+ | -------- | ------ | ------ | ------ | ------- | ------ |
71
+ | BASELINE | 0.6593 | 8.6094 | 0.4483 | 0.6850 | 2.2338 |
72
+
73
+
74
+ This task has an inactive leaderboard which can be found [here](http://www.macs.hw.ac.uk/InteractionLab/E2E/) and ranks models based on the metrics above.
75
+
76
+ ### Languages
77
+
78
+ The dataset is in english (en).
79
+
80
+ ## Dataset Structure
81
+
82
+ ### Data Instances
83
+
84
+ Example of one instance:
85
+
86
+ ```
87
+ {'human_reference': 'The Vaults pub near Café Adriatic has a 5 star rating. Prices start at £30.',
88
+ 'meaning_representation': 'name[The Vaults], eatType[pub], priceRange[more than £30], customer rating[5 out of 5], near[Café Adriatic]'}
89
+ ```
90
+
91
+
92
+ ### Data Fields
93
+
94
+ - `human_reference`: string, the text is natural language that describes the different characteristics in the meaning representation
95
+ - `meaning_representation`: list of slots and values to generate a description from
96
+
97
+ Each MR consists of 3–8 attributes (slots), such as name, food or area, and their values.
98
+
99
+ ### Data Splits
100
+
101
+ The dataset is split into training, validation and testing sets (in a 76.5-8.5-15 ratio), keeping a similar distribution of MR and reference text lengths and ensuring that MRs in different sets are distinct.
102
+
103
+ | | Tain | Valid | Test |
104
+ | ----- | ------ | ----- | ---- |
105
+ | N. Instances | 42061 | 4672 | 4693 |
106
+
107
+ ## Dataset Creation
108
+
109
+ ### Curation Rationale
110
+
111
+ [More Information Needed]
112
+
113
+ ### Source Data
114
+
115
+ [More Information Needed]
116
+
117
+ #### Initial Data Collection and Normalization
118
+
119
+ The data was collected using the CrowdFlower platform and quality-controlled following Novikova et al. (2016).
120
+
121
+ #### Who are the source language producers?
122
+
123
+ [More Information Needed]
124
+
125
+ ### Annotations
126
+
127
+ Following Novikova et al. (2016), the E2E data was collected using pictures as stimuli, which was shown to elicit significantly more natural, more informative, and better phrased human references than textual MRs.
128
+
129
+ #### Annotation process
130
+
131
+ [More Information Needed]
132
+
133
+ #### Who are the annotators?
134
+
135
+ [More Information Needed]
136
+
137
+ ### Personal and Sensitive Information
138
+
139
+ [More Information Needed]
140
+
141
+ ## Considerations for Using the Data
142
+
143
+ ### Social Impact of Dataset
144
+
145
+ [More Information Needed]
146
+
147
+ ### Discussion of Biases
148
+
149
+ [More Information Needed]
150
+
151
+ ### Other Known Limitations
152
+
153
+ [More Information Needed]
154
+
155
+ ## Additional Information
156
+
157
+ ### Dataset Curators
158
+
159
+ [More Information Needed]
160
+
161
+ ### Licensing Information
162
+
163
+ [More Information Needed]
164
+
165
+ ### Citation Information
166
+
167
+ ```
168
+ @article{dusek.etal2020:csl,
169
+ title = {Evaluating the {{State}}-of-the-{{Art}} of {{End}}-to-{{End Natural Language Generation}}: {{The E2E NLG Challenge}}},
170
+ author = {Du{\v{s}}ek, Ond\v{r}ej and Novikova, Jekaterina and Rieser, Verena},
171
+ year = {2020},
172
+ month = jan,
173
+ volume = {59},
174
+ pages = {123--156},
175
+ doi = {10.1016/j.csl.2019.06.009},
176
+ archivePrefix = {arXiv},
177
+ eprint = {1901.11528},
178
+ eprinttype = {arxiv},
179
+ journal = {Computer Speech \& Language}
180
+ ```
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"default": {"description": "The E2E dataset is used for training end-to-end, data-driven natural language generation systems in the restaurant domain, which is ten times bigger than existing, frequently used datasets in this area.\nThe E2E dataset poses new challenges:\n(1) its human reference texts show more lexical richness and syntactic variation, including discourse phenomena;\n(2) generating from this set requires content selection. As such, learning from this dataset promises more natural, varied and less template-like system utterances.\n\n\nE2E is released in the following paper where you can find more details and baseline results:\nhttps://arxiv.org/abs/1706.09254\n", "citation": "@article{dusek.etal2020:csl,\n title = {Evaluating the {{State}}-of-the-{{Art}} of {{End}}-to-{{End Natural Language Generation}}: {{The E2E NLG Challenge}}},\n author = {Du{\u000b{s}}ek, Ond\u000b{r}ej and Novikova, Jekaterina and Rieser, Verena},\n year = {2020},\n month = jan,\n volume = {59},\n pages = {123--156},\n doi = {10.1016/j.csl.2019.06.009},\n archivePrefix = {arXiv},\n eprint = {1901.11528},\n eprinttype = {arxiv},\n journal = {Computer Speech \\& Language}\n}\n", "homepage": "http://www.macs.hw.ac.uk/InteractionLab/E2E/#data", "license": "", "features": {"meaning_representation": {"dtype": "string", "id": null, "_type": "Value"}, "human_reference": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": null, "builder_name": "e2e_nlg", "config_name": "default", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 9435824, "num_examples": 42061, "dataset_name": "e2e_nlg"}, "validation": {"name": "validation", "num_bytes": 1171723, "num_examples": 4672, "dataset_name": "e2e_nlg"}, "test": {"name": "test", "num_bytes": 1320205, "num_examples": 4693, "dataset_name": "e2e_nlg"}}, "download_checksums": {"https://raw.githubusercontent.com/tuetschek/e2e-dataset/master/trainset.csv": {"num_bytes": 9340189, "checksum": "f27d48df45815288ab15619d47a79028c300fbb7f42e373668aba0b98c1d57c6"}, "https://raw.githubusercontent.com/tuetschek/e2e-dataset/master/devset.csv": {"num_bytes": 1161305, "checksum": "fc26b78cdb849c80545f513b223d1e051138b43882eeb79e3eb153e689c864f9"}, "https://raw.githubusercontent.com/tuetschek/e2e-dataset/master/testset_w_refs.csv": {"num_bytes": 1310822, "checksum": "edc8db685e39bb9824d5bd70c18b1c9b0412d14b527aa960e2d1c8251ee15ccd"}}, "download_size": 11812316, "post_processing_size": null, "dataset_size": 11927752, "size_in_bytes": 23740068}}
dummy/0.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:badb779db0cacadf81437b9d76005e7a16e7c3b0438e885ce41f3d9be8024bde
3
+ size 1268
e2e_nlg.py ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 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
+ """E2E Dataset: New Challenges For End-to-End Generation"""
18
+
19
+ import csv
20
+
21
+ import datasets
22
+
23
+
24
+ _CITATION = """\
25
+ @article{dusek.etal2020:csl,
26
+ title = {Evaluating the {{State}}-of-the-{{Art}} of {{End}}-to-{{End Natural Language Generation}}: {{The E2E NLG Challenge}}},
27
+ author = {Du{\v{s}}ek, Ond\v{r}ej and Novikova, Jekaterina and Rieser, Verena},
28
+ year = {2020},
29
+ month = jan,
30
+ volume = {59},
31
+ pages = {123--156},
32
+ doi = {10.1016/j.csl.2019.06.009},
33
+ archivePrefix = {arXiv},
34
+ eprint = {1901.11528},
35
+ eprinttype = {arxiv},
36
+ journal = {Computer Speech & Language}
37
+ }
38
+ """
39
+
40
+ _DESCRIPTION = """\
41
+ The E2E dataset is used for training end-to-end, data-driven natural language generation systems in the restaurant domain, which is ten times bigger than existing, frequently used datasets in this area.
42
+ The E2E dataset poses new challenges:
43
+ (1) its human reference texts show more lexical richness and syntactic variation, including discourse phenomena;
44
+ (2) generating from this set requires content selection. As such, learning from this dataset promises more natural, varied and less template-like system utterances.
45
+
46
+ E2E is released in the following paper where you can find more details and baseline results:
47
+ https://arxiv.org/abs/1706.09254
48
+ """
49
+
50
+ _URL = "https://raw.githubusercontent.com/tuetschek/e2e-dataset/master/"
51
+ _TRAINING_FILE = "trainset.csv"
52
+ _DEV_FILE = "devset.csv"
53
+ _TEST_FILE = "testset_w_refs.csv"
54
+
55
+ _URLS = {
56
+ "train": f"{_URL}{_TRAINING_FILE}",
57
+ "dev": f"{_URL}{_DEV_FILE}",
58
+ "test": f"{_URL}{_TEST_FILE}",
59
+ }
60
+
61
+
62
+ class E2eNLG(datasets.GeneratorBasedBuilder):
63
+ """E2E dataset."""
64
+
65
+ def _info(self):
66
+ return datasets.DatasetInfo(
67
+ description=_DESCRIPTION,
68
+ features=datasets.Features(
69
+ {
70
+ "meaning_representation": datasets.Value("string"),
71
+ "human_reference": datasets.Value("string"),
72
+ }
73
+ ),
74
+ supervised_keys=None,
75
+ homepage="http://www.macs.hw.ac.uk/InteractionLab/E2E/#data",
76
+ citation=_CITATION,
77
+ )
78
+
79
+ def _split_generators(self, dl_manager):
80
+ """Returns SplitGenerators."""
81
+ downloaded_files = dl_manager.download_and_extract(_URLS)
82
+
83
+ return [
84
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"]}),
85
+ datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": downloaded_files["dev"]}),
86
+ datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": downloaded_files["test"]}),
87
+ ]
88
+
89
+ def _generate_examples(self, filepath):
90
+ with open(filepath, encoding="utf-8") as f:
91
+ reader = csv.DictReader(f)
92
+ for example_idx, example in enumerate(reader):
93
+ yield example_idx, {
94
+ "meaning_representation": example["mr"],
95
+ "human_reference": example["ref"],
96
+ }