codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
# Dumb Random Word Name Generator (Not even english) # Author: mofosyne import re, random # Import random generator, and regular expressions engine random.seed() # Generate a psudorandom engine that is seeded with a random seed in_str = "cha ta ga the hen dra ou vich da sen eh tou na ra sen liz bou ism " # This is the phoneme input strings to jumble together phon_list = re.split(" ", in_str ) # Split the phoneme string into an array of individual phoneme for e in range(0,100): # Let's generate 100 random looking words/name ! name = "" # Let's initialise an empty name container w = random.randint(2,4) # Let's randomise the number of phonemes in a name for i in range(0,w): # Let's LOOP over the number of phonemes we need for this name z = random.randint(0,len(phon_list)-1) # Let's pick a random number within the phoneme array name += phon_list[z] # Let's append the selected phoneme to the name. print(name) # Display the generated name and move to next name (or exit name generation loop).
Private
[
?
]
Run code
Submit