Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
parquet
Size:
10K - 100K
Tags:
offensive-language
License:
Commit
•
4739cb6
1
Parent(s):
1b118fb
Convert dataset to Parquet (#3)
Browse files- Convert dataset to Parquet (2e56c88370eb40e9ceeb474be0b22e70d29725b0)
- Add 'malayalam' config data files (37fcf2dd2ba6eacd8ebc03c105fa82a8e306eecd)
- Add 'kannada' config data files (11a5b70ff9ccbe5687a0740b4c8b6efc12b50b16)
- Delete loading script (a941d7012104a80312a4514fe1ad9449c7e32a0c)
- README.md +43 -24
- kannada/train-00000-of-00001.parquet +3 -0
- kannada/validation-00000-of-00001.parquet +3 -0
- malayalam/train-00000-of-00001.parquet +3 -0
- malayalam/validation-00000-of-00001.parquet +3 -0
- offenseval_dravidian.py +0 -196
- tamil/train-00000-of-00001.parquet +3 -0
- tamil/validation-00000-of-00001.parquet +3 -0
README.md
CHANGED
@@ -21,10 +21,14 @@ task_categories:
|
|
21 |
- text-classification
|
22 |
task_ids: []
|
23 |
pretty_name: Offenseval Dravidian
|
|
|
|
|
|
|
|
|
24 |
tags:
|
25 |
- offensive-language
|
26 |
dataset_info:
|
27 |
-
- config_name:
|
28 |
features:
|
29 |
- name: text
|
30 |
dtype: string
|
@@ -37,16 +41,16 @@ dataset_info:
|
|
37 |
'2': Offensive_Targeted_Insult_Individual
|
38 |
'3': Offensive_Targeted_Insult_Group
|
39 |
'4': Offensive_Targeted_Insult_Other
|
40 |
-
'5': not-
|
41 |
splits:
|
42 |
- name: train
|
43 |
-
num_bytes:
|
44 |
-
num_examples:
|
45 |
- name: validation
|
46 |
-
num_bytes:
|
47 |
-
num_examples:
|
48 |
-
download_size:
|
49 |
-
dataset_size:
|
50 |
- config_name: malayalam
|
51 |
features:
|
52 |
- name: text
|
@@ -63,14 +67,14 @@ dataset_info:
|
|
63 |
'5': not-malayalam
|
64 |
splits:
|
65 |
- name: train
|
66 |
-
num_bytes:
|
67 |
num_examples: 16010
|
68 |
- name: validation
|
69 |
-
num_bytes:
|
70 |
num_examples: 1999
|
71 |
-
download_size:
|
72 |
-
dataset_size:
|
73 |
-
- config_name:
|
74 |
features:
|
75 |
- name: text
|
76 |
dtype: string
|
@@ -83,20 +87,35 @@ dataset_info:
|
|
83 |
'2': Offensive_Targeted_Insult_Individual
|
84 |
'3': Offensive_Targeted_Insult_Group
|
85 |
'4': Offensive_Targeted_Insult_Other
|
86 |
-
'5': not-
|
87 |
splits:
|
88 |
- name: train
|
89 |
-
num_bytes:
|
90 |
-
num_examples:
|
91 |
- name: validation
|
92 |
-
num_bytes:
|
93 |
-
num_examples:
|
94 |
-
download_size:
|
95 |
-
dataset_size:
|
96 |
-
|
97 |
-
- kannada
|
98 |
-
|
99 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
---
|
101 |
|
102 |
# Dataset Card for Offenseval Dravidian
|
|
|
21 |
- text-classification
|
22 |
task_ids: []
|
23 |
pretty_name: Offenseval Dravidian
|
24 |
+
config_names:
|
25 |
+
- kannada
|
26 |
+
- malayalam
|
27 |
+
- tamil
|
28 |
tags:
|
29 |
- offensive-language
|
30 |
dataset_info:
|
31 |
+
- config_name: kannada
|
32 |
features:
|
33 |
- name: text
|
34 |
dtype: string
|
|
|
41 |
'2': Offensive_Targeted_Insult_Individual
|
42 |
'3': Offensive_Targeted_Insult_Group
|
43 |
'4': Offensive_Targeted_Insult_Other
|
44 |
+
'5': not-Kannada
|
45 |
splits:
|
46 |
- name: train
|
47 |
+
num_bytes: 567115
|
48 |
+
num_examples: 6217
|
49 |
- name: validation
|
50 |
+
num_bytes: 70143
|
51 |
+
num_examples: 777
|
52 |
+
download_size: 364110
|
53 |
+
dataset_size: 637258
|
54 |
- config_name: malayalam
|
55 |
features:
|
56 |
- name: text
|
|
|
67 |
'5': not-malayalam
|
68 |
splits:
|
69 |
- name: train
|
70 |
+
num_bytes: 1944849
|
71 |
num_examples: 16010
|
72 |
- name: validation
|
73 |
+
num_bytes: 249360
|
74 |
num_examples: 1999
|
75 |
+
download_size: 1207152
|
76 |
+
dataset_size: 2194209
|
77 |
+
- config_name: tamil
|
78 |
features:
|
79 |
- name: text
|
80 |
dtype: string
|
|
|
87 |
'2': Offensive_Targeted_Insult_Individual
|
88 |
'3': Offensive_Targeted_Insult_Group
|
89 |
'4': Offensive_Targeted_Insult_Other
|
90 |
+
'5': not-Tamil
|
91 |
splits:
|
92 |
- name: train
|
93 |
+
num_bytes: 4214785
|
94 |
+
num_examples: 35139
|
95 |
- name: validation
|
96 |
+
num_bytes: 526104
|
97 |
+
num_examples: 4388
|
98 |
+
download_size: 2690062
|
99 |
+
dataset_size: 4740889
|
100 |
+
configs:
|
101 |
+
- config_name: kannada
|
102 |
+
data_files:
|
103 |
+
- split: train
|
104 |
+
path: kannada/train-*
|
105 |
+
- split: validation
|
106 |
+
path: kannada/validation-*
|
107 |
+
- config_name: malayalam
|
108 |
+
data_files:
|
109 |
+
- split: train
|
110 |
+
path: malayalam/train-*
|
111 |
+
- split: validation
|
112 |
+
path: malayalam/validation-*
|
113 |
+
- config_name: tamil
|
114 |
+
data_files:
|
115 |
+
- split: train
|
116 |
+
path: tamil/train-*
|
117 |
+
- split: validation
|
118 |
+
path: tamil/validation-*
|
119 |
---
|
120 |
|
121 |
# Dataset Card for Offenseval Dravidian
|
kannada/train-00000-of-00001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ac36bb290ac094724724e76959b6c66c3c1199ea6ea1b87d86902d0428af1ede
|
3 |
+
size 323736
|
kannada/validation-00000-of-00001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1cb7fddc584769e479666c5e7987229bcc6cf2ffd39bfd834975758b8fce3188
|
3 |
+
size 40374
|
malayalam/train-00000-of-00001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1a81cfb94cfca554ce501093e49f0e315bd311fb6b8430b1ee788f59ec692d8d
|
3 |
+
size 1071267
|
malayalam/validation-00000-of-00001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2b2b2d89b92f1b42f762d23d6d5f804031bc96e9cda3cead962c040b938df1aa
|
3 |
+
size 135885
|
offenseval_dravidian.py
DELETED
@@ -1,196 +0,0 @@
|
|
1 |
-
# coding=utf-8
|
2 |
-
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
|
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 |
-
"""Offensive language identification in dravidian lanaguages dataset"""
|
16 |
-
|
17 |
-
|
18 |
-
import csv
|
19 |
-
|
20 |
-
import datasets
|
21 |
-
|
22 |
-
|
23 |
-
_HOMEPAGE = "https://competitions.codalab.org/competitions/27654#learn_the_details"
|
24 |
-
|
25 |
-
|
26 |
-
_CITATION = """\
|
27 |
-
@inproceedings{dravidianoffensive-eacl,
|
28 |
-
title={Findings of the Shared Task on {O}ffensive {L}anguage {I}dentification in {T}amil, {M}alayalam, and {K}annada},
|
29 |
-
author={Chakravarthi, Bharathi Raja and
|
30 |
-
Priyadharshini, Ruba and
|
31 |
-
Jose, Navya and
|
32 |
-
M, Anand Kumar and
|
33 |
-
Mandl, Thomas and
|
34 |
-
Kumaresan, Prasanna Kumar and
|
35 |
-
Ponnsamy, Rahul and
|
36 |
-
V,Hariharan and
|
37 |
-
Sherly, Elizabeth and
|
38 |
-
McCrae, John Philip },
|
39 |
-
booktitle = "Proceedings of the First Workshop on Speech and Language Technologies for Dravidian Languages",
|
40 |
-
month = April,
|
41 |
-
year = "2021",
|
42 |
-
publisher = "Association for Computational Linguistics",
|
43 |
-
year={2021}
|
44 |
-
}
|
45 |
-
"""
|
46 |
-
|
47 |
-
_DESCRIPTION = """\
|
48 |
-
Offensive language identification in dravidian lanaguages dataset. The goal of this task is to identify offensive language content of the code-mixed dataset of comments/posts in Dravidian Languages ( (Tamil-English, Malayalam-English, and Kannada-English)) collected from social media.
|
49 |
-
"""
|
50 |
-
|
51 |
-
_LICENSE = "Creative Commons Attribution 4.0 International Licence"
|
52 |
-
|
53 |
-
_URLs = {
|
54 |
-
"tamil": {
|
55 |
-
"TRAIN_DOWNLOAD_URL": "https://drive.google.com/u/0/uc?id=15auwrFAlq52JJ61u7eSfnhT9rZtI5sjk&export=download",
|
56 |
-
"VALIDATION_DOWNLOAD_URL": "https://drive.google.com/u/0/uc?id=1Jme-Oftjm7OgfMNLKQs1mO_cnsQmznRI&export=download",
|
57 |
-
},
|
58 |
-
"malayalam": {
|
59 |
-
"TRAIN_DOWNLOAD_URL": "https://drive.google.com/u/0/uc?id=13JCCr-IjZK7uhbLXeufptr_AxvsKinVl&export=download",
|
60 |
-
"VALIDATION_DOWNLOAD_URL": "https://drive.google.com/u/0/uc?id=1J0msLpLoM6gmXkjC6DFeQ8CG_rrLvjnM&export=download",
|
61 |
-
},
|
62 |
-
"kannada": {
|
63 |
-
"TRAIN_DOWNLOAD_URL": "https://drive.google.com/u/0/uc?id=1BFYF05rx-DK9Eb5hgoIgd6EcB8zOI-zu&export=download",
|
64 |
-
"VALIDATION_DOWNLOAD_URL": "https://drive.google.com/u/0/uc?id=1V077dMQvscqpUmcWTcFHqRa_vTy-bQ4H&export=download",
|
65 |
-
},
|
66 |
-
}
|
67 |
-
|
68 |
-
|
69 |
-
class OffensevalDravidian(datasets.GeneratorBasedBuilder):
|
70 |
-
"""Offensive language identification in dravidian lanaguages dataset"""
|
71 |
-
|
72 |
-
VERSION = datasets.Version("1.0.0")
|
73 |
-
|
74 |
-
BUILDER_CONFIGS = [
|
75 |
-
datasets.BuilderConfig(
|
76 |
-
name="tamil", version=VERSION, description="This part of my dataset covers Tamil dataset"
|
77 |
-
),
|
78 |
-
datasets.BuilderConfig(
|
79 |
-
name="malayalam", version=VERSION, description="This part of my dataset covers Malayalam dataset"
|
80 |
-
),
|
81 |
-
datasets.BuilderConfig(
|
82 |
-
name="kannada", version=VERSION, description="This part of my dataset covers Kannada dataset"
|
83 |
-
),
|
84 |
-
]
|
85 |
-
|
86 |
-
def _info(self):
|
87 |
-
|
88 |
-
if self.config.name == "tamil": # This is the name of the configuration selected in BUILDER_CONFIGS above
|
89 |
-
features = datasets.Features(
|
90 |
-
{
|
91 |
-
"text": datasets.Value("string"),
|
92 |
-
"label": datasets.features.ClassLabel(
|
93 |
-
names=[
|
94 |
-
"Not_offensive",
|
95 |
-
"Offensive_Untargetede",
|
96 |
-
"Offensive_Targeted_Insult_Individual",
|
97 |
-
"Offensive_Targeted_Insult_Group",
|
98 |
-
"Offensive_Targeted_Insult_Other",
|
99 |
-
"not-Tamil",
|
100 |
-
]
|
101 |
-
),
|
102 |
-
}
|
103 |
-
)
|
104 |
-
elif self.config.name == "malayalam":
|
105 |
-
features = datasets.Features(
|
106 |
-
{
|
107 |
-
"text": datasets.Value("string"),
|
108 |
-
"label": datasets.features.ClassLabel(
|
109 |
-
names=[
|
110 |
-
"Not_offensive",
|
111 |
-
"Offensive_Untargetede",
|
112 |
-
"Offensive_Targeted_Insult_Individual",
|
113 |
-
"Offensive_Targeted_Insult_Group",
|
114 |
-
"Offensive_Targeted_Insult_Other",
|
115 |
-
"not-malayalam",
|
116 |
-
]
|
117 |
-
),
|
118 |
-
}
|
119 |
-
)
|
120 |
-
|
121 |
-
# else self.config.name == "kannada":
|
122 |
-
else:
|
123 |
-
features = datasets.Features(
|
124 |
-
{
|
125 |
-
"text": datasets.Value("string"),
|
126 |
-
"label": datasets.features.ClassLabel(
|
127 |
-
names=[
|
128 |
-
"Not_offensive",
|
129 |
-
"Offensive_Untargetede",
|
130 |
-
"Offensive_Targeted_Insult_Individual",
|
131 |
-
"Offensive_Targeted_Insult_Group",
|
132 |
-
"Offensive_Targeted_Insult_Other",
|
133 |
-
"not-Kannada",
|
134 |
-
]
|
135 |
-
),
|
136 |
-
}
|
137 |
-
)
|
138 |
-
|
139 |
-
return datasets.DatasetInfo(
|
140 |
-
# This is the description that will appear on the datasets page.
|
141 |
-
description=_DESCRIPTION,
|
142 |
-
# This defines the different columns of the dataset and their types
|
143 |
-
features=features, # Here we define them above because they are different between the two configurations
|
144 |
-
# If there's a common (input, target) tuple from the features,
|
145 |
-
# specify them here. They'll be used if as_supervised=True in
|
146 |
-
# builder.as_dataset.
|
147 |
-
supervised_keys=None,
|
148 |
-
# Homepage of the dataset for documentation
|
149 |
-
homepage=_HOMEPAGE,
|
150 |
-
# License for the dataset if available
|
151 |
-
license=_LICENSE,
|
152 |
-
# Citation for the dataset
|
153 |
-
citation=_CITATION,
|
154 |
-
)
|
155 |
-
|
156 |
-
def _split_generators(self, dl_manager):
|
157 |
-
"""Returns SplitGenerators."""
|
158 |
-
|
159 |
-
my_urls = _URLs[self.config.name]
|
160 |
-
|
161 |
-
train_path = dl_manager.download_and_extract(my_urls["TRAIN_DOWNLOAD_URL"])
|
162 |
-
validation_path = dl_manager.download_and_extract(my_urls["VALIDATION_DOWNLOAD_URL"])
|
163 |
-
|
164 |
-
return [
|
165 |
-
datasets.SplitGenerator(
|
166 |
-
name=datasets.Split.TRAIN,
|
167 |
-
gen_kwargs={
|
168 |
-
"filepath": train_path,
|
169 |
-
"split": "train",
|
170 |
-
},
|
171 |
-
),
|
172 |
-
datasets.SplitGenerator(
|
173 |
-
name=datasets.Split.VALIDATION,
|
174 |
-
gen_kwargs={
|
175 |
-
"filepath": validation_path,
|
176 |
-
"split": "validation",
|
177 |
-
},
|
178 |
-
),
|
179 |
-
]
|
180 |
-
|
181 |
-
def _generate_examples(self, filepath, split):
|
182 |
-
"""Generate Offenseval_dravidian examples."""
|
183 |
-
|
184 |
-
with open(filepath, encoding="utf-8") as csv_file:
|
185 |
-
csv_reader = csv.reader(
|
186 |
-
csv_file, quotechar='"', delimiter="\t", quoting=csv.QUOTE_ALL, skipinitialspace=False
|
187 |
-
)
|
188 |
-
|
189 |
-
for id_, row in enumerate(csv_reader):
|
190 |
-
|
191 |
-
if self.config.name == "kannada":
|
192 |
-
text, label = row
|
193 |
-
else:
|
194 |
-
text, label, dummy = row
|
195 |
-
|
196 |
-
yield id_, {"text": text, "label": label}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tamil/train-00000-of-00001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:35d2af2549699358f3ebc9329370a06238f1c9b07645347f9856d684c19cd942
|
3 |
+
size 2392028
|
tamil/validation-00000-of-00001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8197bae526038dd57b981248ee02771c5e477990fe384c9518795d13eb1e37d0
|
3 |
+
size 298034
|