45,647
edits
No edit summary |
Tag: Undo |
||
Line 34: | Line 34: | ||
local pattern = "(" .. consonants .. "*".. vowels .. "*" .. consonants .. "-)" | local pattern = "(" .. consonants .. "*".. vowels .. "*" .. consonants .. "-)" | ||
local weight = {} | local weight = {} | ||
term = | term = gsub(term, pattern, "·%1") | ||
term = gsub(term, "^·", "") | |||
term = gsub(term, "·(" .. consonants .. ")·", "·%1") | |||
term = gsub(term, "·(" .. consonants .. ")$", "%1") | |||
term = gsub(term, "·(" .. consonants .. ")(" .. consonants .. ")", "%1·%2") | |||
term = gsub(term, "([ptkbdɡ])·([rlṛsz])", "·%1%2") | |||
term = gsub(term, "·(" .. consonants .. "?" .. consonants .. ")$", "%1") | |||
term = gsub(term, "·$", "") | |||
local syllables = split(term, "·") | local syllables = split(term, "·") |