system HF staff commited on
Commit
317c08a
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
+ {"default": {"description": "One million English sentences, each split into two sentences that together preserve the original meaning, extracted from Wikipedia \nGoogle's WikiSplit dataset was constructed automatically from the publicly available Wikipedia revision history. Although \nthe dataset contains some inherent noise, it can serve as valuable training data for models that split or merge sentences.\n", "citation": "@InProceedings{BothaEtAl2018,\n title = {{Learning To Split and Rephrase From Wikipedia Edit History}},\n author = {Botha, Jan A and Faruqui, Manaal and Alex, John and Baldridge, Jason and Das, Dipanjan},\n booktitle = {Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing},\n pages = {to appear},\n note = {arXiv preprint arXiv:1808.09468},\n year = {2018}\n}\n", "homepage": "https://dataset-homepage/", "license": "", "features": {"complex_sentence": {"dtype": "string", "id": null, "_type": "Value"}, "simple_sentence_1": {"dtype": "string", "id": null, "_type": "Value"}, "simple_sentence_2": {"dtype": "string", "id": null, "_type": "Value"}}, "supervised_keys": null, "builder_name": "wiki_split", "config_name": "default", "version": {"version_str": "0.1.0", "description": null, "datasets_version_to_prepare": null, "major": 0, "minor": 1, "patch": 0}, "splits": {"test": {"name": "test", "num_bytes": 1949294, "num_examples": 5000, "dataset_name": "wiki_split"}, "train": {"name": "train", "num_bytes": 384513073, "num_examples": 989944, "dataset_name": "wiki_split"}, "validation": {"name": "validation", "num_bytes": 1935459, "num_examples": 5000, "dataset_name": "wiki_split"}}, "download_checksums": {"https://github.com/google-research-datasets/wiki-split/raw/master/train.tsv.zip": {"num_bytes": 96439435, "checksum": "42234243209fbb8f11405372284d634728faf47eafd5799cefb932c06c7b3a54"}, "https://github.com/google-research-datasets/wiki-split/raw/master/test.tsv": {"num_bytes": 1926782, "checksum": "88c3eff253f7ff3fcce9370bb54f750bc35f646c1b6d2a45df2b993c96670f7f"}, "https://github.com/google-research-datasets/wiki-split/raw/master/validation.tsv": {"num_bytes": 1912947, "checksum": "63931ff45b7d95d60480bdcd466d69894fc02a0ec975cab8d0955e9b8cceb922"}}, "download_size": 100279164, "dataset_size": 388397826, "size_in_bytes": 488676990}}
dummy/0.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:44a28f2263ed1306782f384884e0bbd2b7782b537aaec095b260e4ea30260844
3
+ size 2314
dummy/0.1.0/dummy_data/TODO-add_fake_data_in_this_directory.txt ADDED
@@ -0,0 +1 @@
 
