Code Monkey home page Code Monkey logo

intent_detection_slim's Introduction

This is a slimmed-down implementation of abusive intent detection. It is based on the research done for my Master's.

Abusive intent is defined as a statement of future action or desire to negatively impact a target individual or group. Simply put, the model is designed to find text where someone states that they are/want to do something in the future. This statement should also contain abusive language, since we are most interested in malicious actions.

Usage

Before making predictions prepare the environment by executing setup.py. This will create the appropriate data directories, download dependencies, and download the fastText model.

Once the environment is prepared place your dataset (saved in a csv) to data/source/. Place your abusive intent model in data/model/. Then change the dataset name in config.py to correspond to that filename. Set your shell to use the virtual environment by running source ".env/bin/activate" from the root directory. Change the context_index value in prepare_data.py to the column index of the text. Prepare the data by running prepare_data.py. While still in the virtual environment, you can now execute make_predictions.py. The top 25 documents with abusive intent will be printed to the console. All of the predictions will also be saved to data/predictions/.

intent_detection_slim's People

Contributors

simonsben avatar

Stargazers

 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.