Module:qay-verb/data: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(6 intermediate revisions by the same user not shown) | |||
Line 26: | Line 26: | ||
local stem = args[1] | local stem = args[1] | ||
local s1 = sub(stem, 1, -2) | local s1 = sub(stem, 1, -2) | ||
local f2 = sub(stem, 1, 2) | |||
data.decl_type = "vocalic" | data.decl_type = "vocalic" | ||
Line 62: | Line 63: | ||
data.forms["imperative"] = {s1 .. "u"} | data.forms["imperative"] = {s1 .. "u"} | ||
data.forms["hortative"] = {s1 .. "u-" .. s1 .. "u"} | data.forms["hortative"] = {s1 .. "u-" .. s1 .. "u"} | ||
data.forms["iterative"] = { | data.forms["iterative"] = {f2 .. "-" .. stem .. "-"} | ||
data.forms["participle"] = {stem .. "yam"} | data.forms["participle"] = {stem .. "yam"} | ||
end | end | ||
Line 75: | Line 76: | ||
local stem = args[1] | local stem = args[1] | ||
local s1 = sub(stem, 1, -2) | local s1 = sub(stem, 1, -2) | ||
local f2 = sub(stem, 1, 2) | |||
data.decl_type = "vocalic" | data.decl_type = "vocalic" | ||
Line 111: | Line 113: | ||
data.forms["imperative"] = {s1 .. "u"} | data.forms["imperative"] = {s1 .. "u"} | ||
data.forms["hortative"] = {s1 .. "u-" .. s1 .. "u"} | data.forms["hortative"] = {s1 .. "u-" .. s1 .. "u"} | ||
data.forms["iterative"] = {s1 .. "-" .. stem} | data.forms["iterative"] = {f2 .. "-" .. stem .. "-"} | ||
data.forms["participle"] = {stem .. "yam"} | |||
end | |||
}) | |||
d["c"] = { | |||
params = { | |||
[1] = {}, | |||
}, | |||
} | |||
setmetatable(d["c"], {__call = function(self, args, data) | |||
local stem = args[1] | |||
local s1 = sub(stem, 1, -2) | |||
local f2 = sub(stem, 1, 2) | |||
local pal = stem:gsub("t$", "c"):gsub("([^n])g$", "%1j") | |||
data.decl_type = "monoconsonantal" | |||
if not data.no_cat then | |||
table.insert(data.categories, "Ayeri " .. data.decl_type .. " verbs") | |||
end | |||
data.forms["top_1_s"] = {stem .. "ay"} | |||
data.forms["top_2_s"] = {stem .. "va"} | |||
data.forms["top_3_s_m"] = {(pal ~= stem and pal or stem .. "y") .. "a"} | |||
data.forms["top_3_s_f"] = {(pal ~= stem and pal or stem .. "y") .. "e"} | |||
data.forms["top_3_s_n"] = {(pal ~= stem and pal or stem .. "y") .. "o"} | |||
data.forms["top_3_s_in"] = {stem .. "ara"} | |||
data.forms["cli_1_s"] = {(pal ~= stem and pal or stem .. "y") .. "ang"} | |||
data.forms["cli_2_s"] = {stem .. "vāng"} | |||
data.forms["cli_3_s_m"] = {(pal ~= stem and pal or stem .. "y") .. "āng"} | |||
data.forms["cli_3_s_f"] = {(pal ~= stem and pal or stem .. "y") .. "eng"} | |||
data.forms["cli_3_s_n"] = {(pal ~= stem and pal or stem .. "y") .. "ong"} | |||
data.forms["cli_3_s_in"] = {stem .. "reng"} | |||
data.forms["top_1_p"] = {stem .. "ayn"} | |||
data.forms["top_2_p"] = {stem .. "va"} | |||
data.forms["top_3_p_m"] = {(pal ~= stem and pal or stem .. "y") .. "an"} | |||
data.forms["top_3_p_f"] = {(pal ~= stem and pal or stem .. "y") .. "en"} | |||
data.forms["top_3_p_n"] = {(pal ~= stem and pal or stem .. "y") .. "on"} | |||
data.forms["top_3_p_in"] = {stem .. "aran"} | |||
data.forms["cli_1_p"] = {stem .. "nang"} | |||
data.forms["cli_2_p"] = {stem .. "vāng"} | |||
data.forms["cli_3_p_m"] = {stem .. "tang"} | |||
data.forms["cli_3_p_f"] = {stem .. "teng"} | |||
data.forms["cli_3_p_n"] = {stem .. "tong"} | |||
data.forms["cli_3_p_in"] = {stem .. "teng"} | |||
data.forms["imperative"] = {stem .. "u"} | |||
data.forms["hortative"] = {stem .. "u-" .. stem .. "u"} | |||
data.forms["iterative"] = {f2 .. "-" .. stem .. "-"} | |||
data.forms["participle"] = {(pal ~= stem and pal or stem .. "y") .. "am"} | |||
end | |||
}) | |||
d["2c"] = { | |||
params = { | |||
[1] = {}, | |||
}, | |||
} | |||
setmetatable(d["2c"], {__call = function(self, args, data) | |||
local stem = args[1] | |||
local s1 = sub(stem, 1, -2) | |||
local f2 = sub(stem, 1, 2) | |||
data.decl_type = "biconsonantal" | |||
if not data.no_cat then | |||
table.insert(data.categories, "Ayeri " .. data.decl_type .. " verbs") | |||
end | |||
data.forms["top_1_s"] = {s1 .. "ay"} | |||
data.forms["top_2_s"] = {stem .. "ava"} | |||
data.forms["top_3_s_m"] = {stem .. "ya"} | |||
data.forms["top_3_s_f"] = {stem .. "ye"} | |||
data.forms["top_3_s_n"] = {stem .. "yo"} | |||
data.forms["top_3_s_in"] = {s1 .. "ara"} | |||
data.forms["cli_1_s"] = {stem .. "yang"} | |||
data.forms["cli_2_s"] = {stem .. "avāng"} | |||
data.forms["cli_3_s_m"] = {stem .. "yāng"} | |||
data.forms["cli_3_s_f"] = {stem .. "yeng"} | |||
data.forms["cli_3_s_n"] = {stem .. "yong"} | |||
data.forms["cli_3_s_in"] = {stem .. "areng"} | |||
data.forms["top_1_p"] = {s1 .. "ayn"} | |||
data.forms["top_2_p"] = {stem .. "ava"} | |||
data.forms["top_3_p_m"] = {stem .. "yan"} | |||
data.forms["top_3_p_f"] = {stem .. "yen"} | |||
data.forms["top_3_p_n"] = {stem .. "yon"} | |||
data.forms["top_3_p_in"] = {s1 .. "aran"} | |||
data.forms["cli_1_p"] = {stem .. "anang"} | |||
data.forms["cli_2_p"] = {stem .. "avāng"} | |||
data.forms["cli_3_p_m"] = {stem .. "atang"} | |||
data.forms["cli_3_p_f"] = {stem .. "ateng"} | |||
data.forms["cli_3_p_n"] = {stem .. "atong"} | |||
data.forms["cli_3_p_in"] = {stem .. "ateng"} | |||
data.forms["imperative"] = {stem .. "u"} | |||
data.forms["hortative"] = {stem .. "u-" .. stem .. "u"} | |||
data.forms["iterative"] = {f2 .. "-" .. stem .. "-"} | |||
data.forms["participle"] = {stem .. "yam"} | data.forms["participle"] = {stem .. "yam"} | ||
end | end |
Latest revision as of 20:36, 29 June 2023
Documentation for this module may be created at Module:qay-verb/data/doc
local sub = mw.ustring.sub
local gsub = mw.ustring.gsub
local match = mw.ustring.match
local m_table = require('Module:table')
local function llet(s, pattern)
return match(s, "[" .. pattern .. "]$")
end
local function long(v)
local switch = {
["a"] = "ā", ["e"] = "ē", ["i"] = "ī", ["o"] = "ō", ["u"] = "ū",
}
return switch[v] or v
end
local d = {}
d["v"] = {
params = {
[1] = {},
},
}
setmetatable(d["v"], {__call = function(self, args, data)
local stem = args[1]
local s1 = sub(stem, 1, -2)
local f2 = sub(stem, 1, 2)
data.decl_type = "vocalic"
if not data.no_cat then
table.insert(data.categories, "Ayeri " .. data.decl_type .. " verbs")
end
data.forms["top_1_s"] = {stem .. "ay"}
data.forms["top_2_s"] = {stem .. "va"}
data.forms["top_3_s_m"] = {stem .. "ya"}
data.forms["top_3_s_f"] = {stem .. "ye"}
data.forms["top_3_s_n"] = {stem .. "yo"}
data.forms["top_3_s_in"] = {stem .. "ara"}
data.forms["cli_1_s"] = {stem .. "yang"}
data.forms["cli_2_s"] = {stem .. "vāng"}
data.forms["cli_3_s_m"] = {stem .. "yāng"}
data.forms["cli_3_s_f"] = {stem .. "yeng"}
data.forms["cli_3_s_n"] = {stem .. "yong"}
data.forms["cli_3_s_in"] = {stem .. "reng"}
data.forms["top_1_p"] = {stem .. "ayn"}
data.forms["top_2_p"] = {stem .. "va"}
data.forms["top_3_p_m"] = {stem .. "yan"}
data.forms["top_3_p_f"] = {stem .. "yen"}
data.forms["top_3_p_n"] = {stem .. "yon"}
data.forms["top_3_p_in"] = {stem .. "aran"}
data.forms["cli_1_p"] = {stem .. "nang"}
data.forms["cli_2_p"] = {stem .. "vāng"}
data.forms["cli_3_p_m"] = {stem .. "tang"}
data.forms["cli_3_p_f"] = {stem .. "teng"}
data.forms["cli_3_p_n"] = {stem .. "tong"}
data.forms["cli_3_p_in"] = {stem .. "teng"}
data.forms["imperative"] = {s1 .. "u"}
data.forms["hortative"] = {s1 .. "u-" .. s1 .. "u"}
data.forms["iterative"] = {f2 .. "-" .. stem .. "-"}
data.forms["participle"] = {stem .. "yam"}
end
})
d["a"] = {
params = {
[1] = {},
},
}
setmetatable(d["a"], {__call = function(self, args, data)
local stem = args[1]
local s1 = sub(stem, 1, -2)
local f2 = sub(stem, 1, 2)
data.decl_type = "vocalic"
if not data.no_cat then
table.insert(data.categories, "Ayeri " .. data.decl_type .. " verbs")
end
data.forms["top_1_s"] = {s1 .. "āy"}
data.forms["top_2_s"] = {stem .. "va"}
data.forms["top_3_s_m"] = {stem .. "ya"}
data.forms["top_3_s_f"] = {stem .. "ye"}
data.forms["top_3_s_n"] = {stem .. "yo"}
data.forms["top_3_s_in"] = {s1 .. "āra"}
data.forms["cli_1_s"] = {stem .. "yang"}
data.forms["cli_2_s"] = {stem .. "vāng"}
data.forms["cli_3_s_m"] = {stem .. "yāng"}
data.forms["cli_3_s_f"] = {stem .. "yeng"}
data.forms["cli_3_s_n"] = {stem .. "yong"}
data.forms["cli_3_s_in"] = {stem .. "reng"}
data.forms["top_1_p"] = {s1 .. "āyn"}
data.forms["top_2_p"] = {stem .. "va"}
data.forms["top_3_p_m"] = {stem .. "yan"}
data.forms["top_3_p_f"] = {stem .. "yen"}
data.forms["top_3_p_n"] = {stem .. "yon"}
data.forms["top_3_p_in"] = {s1 .. "āran"}
data.forms["cli_1_p"] = {stem .. "nang"}
data.forms["cli_2_p"] = {stem .. "vāng"}
data.forms["cli_3_p_m"] = {stem .. "tang"}
data.forms["cli_3_p_f"] = {stem .. "teng"}
data.forms["cli_3_p_n"] = {stem .. "tong"}
data.forms["cli_3_p_in"] = {stem .. "teng"}
data.forms["imperative"] = {s1 .. "u"}
data.forms["hortative"] = {s1 .. "u-" .. s1 .. "u"}
data.forms["iterative"] = {f2 .. "-" .. stem .. "-"}
data.forms["participle"] = {stem .. "yam"}
end
})
d["c"] = {
params = {
[1] = {},
},
}
setmetatable(d["c"], {__call = function(self, args, data)
local stem = args[1]
local s1 = sub(stem, 1, -2)
local f2 = sub(stem, 1, 2)
local pal = stem:gsub("t$", "c"):gsub("([^n])g$", "%1j")
data.decl_type = "monoconsonantal"
if not data.no_cat then
table.insert(data.categories, "Ayeri " .. data.decl_type .. " verbs")
end
data.forms["top_1_s"] = {stem .. "ay"}
data.forms["top_2_s"] = {stem .. "va"}
data.forms["top_3_s_m"] = {(pal ~= stem and pal or stem .. "y") .. "a"}
data.forms["top_3_s_f"] = {(pal ~= stem and pal or stem .. "y") .. "e"}
data.forms["top_3_s_n"] = {(pal ~= stem and pal or stem .. "y") .. "o"}
data.forms["top_3_s_in"] = {stem .. "ara"}
data.forms["cli_1_s"] = {(pal ~= stem and pal or stem .. "y") .. "ang"}
data.forms["cli_2_s"] = {stem .. "vāng"}
data.forms["cli_3_s_m"] = {(pal ~= stem and pal or stem .. "y") .. "āng"}
data.forms["cli_3_s_f"] = {(pal ~= stem and pal or stem .. "y") .. "eng"}
data.forms["cli_3_s_n"] = {(pal ~= stem and pal or stem .. "y") .. "ong"}
data.forms["cli_3_s_in"] = {stem .. "reng"}
data.forms["top_1_p"] = {stem .. "ayn"}
data.forms["top_2_p"] = {stem .. "va"}
data.forms["top_3_p_m"] = {(pal ~= stem and pal or stem .. "y") .. "an"}
data.forms["top_3_p_f"] = {(pal ~= stem and pal or stem .. "y") .. "en"}
data.forms["top_3_p_n"] = {(pal ~= stem and pal or stem .. "y") .. "on"}
data.forms["top_3_p_in"] = {stem .. "aran"}
data.forms["cli_1_p"] = {stem .. "nang"}
data.forms["cli_2_p"] = {stem .. "vāng"}
data.forms["cli_3_p_m"] = {stem .. "tang"}
data.forms["cli_3_p_f"] = {stem .. "teng"}
data.forms["cli_3_p_n"] = {stem .. "tong"}
data.forms["cli_3_p_in"] = {stem .. "teng"}
data.forms["imperative"] = {stem .. "u"}
data.forms["hortative"] = {stem .. "u-" .. stem .. "u"}
data.forms["iterative"] = {f2 .. "-" .. stem .. "-"}
data.forms["participle"] = {(pal ~= stem and pal or stem .. "y") .. "am"}
end
})
d["2c"] = {
params = {
[1] = {},
},
}
setmetatable(d["2c"], {__call = function(self, args, data)
local stem = args[1]
local s1 = sub(stem, 1, -2)
local f2 = sub(stem, 1, 2)
data.decl_type = "biconsonantal"
if not data.no_cat then
table.insert(data.categories, "Ayeri " .. data.decl_type .. " verbs")
end
data.forms["top_1_s"] = {s1 .. "ay"}
data.forms["top_2_s"] = {stem .. "ava"}
data.forms["top_3_s_m"] = {stem .. "ya"}
data.forms["top_3_s_f"] = {stem .. "ye"}
data.forms["top_3_s_n"] = {stem .. "yo"}
data.forms["top_3_s_in"] = {s1 .. "ara"}
data.forms["cli_1_s"] = {stem .. "yang"}
data.forms["cli_2_s"] = {stem .. "avāng"}
data.forms["cli_3_s_m"] = {stem .. "yāng"}
data.forms["cli_3_s_f"] = {stem .. "yeng"}
data.forms["cli_3_s_n"] = {stem .. "yong"}
data.forms["cli_3_s_in"] = {stem .. "areng"}
data.forms["top_1_p"] = {s1 .. "ayn"}
data.forms["top_2_p"] = {stem .. "ava"}
data.forms["top_3_p_m"] = {stem .. "yan"}
data.forms["top_3_p_f"] = {stem .. "yen"}
data.forms["top_3_p_n"] = {stem .. "yon"}
data.forms["top_3_p_in"] = {s1 .. "aran"}
data.forms["cli_1_p"] = {stem .. "anang"}
data.forms["cli_2_p"] = {stem .. "avāng"}
data.forms["cli_3_p_m"] = {stem .. "atang"}
data.forms["cli_3_p_f"] = {stem .. "ateng"}
data.forms["cli_3_p_n"] = {stem .. "atong"}
data.forms["cli_3_p_in"] = {stem .. "ateng"}
data.forms["imperative"] = {stem .. "u"}
data.forms["hortative"] = {stem .. "u-" .. stem .. "u"}
data.forms["iterative"] = {f2 .. "-" .. stem .. "-"}
data.forms["participle"] = {stem .. "yam"}
end
})
return d