Datasets:
Commit
•
094e4c4
0
Parent(s):
Update files from the datasets library (from 1.2.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.2.0
- .gitattributes +27 -0
- README.md +205 -0
- dataset_infos.json +1 -0
- dummy/kannada/1.0.0/dummy_data.zip +3 -0
- dummy/malayalam/1.0.0/dummy_data.zip +3 -0
- dummy/tamil/1.0.0/dummy_data.zip +3 -0
- offenseval_dravidian.py +197 -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,205 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- expert-generated
|
4 |
+
language_creators:
|
5 |
+
- crowdsourced
|
6 |
+
languages:
|
7 |
+
kannada:
|
8 |
+
- en
|
9 |
+
- kn
|
10 |
+
malayalam:
|
11 |
+
- en
|
12 |
+
- ml
|
13 |
+
tamil:
|
14 |
+
- en
|
15 |
+
- ta
|
16 |
+
licenses:
|
17 |
+
- cc-by-4-0
|
18 |
+
multilinguality:
|
19 |
+
- multilingual
|
20 |
+
size_categories:
|
21 |
+
kannada:
|
22 |
+
- 1K<n<10K
|
23 |
+
malayalam:
|
24 |
+
- 10K<n<100K
|
25 |
+
tamil:
|
26 |
+
- 10K<n<100K
|
27 |
+
source_datasets:
|
28 |
+
- original
|
29 |
+
task_categories:
|
30 |
+
- text-classification
|
31 |
+
task_ids:
|
32 |
+
- text-classification-other-offensive-language
|
33 |
+
---
|
34 |
+
|
35 |
+
# Dataset Card for Offenseval Dravidian
|
36 |
+
|
37 |
+
## Table of Contents
|
38 |
+
- [Dataset Description](#dataset-description)
|
39 |
+
- [Dataset Summary](#dataset-summary)
|
40 |
+
- [Supported Tasks](#supported-tasks-and-leaderboards)
|
41 |
+
- [Languages](#languages)
|
42 |
+
- [Dataset Structure](#dataset-structure)
|
43 |
+
- [Data Instances](#data-instances)
|
44 |
+
- [Data Fields](#data-instances)
|
45 |
+
- [Data Splits](#data-instances)
|
46 |
+
- [Dataset Creation](#dataset-creation)
|
47 |
+
- [Curation Rationale](#curation-rationale)
|
48 |
+
- [Source Data](#source-data)
|
49 |
+
- [Annotations](#annotations)
|
50 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
51 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
52 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
53 |
+
- [Discussion of Biases](#discussion-of-biases)
|
54 |
+
- [Other Known Limitations](#other-known-limitations)
|
55 |
+
- [Additional Information](#additional-information)
|
56 |
+
- [Dataset Curators](#dataset-curators)
|
57 |
+
- [Licensing Information](#licensing-information)
|
58 |
+
- [Citation Information](#citation-information)
|
59 |
+
|
60 |
+
## Dataset Description
|
61 |
+
|
62 |
+
- **Homepage:** https://competitions.codalab.org/competitions/27654#learn_the_details
|
63 |
+
- **Repository:** https://competitions.codalab.org/competitions/27654#participate-get_data
|
64 |
+
- **Paper:** Findings of the Shared Task on {O}ffensive {L}anguage {I}dentification in {T}amil, {M}alayalam, and {K}annada
|
65 |
+
- **Leaderboard:** https://competitions.codalab.org/competitions/27654#results
|
66 |
+
- **Point of Contact:** [Bharathi Raja Chakravarthi](mailto:bharathiraja.akr@gmail.com)
|
67 |
+
|
68 |
+
### Dataset Summary
|
69 |
+
|
70 |
+
Offensive language identification is classification task in natural language processing (NLP) where the aim is to moderate and minimise offensive content in social media. It has been an active area of research in both academia and industry for the past two decades. There is an increasing demand for offensive language identification on social media texts which are largely code-mixed. Code-mixing is a prevalent phenomenon in a multilingual community and the code-mixed texts are sometimes written in non-native scripts. Systems trained on monolingual data fail on code-mixed data due to the complexity of code-switching at different linguistic levels in the text. This shared task presents a new gold standard corpus for offensive language identification of code-mixed text in Dravidian languages (Tamil-English, Malayalam-English, and Kannada-English).
|
71 |
+
|
72 |
+
### Supported Tasks and Leaderboards
|
73 |
+
|
74 |
+
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. The comment/post may contain more than one sentence but the average sentence length of the corpora is 1. Each comment/post is annotated at the comment/post level. This dataset also has class imbalance problems depicting real-world scenarios.
|
75 |
+
|
76 |
+
### Languages
|
77 |
+
|
78 |
+
Code-mixed text in Dravidian languages (Tamil-English, Malayalam-English, and Kannada-English).
|
79 |
+
|
80 |
+
## Dataset Structure
|
81 |
+
|
82 |
+
### Data Instances
|
83 |
+
|
84 |
+
An example from the Tamil dataset looks as follows:
|
85 |
+
|
86 |
+
| text | label |
|
87 |
+
| :------ | :----- |
|
88 |
+
| படம் கண்டிப்பாக வெற்றி பெற வேண்டும் செம்ம vara level | Not_offensive |
|
89 |
+
| Avasara patutiya editor uhh antha bullet sequence aa nee soliruka kudathu, athu sollama iruntha movie ku konjam support aa surprise element aa irunthurukum | Not_offensive |
|
90 |
+
|
91 |
+
An example from the Malayalam dataset looks as follows:
|
92 |
+
|
93 |
+
| text | label |
|
94 |
+
| :------ | :----- |
|
95 |
+
| ഷൈലോക്ക് ന്റെ നല്ല ടീസർ ആയിട്ട് പോലും ട്രോളി നടന്ന ലാലേട്ടൻ ഫാൻസിന് കിട്ടിയൊരു നല്ലൊരു തിരിച്ചടി തന്നെ ആയിരിന്നു ബിഗ് ബ്രദർ ന്റെ ട്രെയ്ലർ | Not_offensive |
|
96 |
+
| Marana mass Ekka kku kodukku oru | Not_offensive |
|
97 |
+
|
98 |
+
|
99 |
+
An example from the Kannada dataset looks as follows:
|
100 |
+
|
101 |
+
| text | label |
|
102 |
+
| :------ | :----- |
|
103 |
+
| ನಿಜವಾಗಿಯೂ ಅದ್ಭುತ heartly heltidini... plz avrigella namma nimmellara supprt beku | Not_offensive |
|
104 |
+
| Next song gu kuda alru andre evaga yar comment madidera alla alrru like madi share madi nam industry na next level ge togond hogaona. | Not_offensive |
|
105 |
+
|
106 |
+
|
107 |
+
### Data Fields
|
108 |
+
|
109 |
+
Tamil
|
110 |
+
- `text`: Tamil-English code mixed comment.
|
111 |
+
- `label`: integer from 0 to 5 that corresponds to these values: "Not_offensive", "Offensive_Untargetede", "Offensive_Targeted_Insult_Individual", "Offensive_Targeted_Insult_Group", "Offensive_Targeted_Insult_Other", "not-Tamil"
|
112 |
+
|
113 |
+
Malayalam
|
114 |
+
- `text`: Malayalam-English code mixed comment.
|
115 |
+
- `label`: integer from 0 to 5 that corresponds to these values: "Not_offensive", "Offensive_Untargetede", "Offensive_Targeted_Insult_Individual", "Offensive_Targeted_Insult_Group", "Offensive_Targeted_Insult_Other", "not-malayalam"
|
116 |
+
|
117 |
+
Kannada
|
118 |
+
- `text`: Kannada-English code mixed comment.
|
119 |
+
- `label`: integer from 0 to 5 that corresponds to these values: "Not_offensive", "Offensive_Untargetede", "Offensive_Targeted_Insult_Individual", "Offensive_Targeted_Insult_Group", "Offensive_Targeted_Insult_Other", "not-Kannada"
|
120 |
+
|
121 |
+
|
122 |
+
### Data Splits
|
123 |
+
|
124 |
+
| | Tain | Valid |
|
125 |
+
| ----- | ------: | -----: |
|
126 |
+
| Tamil | 35139 | 4388 |
|
127 |
+
| Malayalam | 16010 | 1999 |
|
128 |
+
| Kannada | 6217 | 777 |
|
129 |
+
|
130 |
+
## Dataset Creation
|
131 |
+
|
132 |
+
### Curation Rationale
|
133 |
+
|
134 |
+
There is an increasing demand for offensive language identification on social media texts which are largely code-mixed. Code-mixing is a prevalent phenomenon in a multilingual community and the code-mixed texts are sometimes written in non-native scripts. Systems trained on monolingual data fail on code-mixed data due to the complexity of code-switching at different linguistic levels in the text.
|
135 |
+
|
136 |
+
### Source Data
|
137 |
+
|
138 |
+
#### Initial Data Collection and Normalization
|
139 |
+
|
140 |
+
[Needs More Information]
|
141 |
+
|
142 |
+
#### Who are the source language producers?
|
143 |
+
|
144 |
+
Youtube users
|
145 |
+
|
146 |
+
### Annotations
|
147 |
+
|
148 |
+
#### Annotation process
|
149 |
+
|
150 |
+
[Needs More Information]
|
151 |
+
|
152 |
+
#### Who are the annotators?
|
153 |
+
|
154 |
+
[Needs More Information]
|
155 |
+
|
156 |
+
### Personal and Sensitive Information
|
157 |
+
|
158 |
+
[Needs More Information]
|
159 |
+
|
160 |
+
## Considerations for Using the Data
|
161 |
+
|
162 |
+
### Social Impact of Dataset
|
163 |
+
|
164 |
+
[Needs More Information]
|
165 |
+
|
166 |
+
### Discussion of Biases
|
167 |
+
|
168 |
+
[Needs More Information]
|
169 |
+
|
170 |
+
### Other Known Limitations
|
171 |
+
|
172 |
+
[Needs More Information]
|
173 |
+
|
174 |
+
## Additional Information
|
175 |
+
|
176 |
+
### Dataset Curators
|
177 |
+
|
178 |
+
[Needs More Information]
|
179 |
+
|
180 |
+
### Licensing Information
|
181 |
+
|
182 |
+
This work is licensed under a [Creative Commons Attribution 4.0 International Licence](http://creativecommons.org/licenses/by/4.0/.)
|
183 |
+
|
184 |
+
### Citation Information
|
185 |
+
|
186 |
+
```
|
187 |
+
@inproceedings{dravidianoffensive-eacl,
|
188 |
+
title={Findings of the Shared Task on {O}ffensive {L}anguage {I}dentification in {T}amil, {M}alayalam, and {K}annada},
|
189 |
+
author={Chakravarthi, Bharathi Raja and
|
190 |
+
Priyadharshini, Ruba and
|
191 |
+
Jose, Navya and
|
192 |
+
M, Anand Kumar and
|
193 |
+
Mandl, Thomas and
|
194 |
+
Kumaresan, Prasanna Kumar and
|
195 |
+
Ponnsamy, Rahul and
|
196 |
+
V,Hariharan and
|
197 |
+
Sherly, Elizabeth and
|
198 |
+
McCrae, John Philip },
|
199 |
+
booktitle = "Proceedings of the First Workshop on Speech and Language Technologies for Dravidian Languages",
|
200 |
+
month = April,
|
201 |
+
year = "2021",
|
202 |
+
publisher = "Association for Computational Linguistics",
|
203 |
+
year={2021}
|
204 |
+
}
|
205 |
+
```
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"tamil": {"description": "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.\n", "citation": "@inproceedings{dravidianoffensive-eacl,\ntitle={Findings of the Shared Task on {O}ffensive {L}anguage {I}dentification in {T}amil, {M}alayalam, and {K}annada},\nauthor={Chakravarthi, Bharathi Raja and\nPriyadharshini, Ruba and\nJose, Navya and\nM, Anand Kumar and\nMandl, Thomas and\nKumaresan, Prasanna Kumar and\nPonnsamy, Rahul and\nV,Hariharan and\nSherly, Elizabeth and\nMcCrae, John Philip },\nbooktitle = \"Proceedings of the First Workshop on Speech and Language Technologies for Dravidian Languages\",\nmonth = April,\nyear = \"2021\",\npublisher = \"Association for Computational Linguistics\",\nyear={2021}\n}\n", "homepage": "https://competitions.codalab.org/competitions/27654#learn_the_details", "license": "Creative Commons Attribution 4.0 International Licence", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 6, "names": ["Not_offensive", "Offensive_Untargetede", "Offensive_Targeted_Insult_Individual", "Offensive_Targeted_Insult_Group", "Offensive_Targeted_Insult_Other", "not-Tamil"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "offenseval_dravidian", "config_name": "tamil", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 4214801, "num_examples": 35139, "dataset_name": "offenseval_dravidian"}, "validation": {"name": "validation", "num_bytes": 526108, "num_examples": 4388, "dataset_name": "offenseval_dravidian"}}, "download_checksums": {"https://drive.google.com/u/0/uc?id=15auwrFAlq52JJ61u7eSfnhT9rZtI5sjk&export=download": {"num_bytes": 4480860, "checksum": "dd76f6cf48c49143ac0f83d901a0ae9d3f865c8ea37668ae2823f560585440d1"}, "https://drive.google.com/u/0/uc?id=1Jme-Oftjm7OgfMNLKQs1mO_cnsQmznRI&export=download": {"num_bytes": 559357, "checksum": "d533cb5a9e5c3620d709630f554a9d1ce1c9ce27e1cbcd0c7b5ac31857dbb63e"}}, "download_size": 5040217, "post_processing_size": null, "dataset_size": 4740909, "size_in_bytes": 9781126}, "malayalam": {"description": "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.\n", "citation": "@inproceedings{dravidianoffensive-eacl,\ntitle={Findings of the Shared Task on {O}ffensive {L}anguage {I}dentification in {T}amil, {M}alayalam, and {K}annada},\nauthor={Chakravarthi, Bharathi Raja and\nPriyadharshini, Ruba and\nJose, Navya and\nM, Anand Kumar and\nMandl, Thomas and\nKumaresan, Prasanna Kumar and\nPonnsamy, Rahul and\nV,Hariharan and\nSherly, Elizabeth and\nMcCrae, John Philip },\nbooktitle = \"Proceedings of the First Workshop on Speech and Language Technologies for Dravidian Languages\",\nmonth = April,\nyear = \"2021\",\npublisher = \"Association for Computational Linguistics\",\nyear={2021}\n}\n", "homepage": "https://competitions.codalab.org/competitions/27654#learn_the_details", "license": "Creative Commons Attribution 4.0 International Licence", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 6, "names": ["Not_offensive", "Offensive_Untargetede", "Offensive_Targeted_Insult_Individual", "Offensive_Targeted_Insult_Group", "Offensive_Targeted_Insult_Other", "not-malayalam"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "offenseval_dravidian", "config_name": "malayalam", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1944857, "num_examples": 16010, "dataset_name": "offenseval_dravidian"}, "validation": {"name": "validation", "num_bytes": 249364, "num_examples": 1999, "dataset_name": "offenseval_dravidian"}}, "download_checksums": {"https://drive.google.com/u/0/uc?id=13JCCr-IjZK7uhbLXeufptr_AxvsKinVl&export=download": {"num_bytes": 2018434, "checksum": "f056fec3d5032bc4fa2a103926e68ad31b9197bfdbd7d95f1a084d828f64eb5b"}, "https://drive.google.com/u/0/uc?id=1J0msLpLoM6gmXkjC6DFeQ8CG_rrLvjnM&export=download": {"num_bytes": 258302, "checksum": "43241953aaa4ac72e6b448d89a39983359d5ca323863985fd77341683a22184e"}}, "download_size": 2276736, "post_processing_size": null, "dataset_size": 2194221, "size_in_bytes": 4470957}, "kannada": {"description": "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.\n", "citation": "@inproceedings{dravidianoffensive-eacl,\ntitle={Findings of the Shared Task on {O}ffensive {L}anguage {I}dentification in {T}amil, {M}alayalam, and {K}annada},\nauthor={Chakravarthi, Bharathi Raja and\nPriyadharshini, Ruba and\nJose, Navya and\nM, Anand Kumar and\nMandl, Thomas and\nKumaresan, Prasanna Kumar and\nPonnsamy, Rahul and\nV,Hariharan and\nSherly, Elizabeth and\nMcCrae, John Philip },\nbooktitle = \"Proceedings of the First Workshop on Speech and Language Technologies for Dravidian Languages\",\nmonth = April,\nyear = \"2021\",\npublisher = \"Association for Computational Linguistics\",\nyear={2021}\n}\n", "homepage": "https://competitions.codalab.org/competitions/27654#learn_the_details", "license": "Creative Commons Attribution 4.0 International Licence", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 6, "names": ["Not_offensive", "Offensive_Untargetede", "Offensive_Targeted_Insult_Individual", "Offensive_Targeted_Insult_Group", "Offensive_Targeted_Insult_Other", "not-Kannada"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "builder_name": "offenseval_dravidian", "config_name": "kannada", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 567119, "num_examples": 6217, "dataset_name": "offenseval_dravidian"}, "validation": {"name": "validation", "num_bytes": 70147, "num_examples": 777, "dataset_name": "offenseval_dravidian"}}, "download_checksums": {"https://drive.google.com/u/0/uc?id=1BFYF05rx-DK9Eb5hgoIgd6EcB8zOI-zu&export=download": {"num_bytes": 603755, "checksum": "a3b8f0f17bfb1cfd8600ecd37b5d5ea591ba788c0bb848913e76ae3311d1110f"}, "https://drive.google.com/u/0/uc?id=1V077dMQvscqpUmcWTcFHqRa_vTy-bQ4H&export=download": {"num_bytes": 74972, "checksum": "b22e47d835e30f7ed45f8e3a262cb72d3cbffdee9c324c135e83f6e1b09b7798"}}, "download_size": 678727, "post_processing_size": null, "dataset_size": 637266, "size_in_bytes": 1315993}}
|
dummy/kannada/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7593a18eace4a691f7dcb2a16ddf5a769e51f30027eae61f4b2fee2758fbe1bc
|
3 |
+
size 1052
|
dummy/malayalam/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:38fcd61f2b8f6f3e4f9de23ce7aa05e92802ae262b32060ad3c09ac64112d9df
|
3 |
+
size 1378
|
dummy/tamil/1.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:39dba99f25778b5e2469be215a2f28c92a5f1b3fbf30555865b0857c460f40eb
|
3 |
+
size 1251
|
offenseval_dravidian.py
ADDED
@@ -0,0 +1,197 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
from __future__ import absolute_import, division, print_function
|
18 |
+
|
19 |
+
import csv
|
20 |
+
|
21 |
+
import datasets
|
22 |
+
|
23 |
+
|
24 |
+
_HOMEPAGE = "https://competitions.codalab.org/competitions/27654#learn_the_details"
|
25 |
+
|
26 |
+
|
27 |
+
_CITATION = """\
|
28 |
+
@inproceedings{dravidianoffensive-eacl,
|
29 |
+
title={Findings of the Shared Task on {O}ffensive {L}anguage {I}dentification in {T}amil, {M}alayalam, and {K}annada},
|
30 |
+
author={Chakravarthi, Bharathi Raja and
|
31 |
+
Priyadharshini, Ruba and
|
32 |
+
Jose, Navya and
|
33 |
+
M, Anand Kumar and
|
34 |
+
Mandl, Thomas and
|
35 |
+
Kumaresan, Prasanna Kumar and
|
36 |
+
Ponnsamy, Rahul and
|
37 |
+
V,Hariharan and
|
38 |
+
Sherly, Elizabeth and
|
39 |
+
McCrae, John Philip },
|
40 |
+
booktitle = "Proceedings of the First Workshop on Speech and Language Technologies for Dravidian Languages",
|
41 |
+
month = April,
|
42 |
+
year = "2021",
|
43 |
+
publisher = "Association for Computational Linguistics",
|
44 |
+
year={2021}
|
45 |
+
}
|
46 |
+
"""
|
47 |
+
|
48 |
+
_DESCRIPTION = """\
|
49 |
+
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.
|
50 |
+
"""
|
51 |
+
|
52 |
+
_LICENSE = "Creative Commons Attribution 4.0 International Licence"
|
53 |
+
|
54 |
+
_URLs = {
|
55 |
+
"tamil": {
|
56 |
+
"TRAIN_DOWNLOAD_URL": "https://drive.google.com/u/0/uc?id=15auwrFAlq52JJ61u7eSfnhT9rZtI5sjk&export=download",
|
57 |
+
"VALIDATION_DOWNLOAD_URL": "https://drive.google.com/u/0/uc?id=1Jme-Oftjm7OgfMNLKQs1mO_cnsQmznRI&export=download",
|
58 |
+
},
|
59 |
+
"malayalam": {
|
60 |
+
"TRAIN_DOWNLOAD_URL": "https://drive.google.com/u/0/uc?id=13JCCr-IjZK7uhbLXeufptr_AxvsKinVl&export=download",
|
61 |
+
"VALIDATION_DOWNLOAD_URL": "https://drive.google.com/u/0/uc?id=1J0msLpLoM6gmXkjC6DFeQ8CG_rrLvjnM&export=download",
|
62 |
+
},
|
63 |
+
"kannada": {
|
64 |
+
"TRAIN_DOWNLOAD_URL": "https://drive.google.com/u/0/uc?id=1BFYF05rx-DK9Eb5hgoIgd6EcB8zOI-zu&export=download",
|
65 |
+
"VALIDATION_DOWNLOAD_URL": "https://drive.google.com/u/0/uc?id=1V077dMQvscqpUmcWTcFHqRa_vTy-bQ4H&export=download",
|
66 |
+
},
|
67 |
+
}
|
68 |
+
|
69 |
+
|
70 |
+
class OffensevalDravidian(datasets.GeneratorBasedBuilder):
|
71 |
+
"""Offensive language identification in dravidian lanaguages dataset"""
|
72 |
+
|
73 |
+
VERSION = datasets.Version("1.0.0")
|
74 |
+
|
75 |
+
BUILDER_CONFIGS = [
|
76 |
+
datasets.BuilderConfig(
|
77 |
+
name="tamil", version=VERSION, description="This part of my dataset covers Tamil dataset"
|
78 |
+
),
|
79 |
+
datasets.BuilderConfig(
|
80 |
+
name="malayalam", version=VERSION, description="This part of my dataset covers Malayalam dataset"
|
81 |
+
),
|
82 |
+
datasets.BuilderConfig(
|
83 |
+
name="kannada", version=VERSION, description="This part of my dataset covers Kannada dataset"
|
84 |
+
),
|
85 |
+
]
|
86 |
+
|
87 |
+
def _info(self):
|
88 |
+
|
89 |
+
if self.config.name == "tamil": # This is the name of the configuration selected in BUILDER_CONFIGS above
|
90 |
+
features = datasets.Features(
|
91 |
+
{
|
92 |
+
"text": datasets.Value("string"),
|
93 |
+
"label": datasets.features.ClassLabel(
|
94 |
+
names=[
|
95 |
+
"Not_offensive",
|
96 |
+
"Offensive_Untargetede",
|
97 |
+
"Offensive_Targeted_Insult_Individual",
|
98 |
+
"Offensive_Targeted_Insult_Group",
|
99 |
+
"Offensive_Targeted_Insult_Other",
|
100 |
+
"not-Tamil",
|
101 |
+
]
|
102 |
+
),
|
103 |
+
}
|
104 |
+
)
|
105 |
+
elif self.config.name == "malayalam":
|
106 |
+
features = datasets.Features(
|
107 |
+
{
|
108 |
+
"text": datasets.Value("string"),
|
109 |
+
"label": datasets.features.ClassLabel(
|
110 |
+
names=[
|
111 |
+
"Not_offensive",
|
112 |
+
"Offensive_Untargetede",
|
113 |
+
"Offensive_Targeted_Insult_Individual",
|
114 |
+
"Offensive_Targeted_Insult_Group",
|
115 |
+
"Offensive_Targeted_Insult_Other",
|
116 |
+
"not-malayalam",
|
117 |
+
]
|
118 |
+
),
|
119 |
+
}
|
120 |
+
)
|
121 |
+
|
122 |
+
# else self.config.name == "kannada":
|
123 |
+
else:
|
124 |
+
features = datasets.Features(
|
125 |
+
{
|
126 |
+
"text": datasets.Value("string"),
|
127 |
+
"label": datasets.features.ClassLabel(
|
128 |
+
names=[
|
129 |
+
"Not_offensive",
|
130 |
+
"Offensive_Untargetede",
|
131 |
+
"Offensive_Targeted_Insult_Individual",
|
132 |
+
"Offensive_Targeted_Insult_Group",
|
133 |
+
"Offensive_Targeted_Insult_Other",
|
134 |
+
"not-Kannada",
|
135 |
+
]
|
136 |
+
),
|
137 |
+
}
|
138 |
+
)
|
139 |
+
|
140 |
+
return datasets.DatasetInfo(
|
141 |
+
# This is the description that will appear on the datasets page.
|
142 |
+
description=_DESCRIPTION,
|
143 |
+
# This defines the different columns of the dataset and their types
|
144 |
+
features=features, # Here we define them above because they are different between the two configurations
|
145 |
+
# If there's a common (input, target) tuple from the features,
|
146 |
+
# specify them here. They'll be used if as_supervised=True in
|
147 |
+
# builder.as_dataset.
|
148 |
+
supervised_keys=None,
|
149 |
+
# Homepage of the dataset for documentation
|
150 |
+
homepage=_HOMEPAGE,
|
151 |
+
# License for the dataset if available
|
152 |
+
license=_LICENSE,
|
153 |
+
# Citation for the dataset
|
154 |
+
citation=_CITATION,
|
155 |
+
)
|
156 |
+
|
157 |
+
def _split_generators(self, dl_manager):
|
158 |
+
"""Returns SplitGenerators."""
|
159 |
+
|
160 |
+
my_urls = _URLs[self.config.name]
|
161 |
+
|
162 |
+
train_path = dl_manager.download_and_extract(my_urls["TRAIN_DOWNLOAD_URL"])
|
163 |
+
validation_path = dl_manager.download_and_extract(my_urls["VALIDATION_DOWNLOAD_URL"])
|
164 |
+
|
165 |
+
return [
|
166 |
+
datasets.SplitGenerator(
|
167 |
+
name=datasets.Split.TRAIN,
|
168 |
+
gen_kwargs={
|
169 |
+
"filepath": train_path,
|
170 |
+
"split": "train",
|
171 |
+
},
|
172 |
+
),
|
173 |
+
datasets.SplitGenerator(
|
174 |
+
name=datasets.Split.VALIDATION,
|
175 |
+
gen_kwargs={
|
176 |
+
"filepath": validation_path,
|
177 |
+
"split": "validation",
|
178 |
+
},
|
179 |
+
),
|
180 |
+
]
|
181 |
+
|
182 |
+
def _generate_examples(self, filepath, split):
|
183 |
+
"""Generate Offenseval_dravidian examples."""
|
184 |
+
|
185 |
+
with open(filepath, encoding="utf-8") as csv_file:
|
186 |
+
csv_reader = csv.reader(
|
187 |
+
csv_file, quotechar='"', delimiter="\t", quoting=csv.QUOTE_ALL, skipinitialspace=False
|
188 |
+
)
|
189 |
+
|
190 |
+
for id_, row in enumerate(csv_reader):
|
191 |
+
|
192 |
+
if self.config.name == "kannada":
|
193 |
+
text, label = row
|
194 |
+
else:
|
195 |
+
text, label, dummy = row
|
196 |
+
|
197 |
+
yield id_, {"text": text, "label": label}
|