Module:qhv-headword: Difference between revisions
No edit summary |
No edit summary |
||
| Line 41: | Line 41: | ||
local function detect_gender(word) | local function detect_gender(word) | ||
local ending = sub(word, -1) | local ending = sub(word, -1) | ||
if | if find(word, "[aeioy]$") then | ||
return "lun" | return "lun" | ||
elseif ending == "r" then | elseif ending == "r" then | ||
| Line 49: | Line 49: | ||
elseif ending == "n" then | elseif ending == "n" then | ||
return "ter" | return "ter" | ||
else return "?" | else return "?" end | ||
end | end | ||