Friday, December 30, 2011

Pattern Based Name Generator

Every once in a while, you start a new project, develop a new product or do something else for what you need to make up a new name. Well you could just use a random number generator to spit out random ASCII codes, but chances are, that you can't even pronounce the result.

Therefore I wrote a small JavaScript, which uses a slightly different approach: You enter a name or a pattern which sounds nice to your ears and the script will generate new names based on the vocal/consonant pattern given.

You can find and directly use the script as one of my GitHub-Projects: http://andyha.github.com/NameGenerator/ As an example, let's use "opodo". Using this as input, the generated names will look like:
ovaco
ifiwu
oduhe
acabo
ehalu
ileda
ejulu
uhuyo
akadu
ekahu
Well, that's probably not what we expacted. Maybe we want, the three o characters (the first, third and last character) the be the same. Therefore we can uppercase those. The pattern generator only assigns a single character per name for a given uppercase character. "OpOdO" will lead to something like:
eqeje
ocono
axaka
ulubu
uqusu
okoro
isiti
uvupu
ocogo
ujumu
That's better, but maybe we really want this first "p" not to be replaced with anything. Therefore we prefix this with a $ sign: "O$pOdO" and get:
ipimi
ipipi
ipiri
apaha
apava
upuzu
apaca
apada
apaka
apaya
That's basically it. You still have to tweak the pattern and need some patience to find a good result, but for me, it's a good starting point.

Long story short - here are the rules:
  • Each lowercase vocal will be replaced by a random vocal 
  • Each lowercase consonant will be replaced by a random consonant 
  • Each uppercase vocal will be replaced by a vocal which is randomly chosed once per generated name 
  • Each uppercase consonant will be replaced by a consonant which is randomly chosed once per generated name 
  • Each character which is prefixed with a $ sign is directly used as output and not replaced. 
Have fun using the tool and let me know if you found and used a generated name...