No description
Find a file
2021-05-13 08:22:56 +09:00
.github/workflows Create codeql-analysis.yml 2020-10-02 10:55:00 +09:00
data Remove model dir 2018-01-26 22:06:47 +09:00
docs Add image for doc 2018-01-26 20:51:00 +09:00
hatesonar Update model and preprocessor 2020-07-02 10:59:47 +09:00
notebooks Delete requirements.txt in notebooks 2018-09-12 10:56:17 +09:00
server Add google analytics 2018-09-12 20:31:03 +09:00
tests Add get_weight method for visualization 2018-09-13 14:32:09 +09:00
.gitignore Add project boilerplate 2018-01-26 18:13:12 +09:00
LICENSE Add project boilerplate 2018-01-26 18:13:12 +09:00
MANIFEST.in Update MANIFEST.in to include model and preprocessor 2020-07-02 11:14:34 +09:00
Procfile Add Procfile 2018-09-12 10:39:41 +09:00
README.md Update README.md 2020-07-08 22:10:08 +09:00
requirements.txt Update numpy from 1.20.2 to 1.20.3 2021-05-12 00:38:05 +09:00
setup.py Update MANIFEST.in to include model and preprocessor 2020-07-02 11:14:34 +09:00
tox.ini Support python 2.7 2018-02-22 20:51:47 +09:00

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.

BERT based model

Feature Support

  • Hate speech and offensive language detection

HateSonar officially supports Python 2.7 & 3.43.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.