HateFlow can detect and classify inappropriate comments. It is available using an API documented here.
(tested on Ubuntu 20.04 and Python 3.8)
cd hateflow
pip3 install -r requirements.txt --no-cache-dir
python3 train.py
python3 get_accuracy.py
This section assumes an installation at /var/hateflow.
sudo mkdir /var/www/nltk_data
sudo mkdir /var/www/gensim-data
sudo chown www-data:www-data /var/www/*data
Apache has to be set up according to the system specific requirements.
<VirtualHost *:80>
ServerName example.org
ServerAdmin [email protected]
WSGIDaemonProcess hateflow user=www-data group=www-data threads=5 home=/var/hateflow/
WSGIScriptAlias / /var/hateflow/main.wsgi
<Directory /var/hateflow/>
WSGIProcessGroup hateflow
WSGIApplicationGroup %{GLOBAL}
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>