system HF staff commited on
Commit
4eb4b31
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 +148 -0
  3. dataset_infos.json +1 -0
  4. dummy/1.0.0/dummy_data.zip +3 -0
  5. recipe_nlg.py +120 -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,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - found
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - en
8
+ licenses:
9
+ - unknown
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - n>1M
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - conditional-text-generation
18
+ - sequence-modeling
19
+ - text-retrieval
20
+ task_ids:
21
+ - document-retrieval
22
+ - entity-linking-retrieval
23
+ - explanation-generation
24
+ - language-modeling
25
+ - summarization
26
+ ---
27
+
28
+
29
+ # Dataset Card Creation Guide
30
+
31
+ ## Table of Contents
32
+ - [Dataset Description](#dataset-description)
33
+ - [Dataset Summary](#dataset-summary)
34
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
35
+ - [Languages](#languages)
36
+ - [Dataset Structure](#dataset-structure)
37
+ - [Data Instances](#data-instances)
38
+ - [Data Fields](#data-instances)
39
+ - [Data Splits](#data-instances)
40
+ - [Dataset Creation](#dataset-creation)
41
+ - [Curation Rationale](#curation-rationale)
42
+ - [Source Data](#source-data)
43
+ - [Annotations](#annotations)
44
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
45
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
46
+ - [Social Impact of Dataset](#social-impact-of-dataset)
47
+ - [Discussion of Biases](#discussion-of-biases)
48
+ - [Other Known Limitations](#other-known-limitations)
49
+ - [Additional Information](#additional-information)
50
+ - [Dataset Curators](#dataset-curators)
51
+ - [Licensing Information](#licensing-information)
52
+ - [Citation Information](#citation-information)
53
+
54
+ ## Dataset Description
55
+
56
+ - **Homepage:** https://recipenlg.cs.put.poznan.pl/
57
+ - **Repository:** https://github.com/Glorf/recipenlg
58
+ - **Paper:** https://www.aclweb.org/anthology/volumes/2020.inlg-1/
59
+ - **Leaderboard:** [More Information Needed]
60
+ - **Point of Contact:** [More Information Needed]
61
+
62
+ ### Dataset Summary
63
+
64
+ [More Information Needed]
65
+
66
+ ### Supported Tasks and Leaderboards
67
+
68
+ [More Information Needed]
69
+
70
+ ### Languages
71
+
72
+ [More Information Needed]
73
+
74
+ ## Dataset Structure
75
+
76
+ ### Data Instances
77
+
78
+ [More Information Needed]
79
+
80
+ ### Data Fields
81
+
82
+ [More Information Needed]
83
+
84
+ ### Data Splits
85
+
86
+ [More Information Needed]
87
+
88
+ ## Dataset Creation
89
+
90
+ ### Curation Rationale
91
+
92
+ [More Information Needed]
93
+
94
+ ### Source Data
95
+
96
+ [More Information Needed]
97
+
98
+ #### Initial Data Collection and Normalization
99
+
100
+ [More Information Needed]
101
+
102
+ #### Who are the source language producers?
103
+
104
+ [More Information Needed]
105
+
106
+ ### Annotations
107
+
108
+ [More Information Needed]
109
+
110
+ #### Annotation process
111
+
112
+ [More Information Needed]
113
+
114
+ #### Who are the annotators?
115
+
116
+ [More Information Needed]
117
+
118
+ ### Personal and Sensitive Information
119
+
120
+ [More Information Needed]
121
+
122
+ ## Considerations for Using the Data
123
+
124
+ ### Social Impact of Dataset
125
+
126
+ [More Information Needed]
127
+
128
+ ### Discussion of Biases
129
+
130
+ [More Information Needed]
131
+
132
+ ### Other Known Limitations
133
+
134
+ [More Information Needed]
135
+
136
+ ## Additional Information
137
+
138
+ ### Dataset Curators
139
+
140
+ [More Information Needed]
141
+
142
+ ### Licensing Information
143
+
144
+ [More Information Needed]
145
+
146
+ ### Citation Information
147
+
148
+ [More Information Needed]
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"default": {"description": "The dataset contains 2231142 cooking recipes (>2 millions). It's processed in more careful way and provides more samples than any other dataset in the area.\n", "citation": "@inproceedings{bien-etal-2020-recipenlg,\ntitle = \"{R}ecipe{NLG}: A Cooking Recipes Dataset for Semi-Structured Text Generation\",\nauthor = \"Bie{'n}, Micha{l} and\n Gilski, Micha{l} and\n Maciejewska, Martyna and\n Taisner, Wojciech and\n Wisniewski, Dawid and\n Lawrynowicz, Agnieszka\",\nbooktitle = \"Proceedings of the 13th International Conference on Natural Language Generation\",\nmonth = dec,\nyear = \"2020\",\naddress = \"Dublin, Ireland\",\npublisher = \"Association for Computational Linguistics\",\nurl = \"https://www.aclweb.org/anthology/2020.inlg-1.4\",\npages = \"22--28\"\n}\n", "homepage": "https://recipenlg.cs.put.poznan.pl/", "license": "", "features": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "ingredients": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "directions": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "link": {"dtype": "string", "id": null, "_type": "Value"}, "source": {"num_classes": 2, "names": ["Gathered", "Recipes1M"], "names_file": null, "id": null, "_type": "ClassLabel"}, "ner": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "recipe_nlg", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 2194783815, "num_examples": 2231142, "dataset_name": "recipe_nlg"}}, "download_checksums": {}, "download_size": 0, "post_processing_size": null, "dataset_size": 2194783815, "size_in_bytes": 2194783815}}
dummy/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ee123547c4e727144cf6e60dfa897d38d86eda371659d53925e24f8eb874e098
3
+ size 1421
recipe_nlg.py ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 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
+ import ast
16
+ import csv
17
+ import os
18
+
19
+ import datasets
20
+
21
+
22
+ _CITATION = """\
23
+ @inproceedings{bien-etal-2020-recipenlg,
24
+ title = "{R}ecipe{NLG}: A Cooking Recipes Dataset for Semi-Structured Text Generation",
25
+ author = "Bie{'n}, Micha{l} and
26
+ Gilski, Micha{l} and
27
+ Maciejewska, Martyna and
28
+ Taisner, Wojciech and
29
+ Wisniewski, Dawid and
30
+ Lawrynowicz, Agnieszka",
31
+ booktitle = "Proceedings of the 13th International Conference on Natural Language Generation",
32
+ month = dec,
33
+ year = "2020",
34
+ address = "Dublin, Ireland",
35
+ publisher = "Association for Computational Linguistics",
36
+ url = "https://www.aclweb.org/anthology/2020.inlg-1.4",
37
+ pages = "22--28"
38
+ }
39
+ """
40
+
41
+ _DESCRIPTION = """\
42
+ The dataset contains 2231142 cooking recipes (>2 millions). It's processed in more careful way and provides more samples than any other dataset in the area.
43
+ """
44
+
45
+ _HOMEPAGE = "https://recipenlg.cs.put.poznan.pl/"
46
+
47
+ _FILENAME = "full_dataset.csv"
48
+
49
+
50
+ class RecipeNlg(datasets.GeneratorBasedBuilder):
51
+ VERSION = datasets.Version("1.0.0")
52
+
53
+ @property
54
+ def manual_download_instructions(self):
55
+ return """\
56
+ You need to go to https://recipenlg.cs.put.poznan.pl/,
57
+ and manually download the dataset. Once it is completed,
58
+ a file named dataset.zip will be appeared in your Downloads folder
59
+ or whichever folder your browser chooses to save files to. You then have
60
+ to unzip the file and move full_dataset.csv under <path/to/folder>.
61
+ The <path/to/folder> can e.g. be "~/manual_data".
62
+ recipe_nlg can then be loaded using the following command `datasets.load_dataset("recipe_nlg", data_dir="<path/to/folder>")`.
63
+ """
64
+
65
+ def _info(self):
66
+ features = datasets.Features(
67
+ {
68
+ "id": datasets.Value("int32"),
69
+ "title": datasets.Value("string"),
70
+ "ingredients": datasets.Sequence(datasets.Value("string")),
71
+ "directions": datasets.Sequence(datasets.Value("string")),
72
+ "link": datasets.Value("string"),
73
+ "source": datasets.ClassLabel(names=["Gathered", "Recipes1M"]),
74
+ "ner": datasets.Sequence(datasets.Value("string")),
75
+ }
76
+ )
77
+ return datasets.DatasetInfo(
78
+ description=_DESCRIPTION,
79
+ features=features,
80
+ supervised_keys=None,
81
+ homepage=_HOMEPAGE,
82
+ citation=_CITATION,
83
+ )
84
+
85
+ def _split_generators(self, dl_manager):
86
+ path_to_manual_file = os.path.abspath(os.path.expanduser(dl_manager.manual_dir))
87
+ if not os.path.exists(path_to_manual_file):
88
+ raise FileNotFoundError(
89
+ "{} does not exist. Make sure you insert a manual dir via `datasets.load_dataset('recipe_nlg', data_dir=...)` that includes file name {}. Manual download instructions: {}".format(
90
+ path_to_manual_file,
91
+ _FILENAME,
92
+ self.manual_download_instructions,
93
+ )
94
+ )
95
+ return [
96
+ datasets.SplitGenerator(
97
+ name=datasets.Split.TRAIN,
98
+ gen_kwargs={
99
+ "filepath": os.path.join(path_to_manual_file, "full_dataset.csv"),
100
+ "split": "train",
101
+ },
102
+ ),
103
+ ]
104
+
105
+ def _generate_examples(self, filepath, split):
106
+ with open(filepath, encoding="utf-8") as csv_file:
107
+ csv_reader = csv.reader(csv_file)
108
+ for idx, row in enumerate(csv_reader):
109
+ if idx == 0:
110
+ continue
111
+ resp = {
112
+ "id": row[0],
113
+ "title": row[1],
114
+ "ingredients": ast.literal_eval(row[2]),
115
+ "directions": ast.literal_eval(row[3]),
116
+ "link": row[4],
117
+ "source": row[5],
118
+ "ner": ast.literal_eval(row[6]),
119
+ }
120
+ yield idx, resp