Commit
·
44b2433
1
Parent(s):
5e511fb
Update parquet files
Browse files- README.md +0 -195
- Shaj/shaj-train.parquet +3 -0
- dataset_infos.json +0 -1
- full_albanian_dataset.csv +0 -0
- shaj.py +0 -127
README.md
DELETED
@@ -1,195 +0,0 @@
|
|
1 |
-
---
|
2 |
-
annotations_creators:
|
3 |
-
- expert-generated
|
4 |
-
language_creators:
|
5 |
-
- found
|
6 |
-
languages:
|
7 |
-
- sq
|
8 |
-
- sq-AL
|
9 |
-
licenses:
|
10 |
-
- cc-by-4.0
|
11 |
-
multilinguality:
|
12 |
-
- monolingual
|
13 |
-
size_categories:
|
14 |
-
- 10K<n<100K
|
15 |
-
source_datasets:
|
16 |
-
- original
|
17 |
-
task_categories:
|
18 |
-
- text_classification
|
19 |
-
task_ids:
|
20 |
-
- hate-speech-detection
|
21 |
-
- text-classification-other-hate-speech-detection
|
22 |
-
paperswithcode_id: shaj
|
23 |
-
pretty_name: SHAJ
|
24 |
-
extra_gated_prompt: "Warning: this repository contains harmful content (abusive language, hate speech)."
|
25 |
-
---
|
26 |
-
|
27 |
-
# Dataset Card for "shaj"
|
28 |
-
|
29 |
-
## Table of Contents
|
30 |
-
- [Dataset Description](#dataset-description)
|
31 |
-
- [Dataset Summary](#dataset-summary)
|
32 |
-
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
33 |
-
- [Languages](#languages)
|
34 |
-
- [Dataset Structure](#dataset-structure)
|
35 |
-
- [Data Instances](#data-instances)
|
36 |
-
- [Data Fields](#data-fields)
|
37 |
-
- [Data Splits](#data-splits)
|
38 |
-
- [Dataset Creation](#dataset-creation)
|
39 |
-
- [Curation Rationale](#curation-rationale)
|
40 |
-
- [Source Data](#source-data)
|
41 |
-
- [Annotations](#annotations)
|
42 |
-
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
43 |
-
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
44 |
-
- [Social Impact of Dataset](#social-impact-of-dataset)
|
45 |
-
- [Discussion of Biases](#discussion-of-biases)
|
46 |
-
- [Other Known Limitations](#other-known-limitations)
|
47 |
-
- [Additional Information](#additional-information)
|
48 |
-
- [Dataset Curators](#dataset-curators)
|
49 |
-
- [Licensing Information](#licensing-information)
|
50 |
-
- [Citation Information](#citation-information)
|
51 |
-
- [Contributions](#contributions)
|
52 |
-
|
53 |
-
## Dataset Description
|
54 |
-
|
55 |
-
- **Homepage:**
|
56 |
-
- **Repository:** [https://figshare.com/articles/dataset/SHAJ_Albanian_hate_speech_abusive_language/19333298/1](https://figshare.com/articles/dataset/SHAJ_Albanian_hate_speech_abusive_language/19333298/1)
|
57 |
-
- **Paper:** [https://arxiv.org/abs/2107.13592](https://arxiv.org/abs/2107.13592)
|
58 |
-
- **Point of Contact:** [Leon Derczynski](https://github.com/leondz)
|
59 |
-
- **Size of downloaded dataset files:** 769.21 KiB
|
60 |
-
- **Size of the generated dataset:** 1.06 MiB
|
61 |
-
- **Total amount of disk used:** 1.85 MiB
|
62 |
-
|
63 |
-
### Dataset Summary
|
64 |
-
|
65 |
-
This is an abusive/offensive language detection dataset for Albanian. The data is formatted
|
66 |
-
following the OffensEval convention, with three tasks:
|
67 |
-
|
68 |
-
* Subtask A: Offensive (OFF) or not (NOT)
|
69 |
-
* Subtask B: Untargeted (UNT) or targeted insult (TIN)
|
70 |
-
* Subtask C: Type of target: individual (IND), group (GRP), or other (OTH)
|
71 |
-
|
72 |
-
Notes on the above:
|
73 |
-
|
74 |
-
* The subtask A field should always be filled.
|
75 |
-
* The subtask B field should only be filled if there's "offensive" (OFF) in A.
|
76 |
-
* The subtask C field should only be filled if there's "targeted" (TIN) in B.
|
77 |
-
|
78 |
-
The dataset name is a backronym, also standing for "Spoken Hate in the Albanian Jargon"
|
79 |
-
|
80 |
-
See the paper [https://arxiv.org/abs/2107.13592](https://arxiv.org/abs/2107.13592) for full details.
|
81 |
-
|
82 |
-
### Supported Tasks and Leaderboards
|
83 |
-
|
84 |
-
* Task A leaderboard at [paperswithcode.com/sota/hate-speech-detection-on-shaj](https://paperswithcode.com/sota/hate-speech-detection-on-shaj)
|
85 |
-
|
86 |
-
### Languages
|
87 |
-
|
88 |
-
Albanian (`bcp47:sq-AL`)
|
89 |
-
|
90 |
-
## Dataset Structure
|
91 |
-
|
92 |
-
### Data Instances
|
93 |
-
|
94 |
-
#### shaj
|
95 |
-
|
96 |
-
- **Size of downloaded dataset files:** 769.21 KiB
|
97 |
-
- **Size of the generated dataset:** 1.06 MiB
|
98 |
-
- **Total amount of disk used:** 1.85 MiB
|
99 |
-
|
100 |
-
An example of 'train' looks as follows.
|
101 |
-
|
102 |
-
```
|
103 |
-
{
|
104 |
-
'id': '0',
|
105 |
-
'text': 'PLACEHOLDER TEXT',
|
106 |
-
'subtask_a': 1,
|
107 |
-
'subtask_b': 0,
|
108 |
-
'subtask_c': 0
|
109 |
-
}
|
110 |
-
```
|
111 |
-
|
112 |
-
|
113 |
-
### Data Fields
|
114 |
-
|
115 |
-
- `id`: a `string` feature.
|
116 |
-
- `text`: a `string`.
|
117 |
-
- `subtask_a`: whether or not the instance is offensive; `0: OFF, 1: NOT`
|
118 |
-
- `subtask_b`: whether an offensive instance is a targeted insult; `0: TIN, 1: UNT, 2: not applicable`
|
119 |
-
- `subtask_c`: what a targeted insult is aimed at; `0: IND, 1: GRP, 2: OTH, 3: not applicable`
|
120 |
-
|
121 |
-
|
122 |
-
### Data Splits
|
123 |
-
|
124 |
-
| name |train|
|
125 |
-
|---------|----:|
|
126 |
-
|shaj|11874 sentences|
|
127 |
-
|
128 |
-
## Dataset Creation
|
129 |
-
|
130 |
-
### Curation Rationale
|
131 |
-
|
132 |
-
Collecting data for enabling offensive speech detection in Albanian
|
133 |
-
|
134 |
-
### Source Data
|
135 |
-
|
136 |
-
#### Initial Data Collection and Normalization
|
137 |
-
|
138 |
-
The text is scraped from comments on popular Albanian YouTube and Instagram accounts.
|
139 |
-
An extended discussion is given in the paper in section 3.2.
|
140 |
-
|
141 |
-
#### Who are the source language producers?
|
142 |
-
|
143 |
-
People who comment on a selection of high-activity Albanian instagram and youtube profiles.
|
144 |
-
|
145 |
-
### Annotations
|
146 |
-
|
147 |
-
#### Annotation process
|
148 |
-
|
149 |
-
The annotation scheme was taken from OffensEval 2019 and applied by two native speaker authors of the paper as well as their friends and family.
|
150 |
-
|
151 |
-
#### Who are the annotators?
|
152 |
-
|
153 |
-
Albanian native speakers, male and female, aged 20-60.
|
154 |
-
|
155 |
-
### Personal and Sensitive Information
|
156 |
-
|
157 |
-
The data was public at the time of collection. No PII removal has been performed.
|
158 |
-
|
159 |
-
## Considerations for Using the Data
|
160 |
-
|
161 |
-
### Social Impact of Dataset
|
162 |
-
|
163 |
-
The data definitely contains abusive language.
|
164 |
-
|
165 |
-
### Discussion of Biases
|
166 |
-
|
167 |
-
|
168 |
-
### Other Known Limitations
|
169 |
-
|
170 |
-
|
171 |
-
## Additional Information
|
172 |
-
|
173 |
-
### Dataset Curators
|
174 |
-
|
175 |
-
The dataset is curated by the paper's authors.
|
176 |
-
|
177 |
-
### Licensing Information
|
178 |
-
|
179 |
-
The authors distribute this data under Creative Commons attribution license, CC-BY 4.0.
|
180 |
-
|
181 |
-
### Citation Information
|
182 |
-
|
183 |
-
```
|
184 |
-
@article{nurce2021detecting,
|
185 |
-
title={Detecting Abusive Albanian},
|
186 |
-
author={Nurce, Erida and Keci, Jorgel and Derczynski, Leon},
|
187 |
-
journal={arXiv preprint arXiv:2107.13592},
|
188 |
-
year={2021}
|
189 |
-
}
|
190 |
-
```
|
191 |
-
|
192 |
-
|
193 |
-
### Contributions
|
194 |
-
|
195 |
-
Author-added dataset [@leondz](https://github.com/leondz)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Shaj/shaj-train.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8dbef0f51d262ee4d83aec428a665e49707c82463d4b433e2d15c2b19978f700
|
3 |
+
size 611787
|
dataset_infos.json
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"Shaj": {"description": "This is an abusive/offensive language detection dataset for Albanian. The data is formatted\nfollowing the OffensEval convention, with three tasks:\n\n* Subtask A: Offensive (OFF) or not (NOT)\n* Subtask B: Untargeted (UNT) or targeted insult (TIN)\n* Subtask C: Type of target: individual (IND), group (GRP), or other (OTH)\n\n* The subtask A field should always be filled.\n* The subtask B field should only be filled if there's \"offensive\" (OFF) in A.\n* The subtask C field should only be filled if there's \"targeted\" (TIN) in B.\n\nThe dataset name is a backronym, also standing for \"Spoken Hate in the Albanian Jargon\"\n\nSee the paper [https://arxiv.org/abs/2107.13592](https://arxiv.org/abs/2107.13592) for full details.\n", "citation": "@article{nurce2021detecting,\n title={Detecting Abusive Albanian},\n author={Nurce, Erida and Keci, Jorgel and Derczynski, Leon},\n journal={arXiv preprint arXiv:2107.13592},\n year={2021}\n}\n", "homepage": "https://arxiv.org/abs/2107.13592", "license": "", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "text": {"dtype": "string", "id": null, "_type": "Value"}, "subtask_a": {"num_classes": 2, "names": ["OFF", "NOT"], "id": null, "_type": "ClassLabel"}, "subtask_b": {"num_classes": 3, "names": ["TIN", "UNT", ""], "id": null, "_type": "ClassLabel"}, "subtask_c": {"num_classes": 4, "names": ["IND", "GRP", "OTH", ""], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "shaj", "config_name": "Shaj", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1112341, "num_examples": 11874, "dataset_name": "shaj"}}, "download_checksums": {"full_albanian_dataset.csv": {"num_bytes": 787636, "checksum": "dfa908dff5bf8c6d0b5cc3a2ccb84b79cae623f46f3357d8633167f6dca34c1d"}}, "download_size": 787636, "post_processing_size": null, "dataset_size": 1112341, "size_in_bytes": 1899977}}
|
|
|
|
full_albanian_dataset.csv
DELETED
The diff for this file is too large to render.
See raw diff
|
|
shaj.py
DELETED
@@ -1,127 +0,0 @@
|
|
1 |
-
# coding=utf-8
|
2 |
-
# Copyright 2020 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 |
-
"""SHAJ: An abusive language dataset for Albanian"""
|
18 |
-
|
19 |
-
import csv
|
20 |
-
import os
|
21 |
-
|
22 |
-
import datasets
|
23 |
-
|
24 |
-
|
25 |
-
logger = datasets.logging.get_logger(__name__)
|
26 |
-
|
27 |
-
|
28 |
-
_CITATION = """\
|
29 |
-
@article{nurce2021detecting,
|
30 |
-
title={Detecting Abusive Albanian},
|
31 |
-
author={Nurce, Erida and Keci, Jorgel and Derczynski, Leon},
|
32 |
-
journal={arXiv preprint arXiv:2107.13592},
|
33 |
-
year={2021}
|
34 |
-
}
|
35 |
-
"""
|
36 |
-
|
37 |
-
_DESCRIPTION = """\
|
38 |
-
This is an abusive/offensive language detection dataset for Albanian. The data is formatted
|
39 |
-
following the OffensEval convention, with three tasks:
|
40 |
-
|
41 |
-
* Subtask A: Offensive (OFF) or not (NOT)
|
42 |
-
* Subtask B: Untargeted (UNT) or targeted insult (TIN)
|
43 |
-
* Subtask C: Type of target: individual (IND), group (GRP), or other (OTH)
|
44 |
-
|
45 |
-
* The subtask A field should always be filled.
|
46 |
-
* The subtask B field should only be filled if there's "offensive" (OFF) in A.
|
47 |
-
* The subtask C field should only be filled if there's "targeted" (TIN) in B.
|
48 |
-
|
49 |
-
The dataset name is a backronym, also standing for "Spoken Hate in the Albanian Jargon"
|
50 |
-
|
51 |
-
See the paper [https://arxiv.org/abs/2107.13592](https://arxiv.org/abs/2107.13592) for full details.
|
52 |
-
"""
|
53 |
-
|
54 |
-
_URL = "full_albanian_dataset.csv"
|
55 |
-
|
56 |
-
|
57 |
-
class ShajConfig(datasets.BuilderConfig):
|
58 |
-
"""BuilderConfig for Shaj"""
|
59 |
-
|
60 |
-
def __init__(self, **kwargs):
|
61 |
-
"""BuilderConfig Shaj.
|
62 |
-
|
63 |
-
Args:
|
64 |
-
**kwargs: keyword arguments forwarded to super.
|
65 |
-
"""
|
66 |
-
super(ShajConfig, self).__init__(**kwargs)
|
67 |
-
|
68 |
-
|
69 |
-
class Shaj(datasets.GeneratorBasedBuilder):
|
70 |
-
"""Shaj dataset."""
|
71 |
-
|
72 |
-
BUILDER_CONFIGS = [
|
73 |
-
ShajConfig(name="Shaj", version=datasets.Version("1.0.0"), description="Abusive language dataset in Albanian"),
|
74 |
-
]
|
75 |
-
|
76 |
-
def _info(self):
|
77 |
-
return datasets.DatasetInfo(
|
78 |
-
description=_DESCRIPTION,
|
79 |
-
features=datasets.Features(
|
80 |
-
{
|
81 |
-
"id": datasets.Value("string"),
|
82 |
-
"text": datasets.Value("string"),
|
83 |
-
"subtask_a": datasets.features.ClassLabel(
|
84 |
-
names=[
|
85 |
-
"OFF",
|
86 |
-
"NOT",
|
87 |
-
]
|
88 |
-
),
|
89 |
-
"subtask_b": datasets.features.ClassLabel(
|
90 |
-
names=[
|
91 |
-
"TIN",
|
92 |
-
"UNT",
|
93 |
-
"",
|
94 |
-
]
|
95 |
-
),
|
96 |
-
"subtask_c": datasets.features.ClassLabel(
|
97 |
-
names=[
|
98 |
-
"IND",
|
99 |
-
"GRP",
|
100 |
-
"OTH",
|
101 |
-
"",
|
102 |
-
]
|
103 |
-
),
|
104 |
-
}
|
105 |
-
),
|
106 |
-
supervised_keys=None,
|
107 |
-
homepage="https://arxiv.org/abs/2107.13592",
|
108 |
-
citation=_CITATION,
|
109 |
-
)
|
110 |
-
|
111 |
-
def _split_generators(self, dl_manager):
|
112 |
-
"""Returns SplitGenerators."""
|
113 |
-
downloaded_file = dl_manager.download_and_extract(_URL)
|
114 |
-
|
115 |
-
return [
|
116 |
-
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_file}),
|
117 |
-
]
|
118 |
-
|
119 |
-
def _generate_examples(self, filepath):
|
120 |
-
logger.info("⏳ Generating examples from = %s", filepath)
|
121 |
-
with open(filepath, encoding="utf-8") as f:
|
122 |
-
shaj_reader = csv.DictReader(f, fieldnames=('text','subtask_a','subtask_b','subtask_c'), delimiter=";", quotechar='"')
|
123 |
-
guid = 0
|
124 |
-
for instance in shaj_reader:
|
125 |
-
instance["id"] = str(guid)
|
126 |
-
yield guid, instance
|
127 |
-
guid += 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|