Datasets:

Languages:
English
Multilinguality:
monolingual
Size Categories:
100K<n<1M
Language Creators:
crowdsourced
found
Annotations Creators:
crowdsourced
Source Datasets:
original
Tags:
License:
system HF staff commited on
Commit
e26d2b2
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
+ {"plain_text": {"description": "The Multi-Genre Natural Language Inference (MultiNLI) corpus is a\ncrowd-sourced collection of 433k sentence pairs annotated with textual\nentailment information. The corpus is modeled on the SNLI corpus, but differs in\nthat covers a range of genres of spoken and written text, and supports a\ndistinctive cross-genre generalization evaluation. The corpus served as the\nbasis for the shared task of the RepEval 2017 Workshop at EMNLP in Copenhagen.\n", "citation": "@InProceedings{N18-1101,\n author = \"Williams, Adina\n and Nangia, Nikita\n and Bowman, Samuel\",\n title = \"A Broad-Coverage Challenge Corpus for\n Sentence Understanding through Inference\",\n booktitle = \"Proceedings of the 2018 Conference of\n the North American Chapter of the\n Association for Computational Linguistics:\n Human Language Technologies, Volume 1 (Long\n Papers)\",\n year = \"2018\",\n publisher = \"Association for Computational Linguistics\",\n pages = \"1112--1122\",\n location = \"New Orleans, Louisiana\",\n url = \"http://aclweb.org/anthology/N18-1101\"\n}\n", "homepage": "https://www.nyu.edu/projects/bowman/multinli/", "license": "", "features": {"premise": {"dtype": "string", "id": null, "_type": "Value"}, "hypothesis": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"dtype": "string", "id": null, "_type": "Value"}}, "supervised_keys": null, "builder_name": "multi_nli_mismatch", "config_name": "plain_text", "version": {"version_str": "1.0.0", "description": "", "datasets_version_to_prepare": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 75601459, "num_examples": 392702, "dataset_name": "multi_nli_mismatch"}, "validation": {"name": "validation", "num_bytes": 2009444, "num_examples": 10000, "dataset_name": "multi_nli_mismatch"}}, "download_checksums": {"http://storage.googleapis.com/tfds-data/downloads/multi_nli/multinli_1.0.zip": {"num_bytes": 226850426, "checksum": "049f507b9e36b1fcb756cfd5aeb3b7a0cfcb84bf023793652987f7e7e0957822"}}, "download_size": 226850426, "dataset_size": 77610903, "size_in_bytes": 304461329}}
dummy/plain_text/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3fd8a96e02fff445e2dc971df18ec360fcfc4090de851a54fdf2ebece975f141
3
+ size 965
multi_nli_mismatch.py ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 The TensorFlow Datasets Authors and 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
+
16
+ # Lint as: python3
17
+ """The Multi-Genre NLI Corpus."""
18
+
19
+ from __future__ import absolute_import, division, print_function
20
+
21
+ import os
22
+
23
+ import datasets
24
+
25
+
26
+ _CITATION = """\
27
+ @InProceedings{N18-1101,
28
+ author = {Williams, Adina
29
+ and Nangia, Nikita
30
+ and Bowman, Samuel},
31
+ title = {A Broad-Coverage Challenge Corpus for
32
+ Sentence Understanding through Inference},
33
+ booktitle = {Proceedings of the 2018 Conference of
34
+ the North American Chapter of the
35
+ Association for Computational Linguistics:
36
+ Human Language Technologies, Volume 1 (Long
37
+ Papers)},
38
+ year = {2018},
39
+ publisher = {Association for Computational Linguistics},
40
+ pages = {1112--1122},
41
+ location = {New Orleans, Louisiana},
42
+ url = {http://aclweb.org/anthology/N18-1101}
43
+ }
44
+ """
45
+
46
+ _DESCRIPTION = """\
47
+ The Multi-Genre Natural Language Inference (MultiNLI) corpus is a
48
+ crowd-sourced collection of 433k sentence pairs annotated with textual
49
+ entailment information. The corpus is modeled on the SNLI corpus, but differs in
50
+ that covers a range of genres of spoken and written text, and supports a
51
+ distinctive cross-genre generalization evaluation. The corpus served as the
52
+ basis for the shared task of the RepEval 2017 Workshop at EMNLP in Copenhagen.
53
+ """
54
+
55
+ ROOT_URL = "http://storage.googleapis.com/tfds-data/downloads/multi_nli/multinli_1.0.zip"
56
+
57
+
58
+ class MultiNLIMismatchConfig(datasets.BuilderConfig):
59
+ """BuilderConfig for MultiNLI Mismatch."""
60
+
61
+ def __init__(self, **kwargs):
62
+ """BuilderConfig for MultiNLI Mismatch.
63
+
64
+ Args:
65
+
66
+ **kwargs: keyword arguments forwarded to super.
67
+ """
68
+ super(MultiNLIMismatchConfig, self).__init__(version=datasets.Version("1.0.0", ""), **kwargs)
69
+
70
+
71
+ class MultiNliMismatch(datasets.GeneratorBasedBuilder):
72
+ """MultiNLI: The Stanford Question Answering Dataset. Version 1.1."""
73
+
74
+ BUILDER_CONFIGS = [
75
+ MultiNLIMismatchConfig(
76
+ name="plain_text",
77
+ description="Plain text",
78
+ ),
79
+ ]
80
+
81
+ def _info(self):
82
+ return datasets.DatasetInfo(
83
+ description=_DESCRIPTION,
84
+ features=datasets.Features(
85
+ {
86
+ "premise": datasets.Value("string"),
87
+ "hypothesis": datasets.Value("string"),
88
+ "label": datasets.Value("string"),
89
+ }
90
+ ),
91
+ # No default supervised_keys (as we have to pass both premise
92
+ # and hypothesis as input).
93
+ supervised_keys=None,
94
+ homepage="https://www.nyu.edu/projects/bowman/multinli/",
95
+ citation=_CITATION,
96
+ )
97
+
98
+ def _vocab_text_gen(self, filepath):
99
+ for _, ex in self._generate_examples(filepath):
100
+ yield " ".join([ex["premise"], ex["hypothesis"], ex["label"]])
101
+
102
+ def _split_generators(self, dl_manager):
103
+
104
+ downloaded_dir = dl_manager.download_and_extract(ROOT_URL)
105
+ mnli_path = os.path.join(downloaded_dir, "multinli_1.0")
106
+ train_path = os.path.join(mnli_path, "multinli_1.0_train.txt")
107
+
108
+ validation_path = os.path.join(mnli_path, "multinli_1.0_dev_mismatched.txt")
109
+
110
+ return [
111
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": train_path}),
112
+ datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": validation_path}),
113
+ ]
114
+
115
+ def _generate_examples(self, filepath):
116
+ """Generate mnli mismatch examples.
117
+
118
+ Args:
119
+ filepath: a string
120
+
121
+ Yields:
122
+ dictionaries containing "premise", "hypothesis" and "label" strings
123
+ """
124
+ for idx, line in enumerate(open(filepath, "rb")):
125
+ if idx == 0:
126
+ continue
127
+ line = line.strip().decode("utf-8")
128
+ split_line = line.split("\t")
129
+ yield idx, {"premise": split_line[5], "hypothesis": split_line[6], "label": split_line[0]}