Datasets:
Tasks:
Text Classification
Formats:
parquet
Languages:
English
Size:
10K - 100K
ArXiv:
Tags:
hate-speech-detection
License:
Commit ·
b3c9c21
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
Files changed (5)
- .gitattributesAdded+27
- README.mdAdded+156
- dataset_infos.jsonAdded+1
- dummy/1.0.0/dummy_data.zipAdded+3
- hate_speech_offensive.pyAdded+106
123456789101112131415161718192021222324252627*.7z filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.bin.* filter=lfs diff=lfs merge=lfs -text*.bz2 filter=lfs diff=lfs merge=lfs -text*.ftz filter=lfs diff=lfs merge=lfs -text*.gz filter=lfs diff=lfs merge=lfs -text*.h5 filter=lfs diff=lfs merge=lfs -text*.joblib filter=lfs diff=lfs merge=lfs -text*.lfs.* filter=lfs diff=lfs merge=lfs -text*.model filter=lfs diff=lfs merge=lfs -text*.msgpack filter=lfs diff=lfs merge=lfs -text*.onnx filter=lfs diff=lfs merge=lfs -text*.ot filter=lfs diff=lfs merge=lfs -text*.parquet filter=lfs diff=lfs merge=lfs -text*.pb filter=lfs diff=lfs merge=lfs -text*.pt filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.rar filter=lfs diff=lfs merge=lfs -textsaved_model/**/* filter=lfs diff=lfs merge=lfs -text*.tar.* filter=lfs diff=lfs merge=lfs -text*.tflite filter=lfs diff=lfs merge=lfs -text*.tgz filter=lfs diff=lfs merge=lfs -text*.xz filter=lfs diff=lfs merge=lfs -text*.zip filter=lfs diff=lfs merge=lfs -text*.zstandard filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156---annotations_creators:- expert-generated- crowdsourcedlanguage_creators:- foundlanguages:- enlicenses:- unknownmultilinguality:- monolingualsize_categories:- 10k<n<100Ksource_datasets:- originaltask_categories:- text-classificationtask_ids:- text-classification-other-hate-speech-detection---
# Dataset Card for [Dataset Name]
## Table of Contents- [Dataset Description](#dataset-description) - [Dataset Summary](#dataset-summary) - [Supported Tasks](#supported-tasks-and-leaderboards) - [Languages](#languages)- [Dataset Structure](#dataset-structure) - [Data Instances](#data-instances) - [Data Fields](#data-instances) - [Data Splits](#data-instances)- [Dataset Creation](#dataset-creation) - [Curation Rationale](#curation-rationale) - [Source Data](#source-data) - [Annotations](#annotations) - [Personal and Sensitive Information](#personal-and-sensitive-information)- [Considerations for Using the Data](#considerations-for-using-the-data) - [Social Impact of Dataset](#social-impact-of-dataset) - [Discussion of Biases](#discussion-of-biases) - [Other Known Limitations](#other-known-limitations)- [Additional Information](#additional-information) - [Dataset Curators](#dataset-curators) - [Licensing Information](#licensing-information) - [Citation Information](#citation-information)
## Dataset Description
- **Homepage:** https://github.com/t-davidson/hate-speech-and-offensive-language- **Repository:** https://github.com/t-davidson/hate-speech-and-offensive-language- **Paper:** https://arxiv.org/abs/1703.04009- **Leaderboard:**- **Point of Contact:** https://docs.google.com/forms/d/e/1FAIpQLSdrPNlfVBlqxun2tivzAtsZaOoPC5YYMocn-xscCgeRakLXHg/viewform?usp=pp_url&entry.1506871634&entry.147453066&entry.1390333885&entry.516829772
### Dataset Summary
An annotated dataset for hate speech and offensive language detection on tweets.
### Supported Tasks and Leaderboards
[More Information Needed]
### LanguagesEnglish (`en`)
## Dataset Structure
### Data Instances```{"count": 3, "hate_speech_annotation": 0, "offensive_language_annotation": 0, "neither_annotation": 3, "label": 2, # "neither" "tweet": "!!! RT @mayasolovely: As a woman you shouldn't complain about cleaning up your house. & as a man you should always take the trash out...")}```
### Data Fields```count: (Integer) number of users who coded each tweet (min is 3, sometimes more users coded a tweet when judgments were determined to be unreliable,hate_speech_annotation: (Integer) number of users who judged the tweet to be hate speech,offensive_language_annotation: (Integer) number of users who judged the tweet to be offensive,neither_annotation: (Integer) number of users who judged the tweet to be neither offensive nor non-offensive,label: (Class Label) class label for majority of CF users (0: 'hate-speech', 1: 'offensive-language' or 2: 'neither'),tweet: (string)```
### Data SplitsThis dataset is not splitted, only the train split is available.
## Dataset Creation
### Curation Rationale
[More Information Needed]
### Source Data
#### Initial Data Collection and Normalization
[More Information Needed]
#### Who are the source language producers?
[More Information Needed]
### Annotations
#### Annotation process
[More Information Needed]
#### Who are the annotators?
[More Information Needed]
### Personal and Sensitive InformationUsernames are not anonymized in the dataset.
## Considerations for Using the Data
### Social Impact of Dataset
[More Information Needed]
### Discussion of Biases
[More Information Needed]
### Other Known Limitations
[More Information Needed]
## Additional Information
### Dataset Curators
[More Information Needed]
### Licensing InformationMIT License
### Citation Information@inproceedings{hateoffensive, title = {Automated Hate Speech Detection and the Problem of Offensive Language}, author = {Davidson, Thomas and Warmsley, Dana and Macy, Michael and Weber, Ingmar}, booktitle = {Proceedings of the 11th International AAAI Conference on Web and Social Media}, series = {ICWSM '17}, year = {2017}, location = {Montreal, Canada}, pages = {512-515} }1{"default": {"description": "An annotated dataset for hate speech and offensive language detection on tweets.\n", "citation": "@inproceedings{hateoffensive,\ntitle = {Automated Hate Speech Detection and the Problem of Offensive Language},\nauthor = {Davidson, Thomas and Warmsley, Dana and Macy, Michael and Weber, Ingmar},\nbooktitle = {Proceedings of the 11th International AAAI Conference on Web and Social Media},\nseries = {ICWSM '17},\nyear = {2017},\nlocation = {Montreal, Canada},\npages = {512-515}\n}\n", "homepage": "https://github.com/t-davidson/hate-speech-and-offensive-language", "license": "MIT", "features": {"count": {"dtype": "int64", "id": null, "_type": "Value"}, "hate_speech_count": {"dtype": "int64", "id": null, "_type": "Value"}, "offensive_language_count": {"dtype": "int64", "id": null, "_type": "Value"}, "neither_count": {"dtype": "int64", "id": null, "_type": "Value"}, "class": {"num_classes": 3, "names": ["hate speech", "offensive language", "neither"], "names_file": null, "id": null, "_type": "ClassLabel"}, "tweet": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": {"input": "tweet", "output": "class"}, "builder_name": "hate_speech_offensive", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 3207826, "num_examples": 24783, "dataset_name": "hate_speech_offensive"}}, "download_checksums": {"https://raw.githubusercontent.com/t-davidson/hate-speech-and-offensive-language/master/data/labeled_data.csv": {"num_bytes": 2546446, "checksum": "fcb8bc7c68120ae4af04a5b9acd58585513ede11e1548ebf36a5c2040b6f6281"}}, "download_size": 2546446, "post_processing_size": null, "dataset_size": 3207826, "size_in_bytes": 5754272}}123version https://git-lfs.github.com/spec/v1oid sha256:d42ec225b8fd781c15f1ef78875eb489e2baa33164996467378ce7e79c2bff21size 589123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106# coding=utf-8# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.## Licensed under the Apache License, Version 2.0 (the "License");# you may not use this file except in compliance with the License.# You may obtain a copy of the License at## http://www.apache.org/licenses/LICENSE-2.0## Unless required by applicable law or agreed to in writing, software# distributed under the License is distributed on an "AS IS" BASIS,# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License."""An annotated dataset for hate speech and offensive language detection on tweets."""
from __future__ import absolute_import, division, print_function
import csv
import datasets
_CITATION = """\@inproceedings{hateoffensive,title = {Automated Hate Speech Detection and the Problem of Offensive Language},author = {Davidson, Thomas and Warmsley, Dana and Macy, Michael and Weber, Ingmar},booktitle = {Proceedings of the 11th International AAAI Conference on Web and Social Media},series = {ICWSM '17},year = {2017},location = {Montreal, Canada},pages = {512-515}}"""
_DESCRIPTION = """\An annotated dataset for hate speech and offensive language detection on tweets."""
_HOMEPAGE = "https://github.com/t-davidson/hate-speech-and-offensive-language"
_LICENSE = "MIT"
_URL = "https://raw.githubusercontent.com/t-davidson/hate-speech-and-offensive-language/master/data/labeled_data.csv"
_CLASS_MAP = { "0": "hate speech", "1": "offensive language", "2": "neither",}
class HateSpeechOffensive(datasets.GeneratorBasedBuilder): """An annotated dataset for hate speech and offensive language detection on tweets."""
VERSION = datasets.Version("1.0.0")
def _info(self): return datasets.DatasetInfo( description=_DESCRIPTION, features=datasets.Features( { "count": datasets.Value("int64"), "hate_speech_count": datasets.Value("int64"), "offensive_language_count": datasets.Value("int64"), "neither_count": datasets.Value("int64"), "class": datasets.ClassLabel(names=["hate speech", "offensive language", "neither"]), "tweet": datasets.Value("string"), } ), supervised_keys=("tweet", "class"), homepage=_HOMEPAGE, license=_LICENSE, citation=_CITATION, )
def _split_generators(self, dl_manager): """Returns SplitGenerators."""
data_file = dl_manager.download_and_extract(_URL) return [ datasets.SplitGenerator( name=datasets.Split.TRAIN, gen_kwargs={ "filepath": data_file, }, ), ]
def _generate_examples(self, filepath): """ Yields examples. """
with open(filepath, encoding="utf-8") as f: reader = csv.reader(f) for id_, row in enumerate(reader): if id_ == 0: continue
yield id_, { "count": row[1], "hate_speech_count": row[2], "offensive_language_count": row[3], "neither_count": row[4], "class": _CLASS_MAP[row[5]], "tweet": row[6], }.gitattributesAdded+27
README.mdAdded+156
dataset_infos.jsonAdded+1
dummy/1.0.0/dummy_data.zipAdded+3
hate_speech_offensive.pyAdded+106