1
+ TODO(wiki_split): Add fake data in this directory
dummy/0.1.0/dummy_data/test.tsv ADDED
@@ -0,0 +1,2 @@
 
 
1
+ ' '' For Robert Price '' docetism '' , together with '' encratism '' , '' Gnosticism '' and '' adoptionism '' hrist was so divine that he could not have been human , since God lacked a material body , which therefore could not physically suffer . ' '' For Robert Price '' docetism '' , together with '' encratism '' , '' Gnosticism '' and '' adoptionism '' , has been employed '' far beyond what historically descriptive usage would allow '' . <::::> In one version , as in Marcionism , Christ was so divine that he could not have been human , since God lacked a material body , which therefore could not physically suffer .
2
+ ' '' He was the fourth of the nine children of Jeremiah Scotland Allison and his wife , Mariah Ruth Brown and his father was a Presbyterian minister , who raised cattle and sheep to support his family . ' '' He was the fourth of the nine children of Jeremiah Scotland Allison and his wife , Mariah Ruth Brown . <::::> His father was a Presbyterian minister who raised cattle and sheep to support his family .
dummy/0.1.0/dummy_data/train.tsv.zip/train.tsv ADDED
@@ -0,0 +1,2 @@
 
 
1
+ '' As she translates from one language to another , she tries to find the appropriate wording and context in English that would correspond to the work in Spanish her poems and stories started to have differing meanings in their respective languages . ' '' As she translates from one language to another , she tries to find the appropriate wording and context in English that would correspond to the work in Spanish . <::::> Ergo , her poems and stories started to have differing meanings in their respective languages .
2
+ ' '' BDSM is solely based on consensual activities , and based on its system and laws , the concepts presented by de Sade are not agreed upon the BDSM culture , even though they are sadistic in nature . ' '' BDSM is solely based on consensual activities , and based on its system and laws . <::::> The concepts presented by de Sade are not in accordance with the BDSM culture , even though they are sadistic in nature .
dummy/0.1.0/dummy_data/validation.tsv ADDED
@@ -0,0 +1,2 @@
 
 
1
+ ' '' Critics criticized the use of the disputed figures by conservative organizations ; for example , The Traditional Values Coalition used the article to urge the Centers for Disease Control to cut down on its AIDS funding . ' '' Critics criticized the use of the disputed figures by conservative organizations . <::::> For example , The Traditional Values Coalition used the article to urge the Centers for Disease Control to cut down on its AIDS funding .
2
+ ' '' Do Re Mi '' ' is a song by Kurt Cobain of the band Nirvana , and is believed to be one of the final songs he wrote before his apparent suicide in April 1994 . ' '' Do Re Mi '' ' is a song by Kurt Cobain , lead singer and guitarist of the American rock band Nirvana . <::::> It is believed to be one of the final songs he wrote before his apparent suicide in April 1994 .
wiki_split.py ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """TODO(wiki_split): Add a description here."""
2
+
3
+ from __future__ import absolute_import, division, print_function
4
+
5
+ import csv
6
+ import os
7
+
8
+ import datasets
9
+
10
+
11
+ # TODO(wiki_split): BibTeX citation
12
+ _CITATION = """\
13
+ @InProceedings{BothaEtAl2018,
14
+ title = {{Learning To Split and Rephrase From Wikipedia Edit History}},
15
+ author = {Botha, Jan A and Faruqui, Manaal and Alex, John and Baldridge, Jason and Das, Dipanjan},
16
+ booktitle = {Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing},
17
+ pages = {to appear},
18
+ note = {arXiv preprint arXiv:1808.09468},
19
+ year = {2018}
20
+ }
21
+ """
22
+
23
+ # TODO(wiki_split):
24
+ _DESCRIPTION = """\
25
+ One million English sentences, each split into two sentences that together preserve the original meaning, extracted from Wikipedia
26
+ Google's WikiSplit dataset was constructed automatically from the publicly available Wikipedia revision history. Although
27
+ the dataset contains some inherent noise, it can serve as valuable training data for models that split or merge sentences.
28
+ """
29
+ _URL = "https://github.com/google-research-datasets/wiki-split/raw/master"
30
+ _TRAIN_FILE = "train.tsv.zip"
31
+ _TEST_FILE = "test.tsv"
32
+ _DEV_FILE = "validation.tsv"
33
+
34
+
35
+ class WikiSplit(datasets.GeneratorBasedBuilder):
36
+ """TODO(wiki_split): Short description of my dataset."""
37
+
38
+ # TODO(wiki_split): Set up version.
39
+ VERSION = datasets.Version("0.1.0")
40
+
41
+ def _info(self):
42
+ # TODO(wiki_split): Specifies the datasets.DatasetInfo object
43
+ return datasets.DatasetInfo(
44
+ # This is the description that will appear on the datasets page.
45
+ description=_DESCRIPTION,
46
+ # datasets.features.FeatureConnectors
47
+ features=datasets.Features(
48
+ {
49
+ "complex_sentence": datasets.Value("string"),
50
+ "simple_sentence_1": datasets.Value("string"),
51
+ "simple_sentence_2": datasets.Value("string"),
52
+ # These are the features of your dataset like images, labels ...
53
+ }
54
+ ),
55
+ # If there's a common (input, target) tuple from the features,
56
+ # specify them here. They'll be used if as_supervised=True in
57
+ # builder.as_dataset.
58
+ supervised_keys=None,
59
+ # Homepage of the dataset for documentation
60
+ homepage="https://dataset-homepage/",
61
+ citation=_CITATION,
62
+ )
63
+
64
+ def _split_generators(self, dl_manager):
65
+ """Returns SplitGenerators."""
66
+ # TODO(wiki_split): Downloads the data and defines the splits
67
+ # dl_manager is a datasets.download.DownloadManager that can be used to
68
+ # download and extract URLs
69
+ urls_to_download = {
70
+ "train": os.path.join(_URL, _TRAIN_FILE),
71
+ "test": os.path.join(_URL, _TEST_FILE),
72
+ "dev": os.path.join(_URL, _DEV_FILE),
73
+ }
74
+ dl_dir = dl_manager.download_and_extract(urls_to_download)
75
+ return [
76
+ datasets.SplitGenerator(
77
+ name=datasets.Split.TRAIN,
78
+ # These kwargs will be passed to _generate_examples
79
+ gen_kwargs={"filepath": os.path.join(dl_dir["train"], "train.tsv")},
80
+ ),
81
+ datasets.SplitGenerator(
82
+ name=datasets.Split.TEST,
83
+ # These kwargs will be passed to _generate_examples
84
+ gen_kwargs={"filepath": dl_dir["test"]},
85
+ ),
86
+ datasets.SplitGenerator(
87
+ name=datasets.Split.VALIDATION,
88
+ # These kwargs will be passed to _generate_examples
89
+ gen_kwargs={"filepath": dl_dir["dev"]},
90
+ ),
91
+ ]
92
+
93
+ def _generate_examples(self, filepath):
94
+ """Yields examples."""
95
+ # TODO(wiki_split): Yields (key, example) tuples from the dataset
96
+ with open(filepath, encoding="utf-8") as f:
97
+ data = csv.reader(f, delimiter="\t")
98
+ # data = csv.reader(f, delimiter='\t')
99
+
100
+ for id_, row in enumerate(data):
101
+ yield id_, {
102
+ "complex_sentence": row[0],
103
+ "simple_sentence_1": row[1].split("<::::>")[0],
104
+ "simple_sentence_2": row[1].split("<::::>")[1],
105
+ }