CoolFace
Datasetpublic

Koushim/processed-jigsaw-toxic-comments

Processed Jigsaw Toxic Comments Dataset This is a preprocessed and tokenized version of the original Jigsaw Toxic Comment Classification Challenge dataset, prepared for multi-label toxicity classification using transformer-based models like BERT. โš ๏ธ Important Note: I am not the original creator of the dataset. This dataset is a cleaned and restructured version made for quick use in PyTorch deep learning models. ๐Ÿ“ฆ Dataset Features Each example contains: text:โ€ฆ See the full description on the dataset page: https://huggingface.co/datasets/Koushim/processed-jigsaw-toxic-comments.

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
3likes108downloads
Dataset Card

Processed Jigsaw Toxic Comments Dataset

This is a preprocessed and tokenized version of the original Jigsaw Toxic Comment Classification Challenge dataset, prepared for multi-label toxicity classification using transformer-based models like BERT.

โš ๏ธ Important Note: I am not the original creator of the dataset. This dataset is a cleaned and restructured version made for quick use in PyTorch deep learning models.


๐Ÿ“ฆ Dataset Features

Each example contains:

  • โ€”text: The original user comment
  • โ€”labels: A list of 7 binary float values indicating presence of toxicity categories
  • โ€”input_ids, attention_mask: Tokenized fields using bert-base-uncased (max length 128)

Toxicity Categories:

  1. 1.toxicity
  2. 2.severe_toxicity
  3. 3.obscene
  4. 4.threat
  5. 5.insult
  6. 6.identity_attack
  7. 7.sexual_explicit

๐Ÿงช Dataset Splits

Split# Examples
Train~1.8M
Validation~97K
Test~97K

๐Ÿ”ง Processing Details

  1. 1.Original Source: Manually downloaded from Kaggle
  2. 2.Preprocessing:
  3. 3.Combined multiple toxicity columns into a single labels vector
  4. 4.Converted label values to floats (0.0 or 1.0)
  5. 5.Tokenization:
  6. 6.Used Hugging Face bert-base-uncased tokenizer
  7. 7.Applied padding and truncation to max length of 128
  8. 8.Formatting:
  9. 9.Final dataset set to return PyTorch input_ids, attention_mask, and labels

๐Ÿ’ก Usage Example

python
from datasets import load_dataset

dataset = load_dataset("Koushim/processed-jigsaw-toxic-comments")

from torch.utils.data import DataLoader

train_loader = DataLoader(dataset["train"], batch_size=32, shuffle=True)

batch = next(iter(train_loader))
print(batch['input_ids'].shape)  # torch.Size([32, 128])
print(batch['labels'].shape)     # torch.Size([32, 7])

๐Ÿ“š Citation

If you use this dataset, please cite the original Jigsaw authors:

bibtex
@misc{jigsawtoxic,
  title={Toxic Comment Classification Challenge},
  author={Jigsaw and Google},
  year={2018},
  url={https://www.kaggle.com/c/jigsaw-toxic-comment-classification-challenge}
}

๐Ÿ™ Acknowledgements

  • โ€”Original dataset by Jigsaw/Google
  • โ€”Processing, formatting, and tokenization by Koushik