TLDR: This project is very similar in functionality and purpose to Google's recent Perspective API project
>>> 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
Note: This package is compatible with Python 2 only
pip install insults
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>
python -m pytest tests/
- Character-level Convolutional Networks for Text Classification, with simple implementation by mhjabreel over here
- cbrew for their original data-science work in Imperium's Kaggle Competition. Code in cbrew/Insults