45,646
edits
No edit summary |
No edit summary |
||
Line 62: | Line 62: | ||
local function syllabify(term) | local function syllabify(term) | ||
local syllable = "(" .. consonants .. "*)(" .. vowels .. "ː?)(" .. consonants .. "-)" | local syllable = "(" .. consonants .. "*)(" .. vowels .. "ː?)(" .. consonants .. "-)" | ||
Line 79: | Line 78: | ||
local syllables = split(term, "·") | local syllables = split(term, "·") | ||
if | if term:match("'") then | ||
syllables | for _, s in ipairs(syllables) do | ||
s = s:gsub("'", "ˈ") | |||
end | |||
elseif #syllables > 1 then | elseif #syllables > 1 then | ||
syllables[#syllables - 1] = "ˈ" .. syllables[#syllables - 1] -- penultimate stress | syllables[#syllables - 1] = "ˈ" .. syllables[#syllables - 1] -- penultimate stress |