Giter VIP home page Giter VIP logo

ingenius-hack's Introduction

ServerPolice - An AI based Anti Cyber Bullying Discord Bot

Team 41: Serial Coders

BiLSTM Model :

  • BiLSTM is a type of RNN architecture used to analyze sequential data.

  • RNNs use their internal state to process sequences of inputs as they are all related to each other. They provide the same weights and biases to all the layers, hence making the activations dependent on the previous ones.

  • Long Short-Term Memory (LSTM) networks make it easier to remember past data in memory by making use of back-propagation.

  • Bi-directional LSTM (BiLSTM) is a structure of two RNNs put together, hence allowing both forward and backward propagation. The data is run in both ways, thereby learning relationships between words of a sentence in both the directions.

  • The neural network for this discord bot makes use of an Embedding layer, three BiLSTM layers along with the suitable Dropout layers and two Dense layers with rectifier and sigmoidal activations respectively. This model makes use of the Adam optimizer and its performance is measured based on its accuracy, loss and F1 score

    • Accuracy = 86.67%

    • Loss = 0.5

    • F1 score = 0.74

Node.js

In node, we have used the npm module discord.js which is an object oriented library for interacting with the Discord API from a javascript application. Here we have spawned a child process inside node to run the python script which imports and makes use of the model. The python script accepts a string input and gives an output which tells us if the input string is appropriate or not.

We have passed the incoming message content from discord into the python script as input.

We have used a mongodb database to keep track of how many offences does a particular user make. They get 2 warnings and are then kicked out of the server if they repeat their offence thrice.

How to use

  • Our bot is deployed on heroku. Click on this link to add our bot to your own server.
  • Alternatively, you can join this test server where the bot is already added.
  • Start messaging on the general text channel to test it out.

ingenius-hack's People

Contributors

arindamlahiri avatar nivetha2312 avatar

Watchers

 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.