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
if match(syllable, consonant .. "$") or match(syllable, "ː$") then weight[i] = "h"
if match(syllable, consonants .. "$") or match(syllable, "ː$") then weight[i] = "h"
elseif match(syllable, DIPHTHONG .. vowel .. "$") then weight[i] = "h"
elseif match(syllable, DIPHTHONG .. vowels .. "$") then weight[i] = "h"
else weight[i] = "l"
else weight[i] = "l"
end
end