Hate Speech Detection Library for Python.
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data Remove model dir Jan 26, 2018
docs Add image for doc Jan 26, 2018
hatesonar Add get_weight method for visualization Sep 13, 2018
notebooks Delete requirements.txt in notebooks Sep 12, 2018
server Add google analytics Sep 12, 2018
tests Add get_weight method for visualization Sep 13, 2018
.gitignore Add project boilerplate Jan 26, 2018
LICENSE Add project boilerplate Jan 26, 2018
MANIFEST.in Add MANIFEST.in Jan 26, 2018
Procfile Add Procfile Sep 12, 2018
README.md Update README Jan 26, 2018
requirements.txt Update requirements.txt Sep 12, 2018
setup.py Support python 2.7 Feb 22, 2018
tox.ini Support python 2.7 Feb 22, 2018

README.md

HateSonar: Hate Speech Detection

HateSonar is the hate speech detection library for Python.

Demo Image.

Behold, the power of HateSonar:

>>> from hatesonar import Sonar
>>> sonar = Sonar()
>>> sonar.ping(text="At least I'm not a nigger")
{
  "text" : "At least I'm not a nigger",
  "top_class" : "hate_speech",
  "classes" : [ {
    "class_name" : "hate_speech",
    "confidence" : 0.6001793646345871
  }, {
    "class_name" : "offensive_language",
    "confidence" : 0.399548534507691
  }, {
    "class_name": "neither",
    "confidence": 0.0002721008577219325
  } ]
}

HateSonar allows you to detect hate speech and offensive language in text, without the need for training. There's no need to train the model. You have only to fed text into HateSonar. It detects hate speech with the confidence score.

Feature Support

  • Hate speech and offensive language detection

HateSonar officially supports Python 2.7 & 3.4–3.6

Installation

To install HateSonar, simply use pip:

$ pip install hatesonar

Reference

Thomas Davidson, Dana Warmsley, Michael Macy, and Ingmar Weber. 2017. "Automated Hate Speech Detection and the Problem of Offensive Language." ICWSM.