Datasets:

Sub-tasks:
text-scoring
Languages:
English
Multilinguality:
monolingual
Size Categories:
1K<n<10K
Language Creators:
crowdsourced
Annotations Creators:
crowdsourced
Source Datasets:
original
Tags:
bias-evaluation
License:
system HF staff commited on
Commit
3b11446
0 Parent(s):

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.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
README.md ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - crowdsourced
4
+ language_creators:
5
+ - crowdsourced
6
+ languages:
7
+ - en
8
+ licenses:
9
+ - cc-by-sa-4-0
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 1K<n<10K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - text-scoring
18
+ task_ids:
19
+ - text-scoring-other-bias-evaluation
20
+ ---
21
+
22
+ # Dataset Card Creation Guide
23
+
24
+ ## Table of Contents
25
+ - [Dataset Description](#dataset-description)
26
+ - [Dataset Summary](#dataset-summary)
27
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
28
+ - [Languages](#languages)
29
+ - [Dataset Structure](#dataset-structure)
30
+ - [Data Instances](#data-instances)
31
+ - [Data Fields](#data-instances)
32
+ - [Data Splits](#data-instances)
33
+ - [Dataset Creation](#dataset-creation)
34
+ - [Curation Rationale](#curation-rationale)
35
+ - [Source Data](#source-data)
36
+ - [Annotations](#annotations)
37
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
38
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
39
+ - [Social Impact of Dataset](#social-impact-of-dataset)
40
+ - [Discussion of Biases](#discussion-of-biases)
41
+ - [Other Known Limitations](#other-known-limitations)
42
+ - [Additional Information](#additional-information)
43
+ - [Dataset Curators](#dataset-curators)
44
+ - [Licensing Information](#licensing-information)
45
+ - [Citation Information](#citation-information)
46
+
47
+ ## Dataset Description
48
+
49
+ - **Homepage:** [Add homepage URL here if available (unless it's a GitHub repository)]()
50
+ - **Repository:** [If the dataset is hosted on github or has a github homepage, add URL here]()
51
+ - **Paper:** [If the dataset was introduced by a paper or there was a paper written describing the dataset, add URL here (landing page for Arxiv paper preferred)]()
52
+ - **Leaderboard:** [If the dataset supports an active leaderboard, add link here]()
53
+ - **Point of Contact:** [If known, name and email of at least one person the reader can contact for questions about the dataset.]()
54
+
55
+ ### Dataset Summary
56
+
57
+ [More Information Needed]
58
+
59
+ ### Supported Tasks and Leaderboards
60
+
61
+ [More Information Needed]
62
+
63
+ ### Languages
64
+
65
+ [More Information Needed]
66
+
67
+ ## Dataset Structure
68
+
69
+ ### Data Instances
70
+
71
+ [More Information Needed]
72
+
73
+ ### Data Fields
74
+
75
+ [More Information Needed]
76
+
77
+ ### Data Splits
78
+
79
+ [More Information Needed]
80
+ ## Dataset Creation
81
+
82
+ ### Curation Rationale
83
+
84
+ [More Information Needed]
85
+
86
+ ### Source Data
87
+
88
+ [More Information Needed]
89
+
90
+ #### Initial Data Collection and Normalization
91
+
92
+ [More Information Needed]
93
+
94
+ #### Who are the source language producers?
95
+
96
+ [More Information Needed]
97
+
98
+ ### Annotations
99
+
100
+ [More Information Needed]
101
+
102
+ #### Annotation process
103
+
104
+ [More Information Needed]
105
+
106
+ #### Who are the annotators?
107
+
108
+ [More Information Needed]
109
+
110
+ ### Personal and Sensitive Information
111
+
112
+ [More Information Needed]
113
+
114
+ ## Considerations for Using the Data
115
+
116
+ ### Social Impact of Dataset
117
+
118
+ [More Information Needed]
119
+
120
+ ### Discussion of Biases
121
+
122
+ [More Information Needed]
123
+
124
+ ### Other Known Limitations
125
+
126
+ [More Information Needed]
127
+
128
+ ## Additional Information
129
+
130
+ ### Dataset Curators
131
+
132
+ [More Information Needed]
133
+
134
+ ### Licensing Information
135
+
136
+ [More Information Needed]
137
+
138
+ ### Citation Information
139
+
140
+ [More Information Needed]
crows_pairs.py ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # coding=utf-8
2
+ # Copyright 2020 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
+ """CrowS-Pairs: A Challenge Dataset for Measuring Social Biases in Masked Language Models"""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import csv
20
+ import json
21
+
22
+ import datasets
23
+
24
+
25
+ _CITATION = """\
26
+ @inproceedings{nangia2020crows,
27
+ title = "{CrowS-Pairs: A Challenge Dataset for Measuring Social Biases in Masked Language Models}",
28
+ author = "Nangia, Nikita and
29
+ Vania, Clara and
30
+ Bhalerao, Rasika and
31
+ Bowman, Samuel R.",
32
+ booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing",
33
+ month = nov,
34
+ year = "2020",
35
+ address = "Online",
36
+ publisher = "Association for Computational Linguistics"
37
+ }
38
+ """
39
+
40
+ _DESCRIPTION = """\
41
+ CrowS-Pairs, a challenge dataset for measuring the degree to which U.S. stereotypical biases present in the masked language models (MLMs).
42
+ """
43
+
44
+
45
+ _URL = "https://raw.githubusercontent.com/nyu-mll/crows-pairs/master/data/crows_pairs_anonymized.csv"
46
+
47
+ _BIAS_TYPES = [
48
+ "race-color",
49
+ "socioeconomic",
50
+ "gender",
51
+ "disability",
52
+ "nationality",
53
+ "sexual-orientation",
54
+ "physical-appearance",
55
+ "religion",
56
+ "age",
57
+ ]
58
+
59
+ _STEREOTYPICAL_DIRECTIONS = ["stereo", "antistereo"]
60
+
61
+
62
+ class CrowsPairs(datasets.GeneratorBasedBuilder):
63
+ "CrowS-Pairs: A Challenge Dataset for Measuring Social Biases in Masked Language Models"
64
+
65
+ VERSION = datasets.Version("1.0.0")
66
+ BUILDER_CONFIGS = [
67
+ datasets.BuilderConfig(
68
+ name="crows_pairs",
69
+ version=datasets.Version("1.0.0", ""),
70
+ ),
71
+ ]
72
+
73
+ def _info(self):
74
+ return datasets.DatasetInfo(
75
+ description=_DESCRIPTION,
76
+ features=datasets.Features(
77
+ {
78
+ "id": datasets.Value("int32"),
79
+ "sent_more": datasets.Value("string"),
80
+ "sent_less": datasets.Value("string"),
81
+ "stereo_antistereo": datasets.ClassLabel(names=_STEREOTYPICAL_DIRECTIONS),
82
+ "bias_type": datasets.ClassLabel(names=_BIAS_TYPES),
83
+ "annotations": datasets.Sequence(datasets.Sequence(datasets.ClassLabel(names=_BIAS_TYPES))),
84
+ "anon_writer": datasets.Value("string"),
85
+ "anon_annotators": datasets.Sequence(datasets.Value("string")),
86
+ },
87
+ ),
88
+ supervised_keys=None,
89
+ citation=_CITATION,
90
+ homepage="https://github.com/nyu-mll/crows-pairs",
91
+ )
92
+
93
+ def _split_generators(self, dl_manager):
94
+ filepath = dl_manager.download(_URL)
95
+ return [
96
+ datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": filepath}),
97
+ ]
98
+
99
+ def _generate_examples(self, filepath):
100
+ with open(filepath, encoding="utf-8") as f:
101
+ rows = csv.DictReader(f)
102
+ for i, row in enumerate(rows):
103
+ row["annotations"] = json.loads(row["annotations"].replace("'", '"'))
104
+ row["anon_annotators"] = json.loads(row["anon_annotators"].replace("'", '"'))
105
+ row["id"] = int(row.pop(""))
106
+ yield i, row
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"crows_pairs": {"description": "CrowS-Pairs, a challenge dataset for measuring the degree to which U.S. stereotypical biases present in the masked language models (MLMs).\n", "citation": "@inproceedings{nangia2020crows,\n title = \"{CrowS-Pairs: A Challenge Dataset for Measuring Social Biases in Masked Language Models}\",\n author = \"Nangia, Nikita and\n Vania, Clara and\n Bhalerao, Rasika and\n Bowman, Samuel R.\",\n booktitle = \"Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing\",\n month = nov,\n year = \"2020\",\n address = \"Online\",\n publisher = \"Association for Computational Linguistics\"\n}\n", "homepage": "https://github.com/nyu-mll/crows-pairs", "license": "", "features": {"id": {"dtype": "int32", "id": null, "_type": "Value"}, "sent_more": {"dtype": "string", "id": null, "_type": "Value"}, "sent_less": {"dtype": "string", "id": null, "_type": "Value"}, "stereo_antistereo": {"num_classes": 2, "names": ["stereo", "antistereo"], "names_file": null, "id": null, "_type": "ClassLabel"}, "bias_type": {"num_classes": 9, "names": ["race-color", "socioeconomic", "gender", "disability", "nationality", "sexual-orientation", "physical-appearance", "religion", "age"], "names_file": null, "id": null, "_type": "ClassLabel"}, "annotations": {"feature": {"feature": {"num_classes": 9, "names": ["race-color", "socioeconomic", "gender", "disability", "nationality", "sexual-orientation", "physical-appearance", "religion", "age"], "names_file": null, "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}, "length": -1, "id": null, "_type": "Sequence"}, "anon_writer": {"dtype": "string", "id": null, "_type": "Value"}, "anon_annotators": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "crows_pairs", "config_name": "crows_pairs", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"test": {"name": "test", "num_bytes": 419976, "num_examples": 1508, "dataset_name": "crows_pairs"}}, "download_checksums": {"https://raw.githubusercontent.com/nyu-mll/crows-pairs/master/data/crows_pairs_anonymized.csv": {"num_bytes": 437764, "checksum": "dfb36986ce0502abbaf7055b9176da3d08d48e07df1251991b5dfbcbceab9d0c"}}, "download_size": 437764, "post_processing_size": null, "dataset_size": 419976, "size_in_bytes": 857740}}
dummy/crows_pairs/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ce7f063e972b4d0a4f7644d1e5c210b3d36b15a42a98077049a4696e6d233e72
3
+ size 757