Skip to content

Commit d95a13b

Browse files
committed
add
1 parent 672bc66 commit d95a13b

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

python/generate-syllables.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
import itertools
3+
4+
C = """
5+
c, d, f, h, k, l, m, n, p, q, r, s, t, v, x, y, z,
6+
ch, dh, hl, hm, hn, kh, ml, nc, nk, np, nq, nr, nt, ny, ph, pl, qh, rh, th, ts, tx, xy,
7+
hml, hny, nch, nkh, nph, npl, nqh, nrh, nth, nts, ntx, plh, tsh, txh,
8+
nplh, ntsh, ntxh
9+
""".strip()
10+
11+
V = """
12+
a, e, i, o, u, w,
13+
ai, au, aw, ee, ia, oo, ua
14+
""".strip()
15+
16+
T = """
17+
j, s, v, m, g, b, _
18+
""".strip()
19+
20+
C = [c.strip() for c in C.split(',')]
21+
V = [v.strip() for v in V.split(',')]
22+
T = [t.strip() for t in T.split(',')]
23+
24+
print(f'C = {len(C)}, V = {len(V)}, T = {len(T)}')
25+
26+
CV = [f'{c}{v}' for c, v in itertools.product(C, V)]
27+
for cv in CV:
28+
cvt = [f'{cv}{t}'.replace('_', '') for cv, t in itertools.product([cv], T)]
29+
cvt = ', '.join(cvt)
30+
print(cvt)
31+
32+
for v in V:
33+
vt = [f'{v}{t}'.replace('_', '') for v, t in itertools.product([v], T)]
34+
vt =', '.join(vt)
35+
print(vt)

0 commit comments

Comments
 (0)