Module:qhv-verb: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 29: Line 29:
local decl = class
local decl = class
return decl, {sub(root, 1, (sub(root, -2) == ("lj" or "gh") and -3 or -2))}
return decl, {sub(root, 1, (sub(root, -2) == ("lj" or "gh") and -3 or -2))}
elseif find(tv, "[eiou]") or m_data.astems[word] then return "vowel", {root}
elseif find(tv, "[eiou]") or m_data.astems[word] then
return "vowel", {root}
else
else
for ending, decl in pairs(endings) do
for ending, decl in pairs(endings) do
if find(sub(root, 1, -2), ending .. "$") then
if find(root, ending .. "$") then
return decl, {sub(root, 1, -(#ending + 1))}
return decl, {sub(root, 1, -(#ending + 1))}
end
end