45,647
edits
No edit summary |
No edit summary |
||
Line 16: | Line 16: | ||
local endings = { | local endings = { | ||
["[lr]"] = "liquid", | ["[lr]a"] = "liquid", | ||
["[ptkq]"] = "voiceless-stop", | ["[ptkq]a"] = "voiceless-stop", | ||
["[mn]"] = "nasal", | ["[mn]a"] = "nasal", | ||
["[bdg]"] = "voiced-stop", | ["[bdg]a"] = "voiced-stop", | ||
[" | ["lja"] = "palatal", ["ña"] = "palatal", | ||
["[aeiou] | ["[aeiou]"] = "vowel", | ||
["[^l][hszvj]"] = "fricative", [" | ["[^l][hszvj]a"] = "fricative", ["gha"] = "fricative", | ||
} | } | ||
function export.detect_decl(word, class) | function export.detect_decl(word, class) | ||
local root = sub(word, 1, - | local root = sub(word, 1, -4) | ||
if class then | if class then | ||
local decl = class | local decl = class | ||
Line 35: | Line 35: | ||
if find(root, ending .. "$") then | if find(root, ending .. "$") then | ||
return decl, {sub(root, 1, -(#ending + 1))} | return decl, {sub(root, 1, -(#ending + 1))} | ||
else return "fricative", {root} | else return "fricative", {root} | ||
end | end |