Git Product home page Git Product logo

classify-toxic-comments's Introduction

Classify Toxic Comments

image

Project Motivation

For this project, I used Kaggle open dataset 'Toxic Comments Classification' from 2017 to enhance my knowledge in:

GloVe word embedding
Text pre-processing
LSTM neural networks

Problem Statement

The Conversation AI team, a research initiative founded by Jigsaw and Google (both a part of Alphabet) are working on tools to help improve online conversation. One area of focus is the study of negative online behaviors, like toxic comments (i.e. comments that are rude, disrespectful or otherwise likely to make someone leave a discussion). This competition aims to build a multi-headed model that’s capable of detecting different types of toxicity - severe_toxic, obscene, threat, insult, identity_hate. The model should predict a probability for each type of toxicity for each comment.

Installation

  • Anaconda Distribution of Python
  • TensorFlow
  • sklearn
  • keras
  • GloVe word embeddings

File Description

This dataset contains a large number of comments from Wikipedia’s talk page edits, which have been labeled by human raters for toxic behavior. More details about the dataset can be found here.

Approach

  • Tokenized and integer encoded the comments
  • Padded dataset to reduce input size
  • Loaded GloVe embeddings and created embedding matrix for words present in dataset
  • Initialize LSTM model with the embedding layer. One output neuron for each type of toxicity with Sigmoid activation.
  • Run the model with Adam optimizer and Early Stopping rule that checks for validation set loss
  • Save the trained model which is able to distinguish between different types of toxicity in comments

classify-toxic-comments's People

Contributors

aniketcomps avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.