Giter Site home page Giter Site logo

toxicity_detection's Introduction

Toxicity_detection

Detection of toxic nature of comment using the toxic comment dataset(https://github.com/vzhou842/profanity-check/blob/master/profanity_check/data/clean_data.csv)

The data includes both tweets as well as wikipedia edits as obtained from the Toxic comment classification challenge on Kaggle.

The following implementations are done:

  1. LSTM
  2. LSTM with GLoVE 100D word embeddings
  3. LSTM with GLoVE 300D word embeddings
  4. Attention mechanism with GLoVe 300D word embeddings

The results obtained were as follows:

Model Training accuracy(%) Testing accuracy(%)
LSTM 82 80
LSTM + GLoVe(100D) 95 96.12
LSTM + GLoVe(300D) 95.34 95.94
Multi layer LSTM + GLoVe(300D) 97.06 96.14
LSTM + Attention + GLoVe(300D) 98.16 95.87

Future scope includes improvement in the attention layer to increase testing accuracy.

Also, transformer architecture can be used to improve the performance further

toxicity_detection's People

Contributors

pratikratadiya avatar venseven avatar

Stargazers

 avatar  avatar  avatar

Forkers

moeez-py

toxicity_detection's Issues

TypeError: add_weight() got multiple values for argument 'name'

`---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
in ()
6 x1 = Bidirectional(LSTM(60, return_sequences=True))(x1)
7 x1 = Dropout(0.3)(x1)
----> 8 x1 = Attention(max_len)(x1)
9
10 x2 = Embedding(vocab_size + 1, embedding_dim, weights=[embedding_matrix], input_length=max_len, trainable=True)(comment_input_post)

2 frames
in build(self, input_shape)
42 name='{}_W'.format(self.name),
43 regularizer=self.W_regularizer,
---> 44 constraint=self.W_constraint)
45 self.features_dim = input_shape[-1]
46

TypeError: add_weight() got multiple values for argument 'name'`

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.