r/learnpython • • Dec 10 '20

Python library for detecting hate speech?

I’ve been writing a discord bot over the course of this year and a new functionality I want to add is a check for hate speech. I’m currently using better-profanity, but that treats regular profanity and hate speech as the same, which is not ideal, I’d like users to still be able to send profane messages, just not offensive ones. The other library I’ve tried is HateSonar however, if the user attempts to bypass the filter by using numbers, it no longer works. Even in the example code at the link above, it only has a confidence of 60% for a word that is incredibly offensive. My google-fu is failing me and I was hoping you guys may have some suggestions. Thank you!

0 Upvotes

4 comments sorted by

View all comments

-1

u/[deleted] Dec 10 '20

[removed] — view removed comment

2

u/Hayden2332 Dec 10 '20

Profane AND offensive. Sorry I don’t want people using slurs