Module:qhv-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 41: Line 41:
end
end
local a, p, antepenult, penult= weight[#weight-2], weight[#weight-1], syllables[#syllables-2], syllables[#syllables-1]
local a, p = weight[#weight-2], weight[#weight-1]
local antepenult, penult =  syllables[#syllables-2], syllables[#syllables-1]
if p == "l" and a == "l" then penult = "ˈ" .. penult
if p == "l" and a == "l" then penult = "ˈ" .. penult
elseif p == "h" then penult = "ˈ" .. penult
elseif p == "h" then penult = "ˈ" .. penult
elseif p == "l" and a == "h" then antepenult = "ˈ" .. antepenult
elseif p == "l" and a == "h" then antepenult = "ˈ" .. antepenult
elseif p == nil then syllables[#syllables] = "ˈ" .. syllables[#syllables]
elseif p == nil then syllables[#syllables] = "ˈ" .. syllables[#syllables]
elseif p and a == nil then penult = "ˈ" .. penult
else penult = "ˈ" .. penult end
else penult = "ˈ" .. penult end