🤔 Purpose

Classify a sentence based on 6 toxicity levels:

  • toxic
  • severe toxic
  • obscene
  • threat
  • insult
  • identity hate

🧠 How does it work?

The input text is fed into a TensorFlow model, which computes the probabilities for the above classes.

The model was trained on a Kaggle dataset for Toxic Comment Classification.

I trained the model in a Kaggle notebook using Python, and then used the TensorFlowJS Converter to convert it into a format which could be used in a web application.

If you want to see how the model was trained, check out my Kaggle notebook in which I built the model from scratch using TensorFlow.

🤖 Model overview (includes ML terminology)

  1. Tokenization: The input sentence is converted into a sequences of integers.
  2. Embeddings: The model converts the sequence of integers into word embeddings, which capture the semantic meaning of the words in the sentence.
  3. LSTM: The word embeddings are passed through LSTM (Long Short-Term Memory) units, which learn the sequential meaning of the sentence.
  4. Output: The output from the LSTM is converted into probabilities for each target class.

Again, if you want to dive deeper into how this model works, feel free to check out the Kaggle notebook in which the model was designed.

Comment Toxicity Checker

By Raj Pulapakura

Note: the model is only as good as the data it is trained on. Responses may be unintentionally incorrect or disrespectful.

Click Enter to run the checker.

toxic

0%

severe toxic

0%

obscene

0%

threat

0%

insult

0%

identity hate

0%