1 """
2 This module has a function to generate a latim like name, but not latim at all
3 """
4
5 from string import upper
6 from random import choice
7
8
9 VOG = 'a e i o u ae ia au io oi'.split()
10
11
12 CONS = 'b c d e f g h j l m p q r s t v x z pr gr st fr dr ph br'.split()
13
14
15 MIDCONS = 'mm pp cc tt mn rs ll'.split()
16
17
18 TERM = 'um em'.split()
19
21 """
22 Creates a latim like name with N sylabes.
23 """
24 word = ''
25 vog = choice([True, False])
26 for x in xrange(sil-1):
27 word += choice(VOG) if vog else choice(CONS+MIDCONS if x>0 else CONS)
28 vog = not vog
29
30 if not vog:
31 word += choice(CONS + MIDCONS)
32
33 word += choice(TERM) if choice([True, False]) else choice(VOG)
34
35 return upper(word[0]) + word[1:]
36