Module:siwa-noun: Difference between revisions

No edit summary
No edit summary
Line 40: Line 40:
local n = syll_count(word)
local n = syll_count(word)
stressed = dedigraphicize(stressed)
stressed = dedigraphicize(stressed)
if (match(stressed, vowels .. vowels .. vowels .. "?") or match(mw.ustring.toNFD(stressed), HOOK)) or n>=3 then
if (match(stressed, vowels .. vowels .. vowels .. "?") or match(mw.ustring.toNFD(stressed), HOOK)) and n<3 then
return "l" -- long nouns
elseif (match(stressed, vowels .. vowels .. vowels .. "?") or match(mw.ustring.toNFD(stressed), HOOK)) or n>=3 then
return "w" -- weak nouns
return "w" -- weak nouns
elseif (match(stressed, vowels .. vowels .. vowels .. "?") or match(mw.ustring.toNFD(stressed), HOOK)) and n<3 then
return "l" -- long nouns
else return "s" -- strong nouns
else return "s" -- strong nouns
end  
end