Module:mg-noun: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 19: Line 19:


local function detect_decl(word)
local function detect_decl(word)
if word:match("[aeorá]$") then
if word:match("[aeoá]$") then
return sub(word, -1, -1) -- last letter
return sub(word, -1, -1) -- last letter
elseif word:match("n$") then
elseif word:match("n$") then
return "nt"
return "nt"
else
else
return "consonant"
return "cons"
end
end
end
end