This is a hate speech detection algorithm using bag of words approach and linear regression model.
Dataset is provided by: UCSC LTRL.
Sinhala stopwords and suffixes reference: http://ltrl.ucsc.lk/download-3
You can use any dataset and apply the algorithm.