Datasets:
Tasks:
Text Classification
Sub-tasks:
hate-speech-detection
Languages:
Portuguese
Size:
1K<n<10K
Tags:
instagram
DOI:
Commit
·
34af89d
1
Parent(s):
cd14996
add specialists
Browse files
hatebr.py
CHANGED
|
@@ -47,9 +47,6 @@ class Boun(datasets.GeneratorBasedBuilder):
|
|
| 47 |
{
|
| 48 |
"instagram_comments": datasets.Value("string"),
|
| 49 |
"offensive_language": datasets.Value("bool"),
|
| 50 |
-
"specialist_1_offensive_language": datasets.Value("bool"),
|
| 51 |
-
"specialist_2_offensive_language": datasets.Value("bool"),
|
| 52 |
-
"specialist_3_offensive_language": datasets.Value("bool"),
|
| 53 |
"offensiveness_levels": datasets.Value("int32"),
|
| 54 |
"antisemitism": datasets.Value("bool"),
|
| 55 |
"apology_for_the_dictatorship": datasets.Value("bool"),
|
|
@@ -61,7 +58,10 @@ class Boun(datasets.GeneratorBasedBuilder):
|
|
| 61 |
"sexism": datasets.Value("bool"),
|
| 62 |
"xenophobia": datasets.Value("bool"),
|
| 63 |
"offensive_&_non-hate_speech": datasets.Value("bool"),
|
| 64 |
-
"non-offensive": datasets.Value("bool")
|
|
|
|
|
|
|
|
|
|
| 65 |
}),
|
| 66 |
supervised_keys=None,
|
| 67 |
homepage="https://github.com/franciellevargas/HateBR",
|
|
@@ -89,9 +89,9 @@ class Boun(datasets.GeneratorBasedBuilder):
|
|
| 89 |
for int_label in categories:
|
| 90 |
row[_INT_LABEL_KEY[int(int_label)]] = True
|
| 91 |
|
| 92 |
-
row["
|
| 93 |
-
row["
|
| 94 |
-
row["
|
| 95 |
return row
|
| 96 |
records = pd.read_csv(filepath).to_dict("records")
|
| 97 |
annotators = pd.read_csv(annotators).to_dict("records")
|
|
|
|
| 47 |
{
|
| 48 |
"instagram_comments": datasets.Value("string"),
|
| 49 |
"offensive_language": datasets.Value("bool"),
|
|
|
|
|
|
|
|
|
|
| 50 |
"offensiveness_levels": datasets.Value("int32"),
|
| 51 |
"antisemitism": datasets.Value("bool"),
|
| 52 |
"apology_for_the_dictatorship": datasets.Value("bool"),
|
|
|
|
| 58 |
"sexism": datasets.Value("bool"),
|
| 59 |
"xenophobia": datasets.Value("bool"),
|
| 60 |
"offensive_&_non-hate_speech": datasets.Value("bool"),
|
| 61 |
+
"non-offensive": datasets.Value("bool"),
|
| 62 |
+
"specialist_1_hate_speech": datasets.Value("bool"),
|
| 63 |
+
"specialist_2_hate_speech": datasets.Value("bool"),
|
| 64 |
+
"specialist_3_hate_speech": datasets.Value("bool")
|
| 65 |
}),
|
| 66 |
supervised_keys=None,
|
| 67 |
homepage="https://github.com/franciellevargas/HateBR",
|
|
|
|
| 89 |
for int_label in categories:
|
| 90 |
row[_INT_LABEL_KEY[int(int_label)]] = True
|
| 91 |
|
| 92 |
+
row["specialist_1_hate_speech"] = bool(int(annotator_row["Avaliador 1"]))
|
| 93 |
+
row["specialist_2_hate_speech"] = bool(int(annotator_row["Avaliador 2"]))
|
| 94 |
+
row["specialist_3_hate_speech"] = bool(int(annotator_row["Avaliador 3"]))
|
| 95 |
return row
|
| 96 |
records = pd.read_csv(filepath).to_dict("records")
|
| 97 |
annotators = pd.read_csv(annotators).to_dict("records")
|