Skip to content

KERM-HATE push forward the research on how syntactic information can be used to de-bias hate speech recognizers and so to contribute to solve problems of prejudice.

License

Notifications You must be signed in to change notification settings

ART-Group-it/HateSpeechKermit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kermit as hate speech recognizer (KERM-HATE) 🐸 🤬

Paper Release Twitter

This notebook contains all the helpful instructions for generating and training Kermit as hate speech recognizer.

Index

  1. What about KERM-HATE
  2. Model architecture
  3. Available datasets and generated datasets
  4. Usability
  5. How to cite us

What about KERM-HATE

In this GitHub we present KERM-HATE : a hate speech recognizer that exploits syntax to highlight, given a sentence, the key points that triggered the classification in a certain class. KERM-HATE exploits BERT trasnformer model for sequence classification flanked by a KERMIT component. An example of our output - present in our paper - is the following:

Model architecture

The architecture of the model is defined in the following image

Available datasets and generated datasets

The Datasets folder includes:

  1. The Davidson dataset
  2. The Election_datasets.zip : a corpus heavily used within our paper and generated by Manch Hui in his Kaggle repository. In detail, the .zip file consists of:
    • Democratic dataset
    • GOP dataset
  3. The InstagramChromeDriver.ipynb is a jupyter notebook to is an easy tool to convert Instagram public-posts into pandas dataframes using ChromeDriver. To learn more about it go to its dedicated GitHub repository.

Usability

This GitHub repository is divided into the following files and folders:

Kermit as hate speech recognizer.ipynb          <-- KERM-HATE model and how to train and use it
Datasets
├── Davidson_dataset.csv                        <-- the original Davidson dataset 
├── Election_datasets.zip                       <-- zip file contains the Democratic and the GOP dataset
└── InstagramChromeDriver.ipynb                 <-- Scaprer Instagram comments

To visualize the activation trees, we use the GitHub repository of the basic version of KERMIT

How to cite us

You can cite us via Twitter or using BibTeX citation formatting

@article{10.7717/peerj-cs.859,
 title = {Syntax and prejudice: ethically-charged biases of a syntax-based hate speech recognizer unveiled},
 author = {Mastromattei, Michele and Ranaldi, Leonardo and Fallucchi, Francesca and Zanzotto, Fabio Massimo},
 year = 2022,
 month = feb,
 keywords = {Hate speech, Explainability, Bias, Neural networks, Syntax},
 volume = 8,
 pages = {e859},
 journal = {PeerJ Computer Science},
 issn = {2376-5992},
 url = {https://doi.org/10.7717/peerj-cs.859},
 doi = {10.7717/peerj-cs.859}
}