Skip to content

A small solution for targeting Homophobic and Sexist Tweets to be reported to Twitter by Data For Good, Israel.

License

Notifications You must be signed in to change notification settings

DataforGoodIsrael/DetectHateSpeech

Repository files navigation

Detect Hate Speech

A small solution for targeting Homophobic and Sexist Tweets to be reported to Twitter by Data For Good, Israel.

We merge multiple dataset:

A Text Classification Model using a Calibrated SGD model and TF-IDF features.

We are using Streamlit for this tool.

cd DetectHateSpeech
streamlit run webapp/webapp.py

For the webapp to work on heroku, 3 files are added: Procfile, runtime.txt and setup.sh.

You can access to the live webapp here.

webapp/example.png

            precision    recall  f1-score   support

homophobia       0.88      0.82      0.85        17
      none       0.93      0.98      0.95      4949
    sexism       0.84      0.53      0.65       836

 micro avg       0.92      0.92      0.92      5802
 macro avg       0.88      0.78      0.82      5802
 weighted avg       0.91      0.92      0.91      5802

pip install -r requirements.txt

Author and current maintainer are the Data For Good Team.

You are more than welcome to approach us for help and contributions are very welcomed!

You can find our research notebook here.

We tried different methods to tackle this problem: Word2Vec, Transformers, NN.

To be continued...

  • Collect more data with less biased labelling.
  • Use this article: Sai Saketh Aluru, Binny Mathew, Punyajoy Saha and Animesh Mukherjee. "Deep Learning Models for Multilingual Hate Speech Detection". https://arxiv.org/pdf/2004.06465.pdf. We used it in the research part, let's implement it!
  • Working on the improving the model infrastructure.
  • Creating a way to integrate our model and WebApp with Twitter or other system for social media moderators (Add-On, API)

Clone:

git clone https://github.com/DataforGoodIsrael/DetectHateSpeech.git

Created by Jeremy Atia and Samuel Jefroykin from Data For Good Israel.

Contact us at hello@dataforgoodisrael.com

About

A small solution for targeting Homophobic and Sexist Tweets to be reported to Twitter by Data For Good, Israel.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published