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

Update files from the datasets library (from 1.0.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.0.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
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"de": {"description": "We present MLSUM, the first large-scale MultiLingual SUMmarization dataset. \nObtained from online newspapers, it contains 1.5M+ article/summary pairs in five different languages -- namely, French, German, Spanish, Russian, Turkish. \nTogether with English newspapers from the popular CNN/Daily mail dataset, the collected data form a large scale multilingual dataset which can enable new research directions for the text summarization community. \nWe report cross-lingual comparative analyses based on state-of-the-art systems. \nThese highlight existing biases which motivate the use of a multi-lingual dataset. \n", "citation": "@article{scialom2020mlsum,\n title={MLSUM: The Multilingual Summarization Corpus},\n author={Scialom, Thomas and Dray, Paul-Alexis and Lamprier, Sylvain and Piwowarski, Benjamin and Staiano, Jacopo},\n journal={arXiv preprint arXiv:2004.14900},\n year={2020}\n}\n", "homepage": "", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "summary": {"dtype": "string", "id": null, "_type": "Value"}, "topic": {"dtype": "string", "id": null, "_type": "Value"}, "url": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}}, "supervised_keys": null, "builder_name": "mlsum", "config_name": "de", "version": {"version_str": "1.0.0", "description": null, "datasets_version_to_prepare": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 846960392, "num_examples": 220887, "dataset_name": "mlsum"}, "validation": {"name": "validation", "num_bytes": 47119589, "num_examples": 11394, "dataset_name": "mlsum"}, "test": {"name": "test", "num_bytes": 46847660, "num_examples": 10701, "dataset_name": "mlsum"}}, "download_checksums": {"https://gitlab.lip6.fr/scialom/mlsum_data/-/raw/master/MLSUM/de_test.zip": {"num_bytes": 17741147, "checksum": "447e3b1839ab94d5700cc2aedc0b52521404865b2589656acc90a654ed0de4ff"}, "https://gitlab.lip6.fr/scialom/mlsum_data/-/raw/master/MLSUM/de_train.zip": {"num_bytes": 311059697, "checksum": "88e788437bae48af6b3d18a554af4b2794cc6143a137df3f56daa91a37e3ea7e"}, "https://gitlab.lip6.fr/scialom/mlsum_data/-/raw/master/MLSUM/de_val.zip": {"num_bytes": 17771216, "checksum": "732620c32e1d3f393ee3193f57f1217d8549499eb4906e144252aaab39aa910b"}}, "download_size": 346572060, "dataset_size": 940927641, "size_in_bytes": 1287499701}, "es": {"description": "We present MLSUM, the first large-scale MultiLingual SUMmarization dataset. \nObtained from online newspapers, it contains 1.5M+ article/summary pairs in five different languages -- namely, French, German, Spanish, Russian, Turkish. \nTogether with English newspapers from the popular CNN/Daily mail dataset, the collected data form a large scale multilingual dataset which can enable new research directions for the text summarization community. \nWe report cross-lingual comparative analyses based on state-of-the-art systems. \nThese highlight existing biases which motivate the use of a multi-lingual dataset. \n", "citation": "@article{scialom2020mlsum,\n title={MLSUM: The Multilingual Summarization Corpus},\n author={Scialom, Thomas and Dray, Paul-Alexis and Lamprier, Sylvain and Piwowarski, Benjamin and Staiano, Jacopo},\n journal={arXiv preprint arXiv:2004.14900},\n year={2020}\n}\n", "homepage": "", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "summary": {"dtype": "string", "id": null, "_type": "Value"}, "topic": {"dtype": "string", "id": null, "_type": "Value"}, "url": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}}, "supervised_keys": null, "builder_name": "mlsum", "config_name": "es", "version": {"version_str": "1.0.0", "description": null, "datasets_version_to_prepare": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1214558950, "num_examples": 266367, "dataset_name": "mlsum"}, "validation": {"name": "validation", "num_bytes": 50643448, "num_examples": 10358, "dataset_name": "mlsum"}, "test": {"name": "test", "num_bytes": 71263713, "num_examples": 13920, "dataset_name": "mlsum"}}, "download_checksums": {"https://gitlab.lip6.fr/scialom/mlsum_data/-/raw/master/MLSUM/es_test.zip": {"num_bytes": 27386169, "checksum": "177cfcf358bc4aa9bce2753b8e9de4f6eb41d2c30b1a99ef29d64e70537a1c0d"}, "https://gitlab.lip6.fr/scialom/mlsum_data/-/raw/master/MLSUM/es_train.zip": {"num_bytes": 466443036, "checksum": "a01f4b4b873aa6cdeae15952a22ede2146734d0b60e7297470a35956507c863a"}, "https://gitlab.lip6.fr/scialom/mlsum_data/-/raw/master/MLSUM/es_val.zip": {"num_bytes": 19483214, "checksum": "e38fce9950008ec4b48963692891c4c94d51a1e307286fb596e093aeb1230c92"}}, "download_size": 513312419, "dataset_size": 1336466111, "size_in_bytes": 1849778530}, "fr": {"description": "We present MLSUM, the first large-scale MultiLingual SUMmarization dataset. \nObtained from online newspapers, it contains 1.5M+ article/summary pairs in five different languages -- namely, French, German, Spanish, Russian, Turkish. \nTogether with English newspapers from the popular CNN/Daily mail dataset, the collected data form a large scale multilingual dataset which can enable new research directions for the text summarization community. \nWe report cross-lingual comparative analyses based on state-of-the-art systems. \nThese highlight existing biases which motivate the use of a multi-lingual dataset. \n", "citation": "@article{scialom2020mlsum,\n title={MLSUM: The Multilingual Summarization Corpus},\n author={Scialom, Thomas and Dray, Paul-Alexis and Lamprier, Sylvain and Piwowarski, Benjamin and Staiano, Jacopo},\n journal={arXiv preprint arXiv:2004.14900},\n year={2020}\n}\n", "homepage": "", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "summary": {"dtype": "string", "id": null, "_type": "Value"}, "topic": {"dtype": "string", "id": null, "_type": "Value"}, "url": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}}, "supervised_keys": null, "builder_name": "mlsum", "config_name": "fr", "version": {"version_str": "1.0.0", "description": null, "datasets_version_to_prepare": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1471965974, "num_examples": 392902, "dataset_name": "mlsum"}, "validation": {"name": "validation", "num_bytes": 70413260, "num_examples": 16059, "dataset_name": "mlsum"}, "test": {"name": "test", "num_bytes": 69660336, "num_examples": 15828, "dataset_name": "mlsum"}}, "download_checksums": {"https://gitlab.lip6.fr/scialom/mlsum_data/-/raw/master/MLSUM/fr_test.zip": {"num_bytes": 26753725, "checksum": "7954f97de0f3839421e7c4aba38c72cc052771bc795cbca211ca2faea7d7d3b8"}, "https://gitlab.lip6.fr/scialom/mlsum_data/-/raw/master/MLSUM/fr_train.zip": {"num_bytes": 566354864, "checksum": "0ac483d3722219ca633c0f614622d64bc4c71e05f1bfb576a9e99b08de5801ba"}, "https://gitlab.lip6.fr/scialom/mlsum_data/-/raw/master/MLSUM/fr_val.zip": {"num_bytes": 26879418, "checksum": "755956e3ee4ae7c5da388286e7226a55bf5a0802482dee241899af319394300d"}}, "download_size": 619988007, "dataset_size": 1612039570, "size_in_bytes": 2232027577}, "ru": {"description": "We present MLSUM, the first large-scale MultiLingual SUMmarization dataset. \nObtained from online newspapers, it contains 1.5M+ article/summary pairs in five different languages -- namely, French, German, Spanish, Russian, Turkish. \nTogether with English newspapers from the popular CNN/Daily mail dataset, the collected data form a large scale multilingual dataset which can enable new research directions for the text summarization community. \nWe report cross-lingual comparative analyses based on state-of-the-art systems. \nThese highlight existing biases which motivate the use of a multi-lingual dataset. \n", "citation": "@article{scialom2020mlsum,\n title={MLSUM: The Multilingual Summarization Corpus},\n author={Scialom, Thomas and Dray, Paul-Alexis and Lamprier, Sylvain and Piwowarski, Benjamin and Staiano, Jacopo},\n journal={arXiv preprint arXiv:2004.14900},\n year={2020}\n}\n", "homepage": "", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "summary": {"dtype": "string", "id": null, "_type": "Value"}, "topic": {"dtype": "string", "id": null, "_type": "Value"}, "url": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}}, "supervised_keys": null, "builder_name": "mlsum", "config_name": "ru", "version": {"version_str": "1.0.0", "description": null, "datasets_version_to_prepare": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 257389569, "num_examples": 25556, "dataset_name": "mlsum"}, "validation": {"name": "validation", "num_bytes": 9128521, "num_examples": 750, "dataset_name": "mlsum"}, "test": {"name": "test", "num_bytes": 9656422, "num_examples": 757, "dataset_name": "mlsum"}}, "download_checksums": {"https://gitlab.lip6.fr/scialom/mlsum_data/-/raw/master/MLSUM/ru_test.zip": {"num_bytes": 3710826, "checksum": "769e009716f952cffb9cd6b722b8606cdd620e43a6559f1f05b1f0626d43b979"}, "https://gitlab.lip6.fr/scialom/mlsum_data/-/raw/master/MLSUM/ru_train.zip": {"num_bytes": 98998463, "checksum": "225cd04763d6d1d760d9819e9808b052cd6e45fa94ed5e1950c67fa7cf997a72"}, "https://gitlab.lip6.fr/scialom/mlsum_data/-/raw/master/MLSUM/ru_val.zip": {"num_bytes": 3506501, "checksum": "afd47b28ba023450669ed96029295027dc32dc8c71507e9c27748bb89a3924bb"}}, "download_size": 106215790, "dataset_size": 276174512, "size_in_bytes": 382390302}, "tu": {"description": "We present MLSUM, the first large-scale MultiLingual SUMmarization dataset. \nObtained from online newspapers, it contains 1.5M+ article/summary pairs in five different languages -- namely, French, German, Spanish, Russian, Turkish. \nTogether with English newspapers from the popular CNN/Daily mail dataset, the collected data form a large scale multilingual dataset which can enable new research directions for the text summarization community. \nWe report cross-lingual comparative analyses based on state-of-the-art systems. \nThese highlight existing biases which motivate the use of a multi-lingual dataset. \n", "citation": "@article{scialom2020mlsum,\n title={MLSUM: The Multilingual Summarization Corpus},\n author={Scialom, Thomas and Dray, Paul-Alexis and Lamprier, Sylvain and Piwowarski, Benjamin and Staiano, Jacopo},\n journal={arXiv preprint arXiv:2004.14900},\n year={2020}\n}\n", "homepage": "", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "summary": {"dtype": "string", "id": null, "_type": "Value"}, "topic": {"dtype": "string", "id": null, "_type": "Value"}, "url": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "date": {"dtype": "string", "id": null, "_type": "Value"}}, "supervised_keys": null, "builder_name": "mlsum", "config_name": "tu", "version": {"version_str": "1.0.0", "description": null, "datasets_version_to_prepare": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 641623383, "num_examples": 249277, "dataset_name": "mlsum"}, "validation": {"name": "validation", "num_bytes": 25530709, "num_examples": 11565, "dataset_name": "mlsum"}, "test": {"name": "test", "num_bytes": 27830260, "num_examples": 12775, "dataset_name": "mlsum"}}, "download_checksums": {"https://gitlab.lip6.fr/scialom/mlsum_data/-/raw/master/MLSUM/tu_test.zip": {"num_bytes": 9525991, "checksum": "31ea869addf0dd483ef7446bdd1167b25a890d1ed1f9a48e74a67eebc731f463"}, "https://gitlab.lip6.fr/scialom/mlsum_data/-/raw/master/MLSUM/tu_train.zip": {"num_bytes": 229214838, "checksum": "cc8daf8a104fd362296276744d5a5b304c4e21aff7b4ffa761be2f3b7f531f8a"}, "https://gitlab.lip6.fr/scialom/mlsum_data/-/raw/master/MLSUM/tu_val.zip": {"num_bytes": 8751987, "checksum": "b39680a7dd648c970e03a7abf2c63b569c23f2b3f09dc0ae2fca8b7ad8f08b12"}}, "download_size": 247492816, "dataset_size": 694984352, "size_in_bytes": 942477168}}
dummy/de/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7cadc08524dacf9f056faba873e8fec41ea56917817a084f28abcbc0d30ffef4
3
+ size 1624
dummy/es/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:389de7907667221cda2ee9b7a8776202782a29f61bc967c4d492b3ad713311d3
3
+ size 1624
dummy/fr/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2320b620711a4e87c4199a2fd27946f0bfc030b74b9a1e7c50a617b65338cd83
3
+ size 1624
dummy/ru/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b108a64791dc81653da0b25d8cad78fc32ee9e592609de9cc2b8030af99a49a
3
+ size 1624
dummy/tu/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e340cb9e19b52325d0b206317d051ddd5b7eb9ae2edd6767667a636f78f3ab51
3
+ size 1624
mlsum.py ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import absolute_import, division, print_function
2
+
3
+ import json
4
+ import os
5
+
6
+ import datasets
7
+
8
+
9
+ _CITATION = """\
10
+ @article{scialom2020mlsum,
11
+ title={MLSUM: The Multilingual Summarization Corpus},
12
+ author={Scialom, Thomas and Dray, Paul-Alexis and Lamprier, Sylvain and Piwowarski, Benjamin and Staiano, Jacopo},
13
+ journal={arXiv preprint arXiv:2004.14900},
14
+ year={2020}
15
+ }
16
+ """
17
+
18
+ _DESCRIPTION = """\
19
+ We present MLSUM, the first large-scale MultiLingual SUMmarization dataset.
20
+ Obtained from online newspapers, it contains 1.5M+ article/summary pairs in five different languages -- namely, French, German, Spanish, Russian, Turkish.
21
+ Together with English newspapers from the popular CNN/Daily mail dataset, the collected data form a large scale multilingual dataset which can enable new research directions for the text summarization community.
22
+ We report cross-lingual comparative analyses based on state-of-the-art systems.
23
+ These highlight existing biases which motivate the use of a multi-lingual dataset.
24
+ """
25
+ _URL = "https://gitlab.lip6.fr/scialom/mlsum_data/-/raw/master/MLSUM/"
26
+ _LANG = ["de", "es", "fr", "ru", "tu"]
27
+
28
+
29
+ class Mlsum(datasets.GeneratorBasedBuilder):
30
+
31
+ BUILDER_CONFIGS = [
32
+ datasets.BuilderConfig(
33
+ name=lang,
34
+ version=datasets.Version("1.0.0"),
35
+ description="",
36
+ )
37
+ for lang in _LANG
38
+ ]
39
+
40
+ def _info(self):
41
+ return datasets.DatasetInfo(
42
+ # This is the description that will appear on the datasets page.
43
+ description=_DESCRIPTION,
44
+ # datasets.features.FeatureConnectors
45
+ features=datasets.Features(
46
+ {
47
+ "text": datasets.Value("string"),
48
+ "summary": datasets.Value("string"),
49
+ "topic": datasets.Value("string"),
50
+ "url": datasets.Value("string"),
51
+ "title": datasets.Value("string"),
52
+ "date": datasets.Value("string")
53
+ # These are the features of your dataset like images, labels ...
54
+ }
55
+ ),
56
+ # If there's a common (input, target) tuple from the features,
57
+ # specify them here. They'll be used if as_supervised=True in
58
+ # builder.as_dataset.
59
+ supervised_keys=None,
60
+ # Homepage of the dataset for documentation
61
+ homepage="",
62
+ citation=_CITATION,
63
+ )
64
+
65
+ def _split_generators(self, dl_manager):
66
+ """Returns SplitGenerators."""
67
+ # dl_manager is a datasets.download.DownloadManager that can be used to
68
+ # download and extract URLs
69
+
70
+ lang = str(self.config.name)
71
+ urls_to_download = {
72
+ "test": os.path.join(_URL, lang + "_test.zip"),
73
+ "train": os.path.join(_URL, lang + "_train.zip"),
74
+ "validation": os.path.join(_URL, lang + "_val.zip"),
75
+ }
76
+ downloaded_files = dl_manager.download_and_extract(urls_to_download)
77
+
78
+ return [
79
+ datasets.SplitGenerator(
80
+ name=datasets.Split.TRAIN,
81
+ # These kwargs will be passed to _generate_examples
82
+ gen_kwargs={
83
+ "filepath": os.path.join(downloaded_files["train"], lang + "_train.jsonl"),
84
+ "lang": lang,
85
+ },
86
+ ),
87
+ datasets.SplitGenerator(
88
+ name=datasets.Split.VALIDATION,
89
+ # These kwargs will be passed to _generate_examples
90
+ gen_kwargs={
91
+ "filepath": os.path.join(downloaded_files["validation"], lang + "_val.jsonl"),
92
+ "lang": lang,
93
+ },
94
+ ),
95
+ datasets.SplitGenerator(
96
+ name=datasets.Split.TEST,
97
+ # These kwargs will be passed to _generate_examples
98
+ gen_kwargs={
99
+ "filepath": os.path.join(downloaded_files["test"], lang + "_test.jsonl"),
100
+ "lang": lang,
101
+ },
102
+ ),
103
+ ]
104
+
105
+ def _generate_examples(self, filepath, lang):
106
+ """Yields examples."""
107
+ with open(filepath, encoding="utf-8") as f:
108
+ i = 0
109
+ for line in f:
110
+ data = json.loads(line)
111
+ i += 1
112
+ yield i, {
113
+ "text": data["text"],
114
+ "summary": data["summary"],
115
+ "topic": data["topic"],
116
+ "url": data["url"],
117
+ "title": data["title"],
118
+ "date": data["date"],
119
+ }