Detecting comment toxicity : Using NN
Developed a neural network model to classify and detect toxic comments. The project focuses on identifying harmful content in text using NLP techniques, enabling real-time moderation and improved online community safety.
Technologies used:
- Python
- Tensorflow
- Natural Language Processing
- HTML/ CSS/ JS, JQuery
Approach:
- Used a dataset containing the following classes: identity attack, insult, obscene, severe toxicity, sexually explicit, threat, and general toxicity.
- Text preprocessing: Cleaned the data by removing noise and irrelevant content, applied tokenization.
- Converted text into input IDs and applied padding for consistent input length.
- Constructed a neural network with 3 hidden layers and a dropout layer to prevent overfitting.
- Added an output layer with 5 units to get probabilities for each class.
- Based on the predicted probabilities, classified text into appropriate categories.
- Rendered the results on the frontend to display the detected toxicity levels.
Skills I gained:
- Tensorflow
- Python
- HTML/ CSS/ JS
- NLP
- Part of speech tagging
- Using ML models in JS
Sources:
View deployed
Github Repository