All pastes #427427 Raw Edit

Untitled

public python v1 · immutable
·published 2007-04-06 19:40 UTC
rendered paste body
import Systemrandom = System.Random()XHYLLABLES = [    "xh*", "l", "d*zhk", "m*z", "*r*", "n*x", "d*l", "m*x",    "*", "kh*", "r*", "ll*n", "*x", "z*", "ll**", "r*n", "**",    "z*l", "k*"]XHYVOWELS = "yaiaayeiayaoaaiaaiiaa";def randomXhyName(l):    global XHYLLABLES, XHYVOWELS, random    preResult = ""    while 1:        potentials = []        for x in XHYLLABLES:            if len(x) < l:                potentials.append(x)        if len(potentials) == 0:            break        selected = potentials[random.Next() % len(potentials)]        l = l - len(selected)        preResult = preResult + selected    result = ""    for c in preResult:        if c == '*':            result = result + XHYVOWELS[random.Next() % len(XHYVOWELS)]        else:            result = result + c    return result