Module:qhv-noun: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 36: Line 36:
return decl, {sub(word, 1, -(#endings_reverse[decl] + 1))}
return decl, {sub(word, 1, -(#endings_reverse[decl] + 1))}
else
else
if find(word, "[aeiouyā]?[aeiouyāēīōūȳ].$") and require("Module:qhv-pron").write_stress(word, true) == 1 then
return "3-s-h", {sub(word, 1, -2)}
end
for ending, decl in pairs(endings) do
for ending, decl in pairs(endings) do
if find(word, ending .. "$") then
if find(word, ending .. "$") then
return decl, {sub(word, 1, -(#ending + 1))}
return decl, {sub(word, 1, -(#ending + 1))}
end
end
end
return "6", {word} end
-- No matches, now look for 3-s-h
if find(word, "[aeiouyā]?[aeiouyāēīōūȳ]s$") then
return "3-s-h", {sub(word, 1, -2)}
else return "6", {word} end
end
end
end
end