Module:rad-IPA: Difference between revisions

m
Combined stress conditions
No edit summary
m (Combined stress conditions)
Line 1,280: Line 1,280:
error("The working word is empty")
error("The working word is empty")
elseif #working_word == 1 then -- monosyllabic?
elseif
stress(1)
#working_word == 1 or -- monosyllabic?
working_word[1]["long"] -- long initial
elseif working_word[1]["long"] then
then
stress(1)
stress(1)
Line 1,295: Line 1,295:
elseif #working_word == 3 then -- trisyllabic?
elseif #working_word == 3 then -- trisyllabic?
if working_word[2]["long"] then -- condition 2
if
stress(2)
working_word[2]["long"] or -- condition 2
elseif (not working_word[2]["weak"]) and working_word[2]["checked"] then -- condition 3
((not working_word[2]["weak"]) and working_word[2]["checked"]) -- condition 3
then
stress(2)
stress(2)
else
else
Line 1,305: Line 1,306:
elseif #working_word >= 4 then -- 4+ syllables
elseif #working_word >= 4 then -- 4+ syllables
if working_word[2]["long"] then -- condition 4
if
stress(2)
working_word[2]["long"] or -- condition 4
elseif working_word[2]["checked"] then -- condition 5
working_word[2]["checked"] or -- condition 5
stress(2)
not working_word[3]["long"] -- condition 6
elseif not working_word[3]["long"] then -- condition 6
then
stress(2)
stress(2)
else
else