45,647
edits
No edit summary |
No edit summary |
||
Line 61: | Line 61: | ||
local function syllabify(term) | local function syllabify(term) | ||
term = gsub(term, "(" .. consonants .. "*)(" .. vowels .. "*)", "%1%2·") | term = gsub(term, "(" .. consonants .. "*)(" .. vowels .. "*)", "%1%2·") | ||
term = gsub(term, "··", "·"); term = gsub(term, "·$", "") | term = gsub(term, "··", "·"); term = gsub(term, "·$", ""); term = gsub(term, "^·", "") | ||
term = gsub(term, "·(" .. consonants .. ")(" .. consonants .. ")(" .. vowels .. "*)", "%1·%2%3") | term = gsub(term, "·(" .. consonants .. ")(" .. consonants .. ")(" .. vowels .. "*)", "%1·%2%3") | ||
term = gsub(term, "·(" .. consonants .. ")$", "%1") | term = gsub(term, "·(" .. consonants .. ")$", "%1") | ||
Line 80: | Line 80: | ||
end | end | ||
end | end | ||
return table.concat(syllables, "·") | return table.concat(syllables, "·") | ||
end | end |