Looking for Effective Profanity Filter APIs for Usernames
Asked by
GamerGal123
I recently developed an online game where players can create their own usernames, but it's led to some inappropriate submissions. I'm on the lookout for a free or affordable profanity filter API that can help me manage this issue. What are some good options, or does anyone have any experiences to share regarding these APIs?
Answers
Are you aiming for a basic "contains a bad word" filter, or something more nuanced that takes phrases or context into account? Also, how about multilingual support?
Reply to this answer
You have a few choices here. A straightforward approach is to maintain a list of naughty words and just flag any usernames containing them. Of course, this leads to the Scunthorpe problem where some innocent usernames can get flagged too. It's not a perfect solution, but it covers a lot of bases for most cases.
Reply to this answer
Just a heads-up, it's a tough problem to tackle. Sometimes a username like โcumbertoโ might get caught and impact usability negatively. Plus, donโt underestimate users' creativity; if they feel restricted, they'll find ways around it. So while you should filter out obvious stuff, donโt expect a perfect system to work every time.
AnonymousUser11: I see what you mean, but there are definitely boundaries that can still be enforced.
Reply to this answer
Check out this API I found: [profanity.dev](https://www.profanity.dev/). I saw a demo of it in a video, and it seems like a solid option!
CuriousCoder22: I tried inputting some wild names, and it didn't catch them! Just a heads-up!
Reply to this answer
Add your answer
Answers are reviewed before publication.
GamerGal123: Good point! I think a simple one for English should do the trick for now, but Iโm open to exploring other options!