insults

Identify insulting comments and users on social media


Keywords
machine-learning, social-media, community, data-science, kaggle, linear-model, natural-language-processing, sklearn
License
GPL-3.0
Install
pip install insults==0.1.12

Documentation

Insults Build Status Code Climate Issue Count

TLDR: This project is very similar in functionality and purpose to Google's recent Perspective API project Imgur


Basic Usage

>>> from insults import Insults

>>> comment = "You are a disgusting maggot of a person."
>>> Insults.load_model()
>>> Insults.rate_comment(comment)

0.89

>>> comments = ["You called me a \"dickhead\", so I'll say you're a cunt.", "These shitakes taste like shit."]
>>> Insults.foul_language(comments, context=False)

['cunt', 'shit'], None

Installation [Package]

Note: This package is compatible with Python 2 only

pip install insults

Installation [Development]

If you'd like to contribute and hack on this project, feel free to clone a development version of this repository locally:

git clone git://github.com/thundergolfer/Insults.git

Once you have a copy of the source, run the following scripts:

./install_miniconda.sh ./install_local.sh

A Conda virtual environment is created and everything needed should be now installed into it. To activate the environment, run:

source ./run_in_environment.sh

or alternatively you can run single commands in the environment with:

./run_in_environment.sh <COMMAND>

Running The Tests

python -m pytests tests/

Credit