Module:qlu-pron: Difference between revisions
No edit summary |
No edit summary |
||
| Line 56: | Line 56: | ||
local function syllabify(word) | local function syllabify(word) | ||
word = gsub( | word = word:gsub("(" .. consonants .. "?" .. consonants .. "?" .. consonants .. "?" .. vowels .. "?" .. vowels .. vowels .. "?" .. consonants .. "?" .. consonants .. "?)", "·%1·") | ||
word = word:gsub("^·", "") | |||
word = word:gsub("·$", "") | |||
local syllables = split(word, "·"); | local syllables = split(word, "·"); | ||
if #syllables ~= 1 then | if #syllables ~= 1 then | ||
syllables[#syllables - 1] = "ˈ" .. syllables[#syllables - 1] | |||
end | end | ||