Commit ·
c2e5397
0
Parent(s):
Update files from the datasets library (from 1.0.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.0.0
Files changed (8)
- .gitattributesAdded+27
- dataset_infos.jsonAdded+1
- dummy/de/1.0.0/dummy_data.zipAdded+3
- dummy/es/1.0.0/dummy_data.zipAdded+3
- dummy/fr/1.0.0/dummy_data.zipAdded+3
- dummy/ru/1.0.0/dummy_data.zipAdded+3
- dummy/tu/1.0.0/dummy_data.zipAdded+3
- mlsum.pyAdded+119
123456789101112131415161718192021222324252627*.7z filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.bin.* filter=lfs diff=lfs merge=lfs -text*.bz2 filter=lfs diff=lfs merge=lfs -text*.ftz filter=lfs diff=lfs merge=lfs -text*.gz filter=lfs diff=lfs merge=lfs -text*.h5 filter=lfs diff=lfs merge=lfs -text*.joblib filter=lfs diff=lfs merge=lfs -text*.lfs.* filter=lfs diff=lfs merge=lfs -text*.model filter=lfs diff=lfs merge=lfs -text*.msgpack filter=lfs diff=lfs merge=lfs -text*.onnx filter=lfs diff=lfs merge=lfs -text*.ot filter=lfs diff=lfs merge=lfs -text*.parquet filter=lfs diff=lfs merge=lfs -text*.pb filter=lfs diff=lfs merge=lfs -text*.pt filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.rar filter=lfs diff=lfs merge=lfs -textsaved_model/**/* filter=lfs diff=lfs merge=lfs -text*.tar.* filter=lfs diff=lfs merge=lfs -text*.tflite filter=lfs diff=lfs merge=lfs -text*.tgz filter=lfs diff=lfs merge=lfs -text*.xz filter=lfs diff=lfs merge=lfs -text*.zip filter=lfs diff=lfs merge=lfs -text*.zstandard filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text1{"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}}123version https://git-lfs.github.com/spec/v1oid sha256:7cadc08524dacf9f056faba873e8fec41ea56917817a084f28abcbc0d30ffef4size 1624123version https://git-lfs.github.com/spec/v1oid sha256:389de7907667221cda2ee9b7a8776202782a29f61bc967c4d492b3ad713311d3size 1624123version https://git-lfs.github.com/spec/v1oid sha256:2320b620711a4e87c4199a2fd27946f0bfc030b74b9a1e7c50a617b65338cd83size 1624123version https://git-lfs.github.com/spec/v1oid sha256:7b108a64791dc81653da0b25d8cad78fc32ee9e592609de9cc2b8030af99a49asize 1624123version https://git-lfs.github.com/spec/v1oid sha256:e340cb9e19b52325d0b206317d051ddd5b7eb9ae2edd6767667a636f78f3ab51size 1624123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119from __future__ import absolute_import, division, print_function
import jsonimport os
import datasets
_CITATION = """\@article{scialom2020mlsum, title={MLSUM: The Multilingual Summarization Corpus}, author={Scialom, Thomas and Dray, Paul-Alexis and Lamprier, Sylvain and Piwowarski, Benjamin and Staiano, Jacopo}, journal={arXiv preprint arXiv:2004.14900}, year={2020}}"""
_DESCRIPTION = """\We present MLSUM, the first large-scale MultiLingual SUMmarization dataset.Obtained from online newspapers, it contains 1.5M+ article/summary pairs in five different languages -- namely, French, German, Spanish, Russian, Turkish.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.We report cross-lingual comparative analyses based on state-of-the-art systems.These highlight existing biases which motivate the use of a multi-lingual dataset."""_URL = "https://gitlab.lip6.fr/scialom/mlsum_data/-/raw/master/MLSUM/"_LANG = ["de", "es", "fr", "ru", "tu"]
class Mlsum(datasets.GeneratorBasedBuilder):
BUILDER_CONFIGS = [ datasets.BuilderConfig( name=lang, version=datasets.Version("1.0.0"), description="", ) for lang in _LANG ]
def _info(self): return datasets.DatasetInfo( # This is the description that will appear on the datasets page. description=_DESCRIPTION, # datasets.features.FeatureConnectors features=datasets.Features( { "text": datasets.Value("string"), "summary": datasets.Value("string"), "topic": datasets.Value("string"), "url": datasets.Value("string"), "title": datasets.Value("string"), "date": datasets.Value("string") # These are the features of your dataset like images, labels ... } ), # If there's a common (input, target) tuple from the features, # specify them here. They'll be used if as_supervised=True in # builder.as_dataset. supervised_keys=None, # Homepage of the dataset for documentation homepage="", citation=_CITATION, )
def _split_generators(self, dl_manager): """Returns SplitGenerators.""" # dl_manager is a datasets.download.DownloadManager that can be used to # download and extract URLs
lang = str(self.config.name) urls_to_download = { "test": os.path.join(_URL, lang + "_test.zip"), "train": os.path.join(_URL, lang + "_train.zip"), "validation": os.path.join(_URL, lang + "_val.zip"), } downloaded_files = dl_manager.download_and_extract(urls_to_download)
return [ datasets.SplitGenerator( name=datasets.Split.TRAIN, # These kwargs will be passed to _generate_examples gen_kwargs={ "filepath": os.path.join(downloaded_files["train"], lang + "_train.jsonl"), "lang": lang, }, ), datasets.SplitGenerator( name=datasets.Split.VALIDATION, # These kwargs will be passed to _generate_examples gen_kwargs={ "filepath": os.path.join(downloaded_files["validation"], lang + "_val.jsonl"), "lang": lang, }, ), datasets.SplitGenerator( name=datasets.Split.TEST, # These kwargs will be passed to _generate_examples gen_kwargs={ "filepath": os.path.join(downloaded_files["test"], lang + "_test.jsonl"), "lang": lang, }, ), ]
def _generate_examples(self, filepath, lang): """Yields examples.""" with open(filepath, encoding="utf-8") as f: i = 0 for line in f: data = json.loads(line) i += 1 yield i, { "text": data["text"], "summary": data["summary"], "topic": data["topic"], "url": data["url"], "title": data["title"], "date": data["date"], }.gitattributesAdded+27
dataset_infos.jsonAdded+1
dummy/de/1.0.0/dummy_data.zipAdded+3
dummy/es/1.0.0/dummy_data.zipAdded+3
dummy/fr/1.0.0/dummy_data.zipAdded+3
dummy/ru/1.0.0/dummy_data.zipAdded+3
dummy/tu/1.0.0/dummy_data.zipAdded+3
mlsum.pyAdded+119