Datasets:

Languages:
English
Multilinguality:
monolingual
Size Categories:
1K<n<10K
Language Creators:
found
Annotations Creators:
crowdsourced
Source Datasets:
original
ArXiv:
Tags:
License:
system HF staff commited on
Commit
52c1b1e
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

Files changed (4) hide show
  1. .gitattributes +27 -0
  2. dataset_infos.json +1 -0
  3. dummy/0.1.0/dummy_data.zip +3 -0
  4. gap.py +119 -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": "\nGAP is a gender-balanced dataset containing 8,908 coreference-labeled pairs of \n(ambiguous pronoun, antecedent name), sampled from Wikipedia and released by \nGoogle AI Language for the evaluation of coreference resolution in practical \napplications.\n", "citation": "\n@article{DBLP:journals/corr/abs-1810-05201,\n author = {Kellie Webster and\n Marta Recasens and\n Vera Axelrod and\n Jason Baldridge},\n title = {Mind the {GAP:} {A} Balanced Corpus of Gendered Ambiguous Pronouns},\n journal = {CoRR},\n volume = {abs/1810.05201},\n year = {2018},\n url = {http://arxiv.org/abs/1810.05201},\n archivePrefix = {arXiv},\n eprint = {1810.05201},\n timestamp = {Tue, 30 Oct 2018 20:39:56 +0100},\n biburl = {https://dblp.org/rec/bib/journals/corr/abs-1810-05201},\n bibsource = {dblp computer science bibliography, https://dblp.org}\n}\n", "homepage": "https://github.com/google-research-datasets/gap-coreference", "license": "", "features": {"ID": {"dtype": "string", "id": null, "_type": "Value"}, "Text": {"dtype": "string", "id": null, "_type": "Value"}, "Pronoun": {"dtype": "string", "id": null, "_type": "Value"}, "Pronoun-offset": {"dtype": "int32", "id": null, "_type": "Value"}, "A": {"dtype": "string", "id": null, "_type": "Value"}, "A-offset": {"dtype": "int32", "id": null, "_type": "Value"}, "A-coref": {"dtype": "bool", "id": null, "_type": "Value"}, "B": {"dtype": "string", "id": null, "_type": "Value"}, "B-offset": {"dtype": "int32", "id": null, "_type": "Value"}, "B-coref": {"dtype": "bool", "id": null, "_type": "Value"}, "URL": {"dtype": "string", "id": null, "_type": "Value"}}, "supervised_keys": null, "builder_name": "gap", "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": 1093462, "num_examples": 2000, "dataset_name": "gap"}, "train": {"name": "train", "num_bytes": 1098623, "num_examples": 2000, "dataset_name": "gap"}, "validation": {"name": "validation", "num_bytes": 249013, "num_examples": 454, "dataset_name": "gap"}}, "download_checksums": {"https://raw.githubusercontent.com/google-research-datasets/gap-coreference/master/gap-development.tsv": {"num_bytes": 1080993, "checksum": "b9a01434fcf58d8c2f9bc762480c27e58ce466cf1ffe8b09cfecbc7a20d2d634"}, "https://raw.githubusercontent.com/google-research-datasets/gap-coreference/master/gap-validation.tsv": {"num_bytes": 245089, "checksum": "2d784f66b390404f554704b9aef6dcde8845e79dda9886b8391cf7e9a24fdb98"}, "https://raw.githubusercontent.com/google-research-datasets/gap-coreference/master/gap-test.tsv": {"num_bytes": 1075889, "checksum": "1c35e36d5b14f6313ec3f6cd67b275de282595dd59e59390e00cfff9897a6819"}}, "download_size": 2401971, "dataset_size": 2441098, "size_in_bytes": 4843069}}
dummy/0.1.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:df74b24abe62f550c68c404b3ce7064ad0c4b6aa2d2bd9df3cef0e6089d58fef
3
+ size 1415
gap.py ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """GAP is a gender-balanced text data set."""
18
+
19
+ from __future__ import absolute_import, division, print_function
20
+
21
+ import csv
22
+
23
+ import datasets
24
+
25
+
26
+ _CITATION = """
27
+ @article{DBLP:journals/corr/abs-1810-05201,
28
+ author = {Kellie Webster and
29
+ Marta Recasens and
30
+ Vera Axelrod and
31
+ Jason Baldridge},
32
+ title = {Mind the {GAP:} {A} Balanced Corpus of Gendered Ambiguous Pronouns},
33
+ journal = {CoRR},
34
+ volume = {abs/1810.05201},
35
+ year = {2018},
36
+ url = {http://arxiv.org/abs/1810.05201},
37
+ archivePrefix = {arXiv},
38
+ eprint = {1810.05201},
39
+ timestamp = {Tue, 30 Oct 2018 20:39:56 +0100},
40
+ biburl = {https://dblp.org/rec/bib/journals/corr/abs-1810-05201},
41
+ bibsource = {dblp computer science bibliography, https://dblp.org}
42
+ }
43
+ """
44
+
45
+ _DESCRIPTION = """
46
+ GAP is a gender-balanced dataset containing 8,908 coreference-labeled pairs of
47
+ (ambiguous pronoun, antecedent name), sampled from Wikipedia and released by
48
+ Google AI Language for the evaluation of coreference resolution in practical
49
+ applications.
50
+ """
51
+
52
+ _TRAINURL = "https://raw.githubusercontent.com/google-research-datasets/gap-coreference/master/gap-development.tsv"
53
+ _VALIDATIONURL = "https://raw.githubusercontent.com/google-research-datasets/gap-coreference/master/gap-validation.tsv"
54
+ _TESTURL = "https://raw.githubusercontent.com/google-research-datasets/gap-coreference/master/gap-test.tsv"
55
+
56
+
57
+ class Gap(datasets.GeneratorBasedBuilder):
58
+ """GAP is a gender-balanced dataset.
59
+
60
+ It contains 8,908 coreference-labeled pairs
61
+ of (ambiguous pronoun, antecedent name), sampled from Wikipedia.
62
+ """
63
+
64
+ VERSION = datasets.Version("0.1.0")
65
+
66
+ def _info(self):
67
+ return datasets.DatasetInfo(
68
+ description=_DESCRIPTION,
69
+ features=datasets.Features(
70
+ {
71
+ "ID": datasets.Value("string"),
72
+ "Text": datasets.Value("string"),
73
+ "Pronoun": datasets.Value("string"),
74
+ "Pronoun-offset": datasets.Value("int32"),
75
+ "A": datasets.Value("string"),
76
+ "A-offset": datasets.Value("int32"),
77
+ "A-coref": datasets.Value("bool"),
78
+ "B": datasets.Value("string"),
79
+ "B-offset": datasets.Value("int32"),
80
+ "B-coref": datasets.Value("bool"),
81
+ "URL": datasets.Value("string"),
82
+ }
83
+ ),
84
+ supervised_keys=None,
85
+ homepage="https://github.com/google-research-datasets/gap-coreference",
86
+ citation=_CITATION,
87
+ )
88
+
89
+ def _split_generators(self, dl_manager):
90
+ """Returns SplitGenerators."""
91
+ directory = dl_manager.download_and_extract(
92
+ {"train": _TRAINURL, "validation": _VALIDATIONURL, "test": _TESTURL}
93
+ )
94
+ return [
95
+ datasets.SplitGenerator(
96
+ name=datasets.Split.TRAIN,
97
+ gen_kwargs={"filepath": directory["train"]},
98
+ ),
99
+ datasets.SplitGenerator(
100
+ name=datasets.Split.VALIDATION,
101
+ gen_kwargs={"filepath": directory["validation"]},
102
+ ),
103
+ datasets.SplitGenerator(
104
+ name=datasets.Split.TEST,
105
+ gen_kwargs={"filepath": directory["test"]},
106
+ ),
107
+ ]
108
+
109
+ def _generate_examples(self, filepath):
110
+ """Yields examples."""
111
+ with open(filepath, encoding="utf-8") as tsvfile:
112
+ reader = csv.DictReader(tsvfile, dialect="excel-tab")
113
+ for i, row in enumerate(reader):
114
+ row["A-coref"] = bool(row["A-coref"])
115
+ row["B-coref"] = bool(row["B-coref"])
116
+ row["A-offset"] = int(row["A-offset"])
117
+ row["B-offset"] = int(row["B-offset"])
118
+ row["Pronoun-offset"] = int(row["Pronoun-offset"])
119
+ yield i, row