Datasets:
lm
commited on
Commit
•
8f95949
1
Parent(s):
ef137ea
fast loading
Browse files- README.md +50 -1
- ara/test.jsonl +0 -0
- cmn/test.jsonl +0 -0
- deu/test.jsonl +0 -0
- eng/test.jsonl +0 -0
- fra/test.jsonl +0 -0
- hin/test.jsonl +0 -0
- ita/test.jsonl +0 -0
- multi-hatecheck.py +0 -148
- nld/test.jsonl +0 -0
- pol/test.jsonl +0 -0
- por/test.jsonl +0 -0
- spa/test.jsonl +0 -0
- test/ara.jsonl.gz +3 -0
- test/cmn.jsonl.gz +3 -0
- test/deu.jsonl.gz +3 -0
- test/eng.jsonl.gz +3 -0
- test/fra.jsonl.gz +3 -0
- test/hin.jsonl.gz +3 -0
- test/ita.jsonl.gz +3 -0
- test/nld.jsonl.gz +3 -0
- test/pol.jsonl.gz +3 -0
- test/por.jsonl.gz +3 -0
- test/spa.jsonl.gz +3 -0
README.md
CHANGED
@@ -15,6 +15,55 @@ language:
|
|
15 |
- deu
|
16 |
size_categories:
|
17 |
- 10K<n<100K
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
---
|
19 |
|
20 |
#### Description
|
@@ -81,4 +130,4 @@ Make sure to credit the authors and cite relevant papers (see citation below) if
|
|
81 |
pages = "154--169",
|
82 |
abstract = "Hate speech detection models are typically evaluated on held-out test sets. However, this risks painting an incomplete and potentially misleading picture of model performance because of increasingly well-documented systematic gaps and biases in hate speech datasets. To enable more targeted diagnostic insights, recent research has thus introduced functional tests for hate speech detection models. However, these tests currently only exist for English-language content, which means that they cannot support the development of more effective models in other languages spoken by billions across the world. To help address this issue, we introduce Multilingual HateCheck (MHC), a suite of functional tests for multilingual hate speech detection models. MHC covers 34 functionalities across ten languages, which is more languages than any other hate speech dataset. To illustrate MHC{'}s utility, we train and test a high-performing multilingual hate speech detection model, and reveal critical model weaknesses for monolingual and cross-lingual applications.",
|
83 |
}
|
84 |
-
```
|
|
|
15 |
- deu
|
16 |
size_categories:
|
17 |
- 10K<n<100K
|
18 |
+
configs:
|
19 |
+
- config_name: default
|
20 |
+
data_files:
|
21 |
+
- path: test/*.jsonl.gz
|
22 |
+
split: test
|
23 |
+
- config_name: hin
|
24 |
+
data_files:
|
25 |
+
- path: multi-hatecheck/test/hin.jsonl.gz
|
26 |
+
split: test
|
27 |
+
- config_name: spa
|
28 |
+
data_files:
|
29 |
+
- path: multi-hatecheck/test/spa.jsonl.gz
|
30 |
+
split: test
|
31 |
+
- config_name: pol
|
32 |
+
data_files:
|
33 |
+
- path: multi-hatecheck/test/pol.jsonl.gz
|
34 |
+
split: test
|
35 |
+
- config_name: eng
|
36 |
+
data_files:
|
37 |
+
- path: multi-hatecheck/test/eng.jsonl.gz
|
38 |
+
split: test
|
39 |
+
- config_name: fra
|
40 |
+
data_files:
|
41 |
+
- path: multi-hatecheck/test/fra.jsonl.gz
|
42 |
+
split: test
|
43 |
+
- config_name: nld
|
44 |
+
data_files:
|
45 |
+
- path: multi-hatecheck/test/nld.jsonl.gz
|
46 |
+
split: test
|
47 |
+
- config_name: ita
|
48 |
+
data_files:
|
49 |
+
- path: multi-hatecheck/test/ita.jsonl.gz
|
50 |
+
split: test
|
51 |
+
- config_name: deu
|
52 |
+
data_files:
|
53 |
+
- path: multi-hatecheck/test/deu.jsonl.gz
|
54 |
+
split: test
|
55 |
+
- config_name: ara
|
56 |
+
data_files:
|
57 |
+
- path: multi-hatecheck/test/ara.jsonl.gz
|
58 |
+
split: test
|
59 |
+
- config_name: por
|
60 |
+
data_files:
|
61 |
+
- path: multi-hatecheck/test/por.jsonl.gz
|
62 |
+
split: test
|
63 |
+
- config_name: cmn
|
64 |
+
data_files:
|
65 |
+
- path: multi-hatecheck/test/cmn.jsonl.gz
|
66 |
+
split: test
|
67 |
---
|
68 |
|
69 |
#### Description
|
|
|
130 |
pages = "154--169",
|
131 |
abstract = "Hate speech detection models are typically evaluated on held-out test sets. However, this risks painting an incomplete and potentially misleading picture of model performance because of increasingly well-documented systematic gaps and biases in hate speech datasets. To enable more targeted diagnostic insights, recent research has thus introduced functional tests for hate speech detection models. However, these tests currently only exist for English-language content, which means that they cannot support the development of more effective models in other languages spoken by billions across the world. To help address this issue, we introduce Multilingual HateCheck (MHC), a suite of functional tests for multilingual hate speech detection models. MHC covers 34 functionalities across ten languages, which is more languages than any other hate speech dataset. To illustrate MHC{'}s utility, we train and test a high-performing multilingual hate speech detection model, and reveal critical model weaknesses for monolingual and cross-lingual applications.",
|
132 |
}
|
133 |
+
```
|
ara/test.jsonl
DELETED
The diff for this file is too large to render.
See raw diff
|
|
cmn/test.jsonl
DELETED
The diff for this file is too large to render.
See raw diff
|
|
deu/test.jsonl
DELETED
The diff for this file is too large to render.
See raw diff
|
|
eng/test.jsonl
DELETED
The diff for this file is too large to render.
See raw diff
|
|
fra/test.jsonl
DELETED
The diff for this file is too large to render.
See raw diff
|
|
hin/test.jsonl
DELETED
The diff for this file is too large to render.
See raw diff
|
|
ita/test.jsonl
DELETED
The diff for this file is too large to render.
See raw diff
|
|
multi-hatecheck.py
DELETED
@@ -1,148 +0,0 @@
|
|
1 |
-
import json
|
2 |
-
import datasets
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
_DESCRIPTION = """\
|
8 |
-
Combines multilingual HateCheck datasets (10 languages, including English), by Paul Roettger.
|
9 |
-
The original English dataset can be found under https://github.com/Paul/hatecheck.
|
10 |
-
Datasets for other languages are found at:
|
11 |
-
- https://github.com/Paul/hatecheck-arabic
|
12 |
-
- https://github.com/Paul/hatecheck-mandarin
|
13 |
-
- https://github.com/Paul/hatecheck-german
|
14 |
-
- https://github.com/Paul/hatecheck-french
|
15 |
-
- https://github.com/Paul/hatecheck-hindi
|
16 |
-
- https://github.com/Paul/hatecheck-italian
|
17 |
-
- https://github.com/Paul/hatecheck-dutch
|
18 |
-
- https://github.com/Paul/hatecheck-portuguese
|
19 |
-
- https://github.com/Paul/hatecheck-spanish
|
20 |
-
Make sure to credit the authors and cite relevant papers if you use these datasets.
|
21 |
-
"""
|
22 |
-
_CITATION = """\
|
23 |
-
@inproceedings{rottger-etal-2021-hatecheck,
|
24 |
-
title = "{H}ate{C}heck: Functional Tests for Hate Speech Detection Models",
|
25 |
-
author = {R{\"o}ttger, Paul and
|
26 |
-
Vidgen, Bertie and
|
27 |
-
Nguyen, Dong and
|
28 |
-
Waseem, Zeerak and
|
29 |
-
Margetts, Helen and
|
30 |
-
Pierrehumbert, Janet},
|
31 |
-
editor = "Zong, Chengqing and
|
32 |
-
Xia, Fei and
|
33 |
-
Li, Wenjie and
|
34 |
-
Navigli, Roberto",
|
35 |
-
booktitle = "Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)",
|
36 |
-
month = aug,
|
37 |
-
year = "2021",
|
38 |
-
address = "Online",
|
39 |
-
publisher = "Association for Computational Linguistics",
|
40 |
-
url = "https://aclanthology.org/2021.acl-long.4",
|
41 |
-
doi = "10.18653/v1/2021.acl-long.4",
|
42 |
-
pages = "41--58",
|
43 |
-
abstract = "Detecting online hate is a difficult task that even state-of-the-art models struggle with. Typically, hate speech detection models are evaluated by measuring their performance on held-out test data using metrics such as accuracy and F1 score. However, this approach makes it difficult to identify specific model weak points. It also risks overestimating generalisable model performance due to increasingly well-evidenced systematic gaps and biases in hate speech datasets. To enable more targeted diagnostic insights, we introduce HateCheck, a suite of functional tests for hate speech detection models. We specify 29 model functionalities motivated by a review of previous research and a series of interviews with civil society stakeholders. We craft test cases for each functionality and validate their quality through a structured annotation process. To illustrate HateCheck{'}s utility, we test near-state-of-the-art transformer models as well as two popular commercial models, revealing critical model weaknesses.",
|
44 |
-
}
|
45 |
-
|
46 |
-
@inproceedings{rottger-etal-2022-multilingual,
|
47 |
-
title = "Multilingual {H}ate{C}heck: Functional Tests for Multilingual Hate Speech Detection Models",
|
48 |
-
author = {R{\"o}ttger, Paul and
|
49 |
-
Seelawi, Haitham and
|
50 |
-
Nozza, Debora and
|
51 |
-
Talat, Zeerak and
|
52 |
-
Vidgen, Bertie},
|
53 |
-
editor = "Narang, Kanika and
|
54 |
-
Mostafazadeh Davani, Aida and
|
55 |
-
Mathias, Lambert and
|
56 |
-
Vidgen, Bertie and
|
57 |
-
Talat, Zeerak",
|
58 |
-
booktitle = "Proceedings of the Sixth Workshop on Online Abuse and Harms (WOAH)",
|
59 |
-
month = jul,
|
60 |
-
year = "2022",
|
61 |
-
address = "Seattle, Washington (Hybrid)",
|
62 |
-
publisher = "Association for Computational Linguistics",
|
63 |
-
url = "https://aclanthology.org/2022.woah-1.15",
|
64 |
-
doi = "10.18653/v1/2022.woah-1.15",
|
65 |
-
pages = "154--169",
|
66 |
-
abstract = "Hate speech detection models are typically evaluated on held-out test sets. However, this risks painting an incomplete and potentially misleading picture of model performance because of increasingly well-documented systematic gaps and biases in hate speech datasets. To enable more targeted diagnostic insights, recent research has thus introduced functional tests for hate speech detection models. However, these tests currently only exist for English-language content, which means that they cannot support the development of more effective models in other languages spoken by billions across the world. To help address this issue, we introduce Multilingual HateCheck (MHC), a suite of functional tests for multilingual hate speech detection models. MHC covers 34 functionalities across ten languages, which is more languages than any other hate speech dataset. To illustrate MHC{'}s utility, we train and test a high-performing multilingual hate speech detection model, and reveal critical model weaknesses for monolingual and cross-lingual applications.",
|
67 |
-
}
|
68 |
-
"""
|
69 |
-
|
70 |
-
_LICENSE = "Original datasets are released under cc-by-4.0."
|
71 |
-
|
72 |
-
|
73 |
-
_LANGUAGES = {"ara": "Arabic",
|
74 |
-
"cmn": "Mandarin",
|
75 |
-
"eng": "English",
|
76 |
-
"deu": "German",
|
77 |
-
"fra": "French",
|
78 |
-
"hin": "Hindi",
|
79 |
-
"ita": "Italian",
|
80 |
-
"nld": "Dutch",
|
81 |
-
"pol": "Polish",
|
82 |
-
"por": "Portuguese",
|
83 |
-
"spa": "Spanish"}
|
84 |
-
|
85 |
-
_ALL_LANGUAGES = "all_languages"
|
86 |
-
_DOWNLOAD_URL = "{lang}/{split}.jsonl"
|
87 |
-
_VERSION = "2.18.0"
|
88 |
-
|
89 |
-
|
90 |
-
class MultiHatecheckConfig(datasets.BuilderConfig):
|
91 |
-
"""BuilderConfig for HatecheckMulti"""
|
92 |
-
|
93 |
-
def __init__(self, languages=None, **kwargs):
|
94 |
-
super(MultiHatecheckConfig, self).__init__(version=datasets.Version(_VERSION, ""), **kwargs),
|
95 |
-
self.languages = languages
|
96 |
-
|
97 |
-
|
98 |
-
class MultiHatecheck(datasets.GeneratorBasedBuilder):
|
99 |
-
|
100 |
-
"""Multilingual Hatecheck Corpus, by Paul Roettger"""
|
101 |
-
|
102 |
-
BUILDER_CONFIGS = [
|
103 |
-
MultiHatecheckConfig(
|
104 |
-
name=_ALL_LANGUAGES,
|
105 |
-
languages=_LANGUAGES,
|
106 |
-
description="Hate speech detection dataset with binary (hateful vs non-hateful) labels. Includes 25+ distinct types of hate and challenging non-hate.",
|
107 |
-
)
|
108 |
-
] + [
|
109 |
-
MultiHatecheckConfig(
|
110 |
-
name=lang,
|
111 |
-
languages=[lang],
|
112 |
-
description=f"{_LANGUAGES[lang]} examples of hate speech, with binary (hateful vs non-hateful) labels. Includes 25+ distinct types of hate and challenging non-hate.",
|
113 |
-
)
|
114 |
-
for lang in _LANGUAGES
|
115 |
-
]
|
116 |
-
BUILDER_CONFIG_CLASS = MultiHatecheckConfig
|
117 |
-
DEFAULT_CONFIG_NAME = _ALL_LANGUAGES
|
118 |
-
|
119 |
-
def _info(self):
|
120 |
-
return datasets.DatasetInfo(
|
121 |
-
description=_DESCRIPTION,
|
122 |
-
features=datasets.Features(
|
123 |
-
{
|
124 |
-
"text": datasets.Value("string"),
|
125 |
-
"is_hateful": datasets.Value("string"),
|
126 |
-
"functionality": datasets.Value("string"),
|
127 |
-
}
|
128 |
-
),
|
129 |
-
supervised_keys=None,
|
130 |
-
license=_LICENSE,
|
131 |
-
citation=_CITATION,
|
132 |
-
)
|
133 |
-
|
134 |
-
def _split_generators(self, dl_manager):
|
135 |
-
test_urls = [_DOWNLOAD_URL.format(split="test", lang=lang) for lang in self.config.languages]
|
136 |
-
test_paths = dl_manager.download_and_extract(test_urls)
|
137 |
-
|
138 |
-
return [
|
139 |
-
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"file_paths": test_paths}),
|
140 |
-
]
|
141 |
-
|
142 |
-
def _generate_examples(self, file_paths):
|
143 |
-
row_count = 0
|
144 |
-
for file_path in file_paths:
|
145 |
-
with open(file_path, "r", encoding="utf-8") as f:
|
146 |
-
for line in f:
|
147 |
-
yield row_count, json.loads(line)
|
148 |
-
row_count += 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nld/test.jsonl
DELETED
The diff for this file is too large to render.
See raw diff
|
|
pol/test.jsonl
DELETED
The diff for this file is too large to render.
See raw diff
|
|
por/test.jsonl
DELETED
The diff for this file is too large to render.
See raw diff
|
|
spa/test.jsonl
DELETED
The diff for this file is too large to render.
See raw diff
|
|
test/ara.jsonl.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c4127f14a0ef09ecdae642ece021374d201aafbd32cf0322a408d06f0377c803
|
3 |
+
size 34084
|
test/cmn.jsonl.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d8b94e330b2d34a34649eb7cbb83bfd6eb18dde9e32c06a9263cd2ceebeafd3b
|
3 |
+
size 31171
|
test/deu.jsonl.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:97d79bcdf9b7619376277f5f08e0d88cedd8b1f9619a84004387664fa03d19ae
|
3 |
+
size 31764
|
test/eng.jsonl.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a010ccc28fa52e1559699734ee4fef7352c1238fb9af65b2489866d12420afd0
|
3 |
+
size 32158
|
test/fra.jsonl.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2160a864a5c1d690b6aec4ff53ae6fed352961edb532662885eb2985b38281c3
|
3 |
+
size 34431
|
test/hin.jsonl.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8dbbf57b1d15d0f1752ea2bd16e350ba23a8dccc91750a660254ade76af207ab
|
3 |
+
size 28928
|
test/ita.jsonl.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a1c592ccb362d4fb82d63cf43048b5288875dc18daa3aa82f8d9bc7bcb1e3ea9
|
3 |
+
size 31410
|
test/nld.jsonl.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a163ee8e653ba62a5d65e8e7a56879133e2cc49cf3cb952820345c6bc5d78dc8
|
3 |
+
size 31667
|
test/pol.jsonl.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2acdc0ade7187eed2a236ae030d41be0877d16dfb34b6ad95b00e3ce00874ac4
|
3 |
+
size 35639
|
test/por.jsonl.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c4481199b64d39c698b8874c9846c9eecaf2d7d035d1b4998dd06f634cedb4ea
|
3 |
+
size 31907
|
test/spa.jsonl.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bf749e41f48f63614cad5b88aeb0323bb2d800362c4a171ba6343109985b8d66
|
3 |
+
size 31592
|