Module:qhv-verb: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 21: Line 21:
["[bdg]"] = "voiced-stop",
["[bdg]"] = "voiced-stop",
["lj"] = "palatal", ["ñ"] = "palatal",
["lj"] = "palatal", ["ñ"] = "palatal",
["[aeiou]"] = "vowel",
["[hszvj]"] = "fricative", ["gh"] = "fricative",
["[hszvj]"] = "fricative", ["gh"] = "fricative",
}
}


function export.detect_decl(word, class)
function export.detect_decl(word, class)
local root = sub(word, 1, -4)
local root, tv = sub(word, 1, -5), sub(word, -4, -4)
if class then
if class then
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(root, "[eiou]$") or m_data.astems[word] then return "vowel", {sub(root, 1, -2)}
elseif find(vt, "[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