The companion blog post on text moderation can be found here.
The dataset used is from the kaggle Toxic Comments Challenge and can be downloaded from here.
The labels in the dataset are
labels = ['toxic', 'severe_toxic', 'obscene', 'threat', 'insult', 'identity_hate']
The CNN architecture used is an implementation of this as found here. We use the Hugging Face Transformers library to get word embeddings for each of our comments. We transfer these weights and train our CNN model based on our classification targets.