Module:kilta-pron: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 62: Line 62:


local function syllabify(term)
local function syllabify(term)
local iskolan = term == "kolán"
local syllable = "(" .. consonants .. "*)(" .. vowels .. "ː?)(" .. consonants .. "-)"
local syllable = "(" .. consonants .. "*)(" .. vowels .. "ː?)(" .. consonants .. "-)"
Line 79: Line 78:
local syllables = split(term, "·")
local syllables = split(term, "·")
if iskolan then
if term:match("'") then
syllables[#syllables] = "ˈ" .. syllables[#syllables] -- ultimate stress
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

Navigation menu