system HF staff commited on
Commit
00ea102
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": "Composed by 30 students from one of the author's undergraduate classes. These\nsentence pairs cover topics ranging from real events (e.g., Iran's plan to\nattack the Saudi ambassador to the U.S.) to events/characters in movies (e.g.,\nBatman) and purely imaginary situations, largely reflecting the pop culture as\nperceived by the American kids born in the early 90s. Each annotated example\nspans four lines: the first line contains the sentence, the second line contains\nthe target pronoun, the third line contains the two candidate antecedents, and\nthe fourth line contains the correct antecedent. If the target pronoun appears\nmore than once in the sentence, its first occurrence is the one to be resolved.\n", "citation": "@inproceedings{rahman2012resolving,\n title={Resolving complex cases of definite pronouns: the winograd schema challenge},\n author={Rahman, Altaf and Ng, Vincent},\n booktitle={Proceedings of the 2012 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning},\n pages={777--789},\n year={2012},\n organization={Association for Computational Linguistics}\n}", "homepage": "http://www.hlt.utdallas.edu/~vince/data/emnlp12/", "license": "", "features": {"sentence": {"dtype": "string", "id": null, "_type": "Value"}, "pronoun": {"dtype": "string", "id": null, "_type": "Value"}, "candidates": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": 2, "id": null, "_type": "Sequence"}, "label": {"num_classes": 2, "names": ["0", "1"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "supervised_keys": {"input": "sentence", "output": "label"}, "builder_name": "definite_pronoun_resolution", "config_name": "plain_text", "version": {"version_str": "1.0.0", "description": "", "datasets_version_to_prepare": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"test": {"name": "test", "num_bytes": 72187, "num_examples": 564, "dataset_name": "definite_pronoun_resolution"}, "train": {"name": "train", "num_bytes": 172672, "num_examples": 1322, "dataset_name": "definite_pronoun_resolution"}}, "download_checksums": {"http://www.hlt.utdallas.edu/~vince/data/emnlp12/train.c.txt": {"num_bytes": 160409, "checksum": "bc0a54b3ca1009d8d5b2ca5a221086aee2b0fc5cd03b22b9dfa9cdf44c629cec"}, "http://www.hlt.utdallas.edu/~vince/data/emnlp12/test.c.txt": {"num_bytes": 67044, "checksum": "cf1cf025e1d59a5b363e6dcfbd5a13aae8a9830831ac16fd7f865aca7a1559d8"}}, "download_size": 227453, "dataset_size": 244859, "size_in_bytes": 472312}}
definite_pronoun_resolution.py ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Definite Pronoun Resolution Dataset."""
18
+
19
+ from __future__ import absolute_import, division, print_function
20
+
21
+ import datasets
22
+
23
+
24
+ _CITATION = """\
25
+ @inproceedings{rahman2012resolving,
26
+ title={Resolving complex cases of definite pronouns: the winograd schema challenge},
27
+ author={Rahman, Altaf and Ng, Vincent},
28
+ booktitle={Proceedings of the 2012 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning},
29
+ pages={777--789},
30
+ year={2012},
31
+ organization={Association for Computational Linguistics}
32
+ }"""
33
+
34
+ _DESCRIPTION = """\
35
+ Composed by 30 students from one of the author's undergraduate classes. These
36
+ sentence pairs cover topics ranging from real events (e.g., Iran's plan to
37
+ attack the Saudi ambassador to the U.S.) to events/characters in movies (e.g.,
38
+ Batman) and purely imaginary situations, largely reflecting the pop culture as
39
+ perceived by the American kids born in the early 90s. Each annotated example
40
+ spans four lines: the first line contains the sentence, the second line contains
41
+ the target pronoun, the third line contains the two candidate antecedents, and
42
+ the fourth line contains the correct antecedent. If the target pronoun appears
43
+ more than once in the sentence, its first occurrence is the one to be resolved.
44
+ """
45
+
46
+ _DATA_URL_PATTERN = "http://www.hlt.utdallas.edu/~vince/data/emnlp12/{}.c.txt"
47
+
48
+
49
+ class DefinitePronounResolution(datasets.GeneratorBasedBuilder):
50
+ """The Definite Pronoun Resolution Dataset."""
51
+
52
+ BUILDER_CONFIGS = [
53
+ datasets.BuilderConfig(
54
+ name="plain_text",
55
+ version=datasets.Version("1.0.0", ""),
56
+ description="Plain text import of the Definite Pronoun Resolution Dataset.", # pylint: disable=line-too-long
57
+ )
58
+ ]
59
+
60
+ def _info(self):
61
+ return datasets.DatasetInfo(
62
+ description=_DESCRIPTION,
63
+ features=datasets.Features(
64
+ {
65
+ "sentence": datasets.Value("string"),
66
+ "pronoun": datasets.Value("string"),
67
+ "candidates": datasets.features.Sequence(datasets.Value("string"), length=2),
68
+ "label": datasets.features.ClassLabel(num_classes=2),
69
+ }
70
+ ),
71
+ supervised_keys=("sentence", "label"),
72
+ homepage="http://www.hlt.utdallas.edu/~vince/data/emnlp12/",
73
+ citation=_CITATION,
74
+ )
75
+
76
+ def _split_generators(self, dl_manager):
77
+ files = dl_manager.download_and_extract(
78
+ {
79
+ "train": _DATA_URL_PATTERN.format("train"),
80
+ "test": _DATA_URL_PATTERN.format("test"),
81
+ }
82
+ )
83
+ return [
84
+ datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": files["test"]}),
85
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": files["train"]}),
86
+ ]
87
+
88
+ def _generate_examples(self, filepath):
89
+ with open(filepath, encoding="utf-8") as f:
90
+ line_num = -1
91
+ while True:
92
+ line_num += 1
93
+ sentence = f.readline().strip()
94
+ pronoun = f.readline().strip()
95
+ candidates = [c.strip() for c in f.readline().strip().split(",")]
96
+ correct = f.readline().strip()
97
+ f.readline()
98
+ if not sentence:
99
+ break
100
+ yield line_num, {
101
+ "sentence": sentence,
102
+ "pronoun": pronoun,
103
+ "candidates": candidates,
104
+ "label": candidates.index(correct),
105
+ }
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:e7fac313481f024c2f5f7d4ae3c4993c197786264bf783e0b65be7c9ccb17a74
3
+ size 850