Module:qhv-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 39: Line 39:
syllables = split(term, "·")
syllables = split(term, "·")
for i, syllable in ipairs(syllables) do
for i, syllable in ipairs(syllables) do
weight[i] = match(syllable, "[aeiouy" .. NONSYLLABIC .. "]$") and "l" or "h"
if match(syllable, consonant .. "$") or match(syllable, "ː$") then weight[i] = "h"
elseif match(syllable, DIPHTHONG .. vowel .. "$") then weight[i] = "h"
else weight[i] = "l"
end
end
end