Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I keep from generating inappropriate words when autogenerating strings from an alphabet?

Is there a downloadable dictionary (essentially just a textfile) that contains common swear or otherwise inappropriate words in different languages?

Background: I'm rewriting an URL Shortener (Just a Proof of Concept app - the world has enough shorteners already anyway) and for that I convert Numeric IDs into Strings by Base36 encoding them. Now the problem with that approach is that it's sequential, so the unlucky people who shorten the URL that comes after faf or fucj may not be happy with their results, unless they are precisely waiting for that moment and use it to shorten the URL of their favorite Politician.

So I want a blacklist. InsultMonger doesn't really help here.

How appropriate. You fight like a cow.

like image 813
Michael Stum Avatar asked Dec 17 '22 03:12

Michael Stum


2 Answers

Just remove all the vowels (and Y) from your potential alphabet, then anyone who sees a swear word must have an overactive imagination.

like image 57
tvanfosson Avatar answered Dec 29 '22 08:12

tvanfosson


Here's a large multilingual list: http://nerdcereal.com/blog/wp-content/uploads/2007/04/multilingualswearlist.txt

like image 45
al.stevens Avatar answered Dec 29 '22 07:12

al.stevens