モジュール:got-verbs
ナビゲーションに移動
検索に移動
このモジュールについての説明文ページを モジュール:got-verbs/doc に作成できます
local m_utilities = require("モジュール:utilities")
local m_links = require("モジュール:links")
local m_translit = require("モジュール:Goth-translit")
local lang = require("モジュール:languages").getByCode("got")
local export = {}
local function postprocess(args, data)
for key, form in pairs(data.forms) do
-- Do not show passive forms for verbs that don't have them
if args["nopasv"] and key:find("pasv") then
form = nil
end
data.forms[key] = form
end
-- Check if the lemma form matches the page name
if data.forms["inf"] and lang:makeEntryName(m_translit.tr_reverse(data.forms["inf"][1])) ~= mw.title.getCurrentTitle().text then
table.insert(data.categories, lang:getCanonicalName() .. " entries with inflection not matching pagename")
end
end
local function make_Latn(args, names)
for _, name in ipairs(names) do
if args[name] then
if type(args[name]) == "table" then
for i, _ in ipairs(args[name]) do
args[name][i] = m_translit.tr(args[name][i])
end
else
args[name] = m_translit.tr(args[name])
end
end
end
end
-- Inflection functions
export["st"] = function(frame)
local params = {
[1] = {required = true, default = "{{{1}}}"},
[2] = {required = true, default = "{{{2}}}"},
[3] = {required = true, default = "{{{3}}}"},
[4] = {required = true, default = "{{{4}}}"},
["imp2sg"] = {},
["past2sg"] = {},
["class"] = {},
["irr"] = {type = "boolean"},
["j"] = {},
["nopasv"] = {type = "boolean"},
}
local args = require("モジュール:parameters").process(frame:getParent().args, params)
make_Latn(args, {1, 2, 3, 4, "imp2sg", "past2sg"})
if args["j"] and not (args["j"] == "ji" or args["j"] == "ei") then
error("Invalid value for parameter j=, must be \"ji\", \"ei\" or empty.")
end
local data = {
forms = {},
info = (args["class"] and "強変化第" .. args["class"] .. "類" or "") .. (args["j"] and ", j-present" or "") .. (args["irr"] and ", 不規則" or ""),
categories = {lang:getCanonicalName() .. " 強変化動詞" .. (args["class"] and "第" .. args["class"] .. "類" or "") .. (args["j"] and "j-present " or "")}
}
if args["irr"] then
table.insert(data.categories, lang:getCanonicalName() .. " 不規則動詞")
end
-- Present indicative
data.forms["pres_indc_1sg"] = {args[1] .. (args["j"] and "j" or "") .. "a"}
data.forms["pres_indc_2sg"] = {args[1] .. (args["j"] or "i") .. "s"}
data.forms["pres_indc_3sg"] = {args[1] .. (args["j"] or "i") .. "þ"}
data.forms["pres_indc_1du"] = {args[1] .. (args["j"] and "j" or "") .. "ōs"}
data.forms["pres_indc_2du"] = {args[1] .. (args["j"] and "j" or "") .. "ats"}
data.forms["pres_indc_1pl"] = {args[1] .. (args["j"] and "j" or "") .. "am"}
data.forms["pres_indc_2pl"] = {args[1] .. (args["j"] or "i") .. "þ"}
data.forms["pres_indc_3pl"] = {args[1] .. (args["j"] and "j" or "") .. "and"}
-- Present subjunctive
data.forms["pres_subj_1sg"] = {args[1] .. (args["j"] and "j" or "") .. "au"}
data.forms["pres_subj_2sg"] = {args[1] .. (args["j"] and "j" or "") .. "ais"}
data.forms["pres_subj_3sg"] = {args[1] .. (args["j"] and "j" or "") .. "ai"}
data.forms["pres_subj_1du"] = {args[1] .. (args["j"] and "j" or "") .. "aiwa"}
data.forms["pres_subj_2du"] = {args[1] .. (args["j"] and "j" or "") .. "aits"}
data.forms["pres_subj_1pl"] = {args[1] .. (args["j"] and "j" or "") .. "aima"}
data.forms["pres_subj_2pl"] = {args[1] .. (args["j"] and "j" or "") .. "aiþ"}
data.forms["pres_subj_3pl"] = {args[1] .. (args["j"] and "j" or "") .. "aina"}
-- Imperative
data.forms["impr_2sg"] = {args["imp2sg"] or args[1] .. (args["j"] and "ei" or "")}
data.forms["impr_3sg"] = {args[1] .. (args["j"] and "j" or "") .. "adau"}
data.forms["impr_2du"] = {args[1] .. (args["j"] and "j" or "") .. "ats"}
data.forms["impr_2pl"] = {args[1] .. (args["j"] or "i") .. "þ"}
data.forms["impr_3pl"] = {args[1] .. (args["j"] and "j" or "") .. "andau"}
-- Passive indicative
data.forms["pasv_indc_1sg"] = {args[1] .. (args["j"] and "j" or "") .. "ada"}
data.forms["pasv_indc_2sg"] = {args[1] .. (args["j"] and "j" or "") .. "aza"}
data.forms["pasv_indc_3sg"] = {args[1] .. (args["j"] and "j" or "") .. "ada"}
data.forms["pasv_indc_1pl"] = {args[1] .. (args["j"] and "j" or "") .. "anda"}
data.forms["pasv_indc_2pl"] = {args[1] .. (args["j"] and "j" or "") .. "anda"}
data.forms["pasv_indc_3pl"] = {args[1] .. (args["j"] and "j" or "") .. "anda"}
-- Passive subjunctive
data.forms["pasv_subj_1sg"] = {args[1] .. (args["j"] and "j" or "") .. "aidau"}
data.forms["pasv_subj_2sg"] = {args[1] .. (args["j"] and "j" or "") .. "aizau"}
data.forms["pasv_subj_3sg"] = {args[1] .. (args["j"] and "j" or "") .. "aidau"}
data.forms["pasv_subj_1pl"] = {args[1] .. (args["j"] and "j" or "") .. "aindau"}
data.forms["pasv_subj_2pl"] = {args[1] .. (args["j"] and "j" or "") .. "aindau"}
data.forms["pasv_subj_3pl"] = {args[1] .. (args["j"] and "j" or "") .. "aindau"}
-- Past indicative
data.forms["past_indc_1sg"] = {args[2]}
data.forms["past_indc_2sg"] = {args["past2sg"] or args[2] .. "t"}
data.forms["past_indc_3sg"] = {args[2]}
data.forms["past_indc_1du"] = {args[3] .. "u"}
data.forms["past_indc_2du"] = {args[3] .. "uts"}
data.forms["past_indc_1pl"] = {args[3] .. "um"}
data.forms["past_indc_2pl"] = {args[3] .. "uþ"}
data.forms["past_indc_3pl"] = {args[3] .. "un"}
-- Past subjunctive
data.forms["past_subj_1sg"] = {args[3] .. "jau"}
data.forms["past_subj_2sg"] = {args[3] .. "eis"}
data.forms["past_subj_3sg"] = {args[3] .. "i"}
data.forms["past_subj_1du"] = {args[3] .. "eiwa"}
data.forms["past_subj_2du"] = {args[3] .. "eits"}
data.forms["past_subj_1pl"] = {args[3] .. "eima"}
data.forms["past_subj_2pl"] = {args[3] .. "eiþ"}
data.forms["past_subj_3pl"] = {args[3] .. "eina"}
-- Non-finite forms
data.forms["inf"] = {args[1] .. (args["j"] and "j" or "") .. "an"}
data.forms["pres_ptcp"] = {args[1] .. (args["j"] and "j" or "") .. "ands"}
data.forms["past_ptcp"] = {args[4] .. "ans"}
postprocess(args, data)
return make_table(data) .. m_utilities.format_categories(data.categories, lang)
end
export["wk1"] = function(frame)
local params = {
[1] = {required = true, default = "{{{1}}}"},
[2] = {},
["j"] = {required = true, default = "ji"},
["nopasv"] = {type = "boolean"},
}
local args = require("モジュール:parameters").process(frame:getParent().args, params)
make_Latn(args, {1, 2})
if not (args["j"] == "ji" or args["j"] == "ei") then
error("Invalid value for parameter j=, must be \"ji\" or \"ei\".")
end
local data = {forms = {}, info = "弱変化第1類", categories = {lang:getCanonicalName() .. " 弱変化動詞第1類"}}
-- Present indicative
data.forms["pres_indc_1sg"] = {args[1] .. "ja"}
data.forms["pres_indc_2sg"] = {args[1] .. args["j"] .. "s"}
data.forms["pres_indc_3sg"] = {args[1] .. args["j"] .. "þ"}
data.forms["pres_indc_1du"] = {args[1] .. "jōs"}
data.forms["pres_indc_2du"] = {args[1] .. "jats"}
data.forms["pres_indc_1pl"] = {args[1] .. "jam"}
data.forms["pres_indc_2pl"] = {args[1] .. args["j"] .. "þ"}
data.forms["pres_indc_3pl"] = {args[1] .. "jand"}
-- Present subjunctive
data.forms["pres_subj_1sg"] = {args[1] .. "jau"}
data.forms["pres_subj_2sg"] = {args[1] .. "jais"}
data.forms["pres_subj_3sg"] = {args[1] .. "jai"}
data.forms["pres_subj_1du"] = {args[1] .. "jaiwa"}
data.forms["pres_subj_2du"] = {args[1] .. "jaits"}
data.forms["pres_subj_1pl"] = {args[1] .. "jaima"}
data.forms["pres_subj_2pl"] = {args[1] .. "jaiþ"}
data.forms["pres_subj_3pl"] = {args[1] .. "jaina"}
-- Imperative
data.forms["impr_2sg"] = {(args[2] or args[1]) .. "ei"}
data.forms["impr_3sg"] = {args[1] .. "jadau"}
data.forms["impr_2du"] = {args[1] .. "jats"}
data.forms["impr_2pl"] = {args[1] .. args["j"] .. "þ"}
data.forms["impr_3pl"] = {args[1] .. "jandau"}
-- Passive indicative
data.forms["pasv_indc_1sg"] = {args[1] .. "jada"}
data.forms["pasv_indc_2sg"] = {args[1] .. "jaza"}
data.forms["pasv_indc_3sg"] = {args[1] .. "jada"}
data.forms["pasv_indc_1pl"] = {args[1] .. "janda"}
data.forms["pasv_indc_2pl"] = {args[1] .. "janda"}
data.forms["pasv_indc_3pl"] = {args[1] .. "janda"}
-- Passive subjunctive
data.forms["pasv_subj_1sg"] = {args[1] .. "jaidau"}
data.forms["pasv_subj_2sg"] = {args[1] .. "jaizau"}
data.forms["pasv_subj_3sg"] = {args[1] .. "jaidau"}
data.forms["pasv_subj_1pl"] = {args[1] .. "jaindau"}
data.forms["pasv_subj_2pl"] = {args[1] .. "jaindau"}
data.forms["pasv_subj_3pl"] = {args[1] .. "jaindau"}
-- Past indicative
data.forms["past_indc_1sg"] = {(args[2] or args[1]) .. "ida"}
data.forms["past_indc_2sg"] = {(args[2] or args[1]) .. "idēs"}
data.forms["past_indc_3sg"] = {(args[2] or args[1]) .. "ida"}
data.forms["past_indc_1du"] = {(args[2] or args[1]) .. "idēdu"}
data.forms["past_indc_2du"] = {(args[2] or args[1]) .. "idēduts"}
data.forms["past_indc_1pl"] = {(args[2] or args[1]) .. "idēdum"}
data.forms["past_indc_2pl"] = {(args[2] or args[1]) .. "idēduþ"}
data.forms["past_indc_3pl"] = {(args[2] or args[1]) .. "idēdun"}
-- Past subjunctive
data.forms["past_subj_1sg"] = {(args[2] or args[1]) .. "idēdjau"}
data.forms["past_subj_2sg"] = {(args[2] or args[1]) .. "idēdeis"}
data.forms["past_subj_3sg"] = {(args[2] or args[1]) .. "idēdi"}
data.forms["past_subj_1du"] = {(args[2] or args[1]) .. "idēdeiwa"}
data.forms["past_subj_2du"] = {(args[2] or args[1]) .. "idēdeits"}
data.forms["past_subj_1pl"] = {(args[2] or args[1]) .. "idēdeima"}
data.forms["past_subj_2pl"] = {(args[2] or args[1]) .. "idēdeiþ"}
data.forms["past_subj_3pl"] = {(args[2] or args[1]) .. "idēdeina"}
-- Non-finite forms
data.forms["inf"] = {args[1] .. "jan"}
data.forms["pres_ptcp"] = {args[1] .. "jands"}
data.forms["past_ptcp"] = {(args[2] or args[1]) .. "iþs"}
postprocess(args, data)
return make_table(data) .. m_utilities.format_categories(data.categories, lang)
end
export["wk2"] = function(frame)
local params = {
[1] = {required = true, default = "{{{1}}}"},
["nopasv"] = {type = "boolean"},
}
local args = require("モジュール:parameters").process(frame:getParent().args, params)
make_Latn(args, {1})
local data = {forms = {}, info = "弱変化第2類", categories = {lang:getCanonicalName() .. " 弱変化動詞第2類"}}
-- Present indicative
data.forms["pres_indc_1sg"] = {args[1] .. "ō"}
data.forms["pres_indc_2sg"] = {args[1] .. "ōs"}
data.forms["pres_indc_3sg"] = {args[1] .. "ōþ"}
data.forms["pres_indc_1du"] = {args[1] .. "ōs"}
data.forms["pres_indc_2du"] = {args[1] .. "ōts"}
data.forms["pres_indc_1pl"] = {args[1] .. "ōm"}
data.forms["pres_indc_2pl"] = {args[1] .. "ōþ"}
data.forms["pres_indc_3pl"] = {args[1] .. "ōnd"}
-- Present subjunctive
data.forms["pres_subj_1sg"] = {args[1] .. "ō"}
data.forms["pres_subj_2sg"] = {args[1] .. "ōs"}
data.forms["pres_subj_3sg"] = {args[1] .. "ō"}
data.forms["pres_subj_1du"] = {args[1] .. "ōwa"}
data.forms["pres_subj_2du"] = {args[1] .. "ōts"}
data.forms["pres_subj_1pl"] = {args[1] .. "ōma"}
data.forms["pres_subj_2pl"] = {args[1] .. "ōþ"}
data.forms["pres_subj_3pl"] = {args[1] .. "ōna"}
-- Imperative
data.forms["impr_2sg"] = {args[1] .. "ō"}
data.forms["impr_3sg"] = {args[1] .. "ōdau"}
data.forms["impr_2du"] = {args[1] .. "ōts"}
data.forms["impr_2pl"] = {args[1] .. "ōþ"}
data.forms["impr_3pl"] = {args[1] .. "ōndau"}
-- Passive indicative
data.forms["pasv_indc_1sg"] = {args[1] .. "ōda"}
data.forms["pasv_indc_2sg"] = {args[1] .. "ōza"}
data.forms["pasv_indc_3sg"] = {args[1] .. "ōda"}
data.forms["pasv_indc_1pl"] = {args[1] .. "ōnda"}
data.forms["pasv_indc_2pl"] = {args[1] .. "ōnda"}
data.forms["pasv_indc_3pl"] = {args[1] .. "ōnda"}
-- Passive subjunctive
data.forms["pasv_subj_1sg"] = {args[1] .. "ōdau"}
data.forms["pasv_subj_2sg"] = {args[1] .. "ōzau"}
data.forms["pasv_subj_3sg"] = {args[1] .. "ōdau"}
data.forms["pasv_subj_1pl"] = {args[1] .. "ōndau"}
data.forms["pasv_subj_2pl"] = {args[1] .. "ōndau"}
data.forms["pasv_subj_3pl"] = {args[1] .. "ōndau"}
-- Past indicative
data.forms["past_indc_1sg"] = {args[1] .. "ōda"}
data.forms["past_indc_2sg"] = {args[1] .. "ōdēs"}
data.forms["past_indc_3sg"] = {args[1] .. "ōda"}
data.forms["past_indc_1du"] = {args[1] .. "ōdēdu"}
data.forms["past_indc_2du"] = {args[1] .. "ōdēduts"}
data.forms["past_indc_1pl"] = {args[1] .. "ōdēdum"}
data.forms["past_indc_2pl"] = {args[1] .. "ōdēduþ"}
data.forms["past_indc_3pl"] = {args[1] .. "ōdēdun"}
-- Past subjunctive
data.forms["past_subj_1sg"] = {args[1] .. "ōdēdjau"}
data.forms["past_subj_2sg"] = {args[1] .. "ōdēdeis"}
data.forms["past_subj_3sg"] = {args[1] .. "ōdēdi"}
data.forms["past_subj_1du"] = {args[1] .. "ōdēdeiwa"}
data.forms["past_subj_2du"] = {args[1] .. "ōdēdeits"}
data.forms["past_subj_1pl"] = {args[1] .. "ōdēdeima"}
data.forms["past_subj_2pl"] = {args[1] .. "ōdēdeiþ"}
data.forms["past_subj_3pl"] = {args[1] .. "ōdēdeina"}
-- Non-finite forms
data.forms["inf"] = {args[1] .. "ōn"}
data.forms["pres_ptcp"] = {args[1] .. "ōnds"}
data.forms["past_ptcp"] = {args[1] .. "ōþs"}
postprocess(args, data)
return make_table(data) .. m_utilities.format_categories(data.categories, lang)
end
export["wk3"] = function(frame)
local params = {
[1] = {required = true, default = "{{{1}}}"},
["nopasv"] = {type = "boolean"},
}
local args = require("モジュール:parameters").process(frame:getParent().args, params)
make_Latn(args, {1})
local data = {forms = {}, info = "弱変化第3類", categories = {lang:getCanonicalName() .. " 弱変化動詞第3類"}}
-- Present indicative
data.forms["pres_indc_1sg"] = {args[1] .. "a"}
data.forms["pres_indc_2sg"] = {args[1] .. "ais"}
data.forms["pres_indc_3sg"] = {args[1] .. "aiþ"}
data.forms["pres_indc_1du"] = {args[1] .. "ōs"}
data.forms["pres_indc_2du"] = {args[1] .. "āts"}
data.forms["pres_indc_1pl"] = {args[1] .. "ām"}
data.forms["pres_indc_2pl"] = {args[1] .. "aiþ"}
data.forms["pres_indc_3pl"] = {args[1] .. "ānd"}
-- Present subjunctive
data.forms["pres_subj_1sg"] = {args[1] .. "au"}
data.forms["pres_subj_2sg"] = {args[1] .. "ais"}
data.forms["pres_subj_3sg"] = {args[1] .. "ai"}
data.forms["pres_subj_1du"] = {args[1] .. "aiwa"}
data.forms["pres_subj_2du"] = {args[1] .. "aits"}
data.forms["pres_subj_1pl"] = {args[1] .. "aima"}
data.forms["pres_subj_2pl"] = {args[1] .. "aiþ"}
data.forms["pres_subj_3pl"] = {args[1] .. "aina"}
-- Imperative
data.forms["impr_2sg"] = {args[1] .. "ai"}
data.forms["impr_3sg"] = {args[1] .. "ādau"}
data.forms["impr_2du"] = {args[1] .. "āts"}
data.forms["impr_2pl"] = {args[1] .. "aiþ"}
data.forms["impr_3pl"] = {args[1] .. "āndau"}
-- Passive indicative
data.forms["pasv_indc_1sg"] = {args[1] .. "āda"}
data.forms["pasv_indc_2sg"] = {args[1] .. "āza"}
data.forms["pasv_indc_3sg"] = {args[1] .. "āda"}
data.forms["pasv_indc_1pl"] = {args[1] .. "ānda"}
data.forms["pasv_indc_2pl"] = {args[1] .. "ānda"}
data.forms["pasv_indc_3pl"] = {args[1] .. "ānda"}
-- Passive subjunctive
data.forms["pasv_subj_1sg"] = {args[1] .. "aidau"}
data.forms["pasv_subj_2sg"] = {args[1] .. "aizau"}
data.forms["pasv_subj_3sg"] = {args[1] .. "aidau"}
data.forms["pasv_subj_1pl"] = {args[1] .. "aindau"}
data.forms["pasv_subj_2pl"] = {args[1] .. "aindau"}
data.forms["pasv_subj_3pl"] = {args[1] .. "aindau"}
-- Past indicative
data.forms["past_indc_1sg"] = {args[1] .. "aida"}
data.forms["past_indc_2sg"] = {args[1] .. "aidēs"}
data.forms["past_indc_3sg"] = {args[1] .. "aida"}
data.forms["past_indc_1du"] = {args[1] .. "aidēdu"}
data.forms["past_indc_2du"] = {args[1] .. "aidēduts"}
data.forms["past_indc_1pl"] = {args[1] .. "aidēdum"}
data.forms["past_indc_2pl"] = {args[1] .. "aidēduþ"}
data.forms["past_indc_3pl"] = {args[1] .. "aidēdun"}
-- Past subjunctive
data.forms["past_subj_1sg"] = {args[1] .. "aidēdjau"}
data.forms["past_subj_2sg"] = {args[1] .. "aidēdeis"}
data.forms["past_subj_3sg"] = {args[1] .. "aidēdi"}
data.forms["past_subj_1du"] = {args[1] .. "aidēdeiwa"}
data.forms["past_subj_2du"] = {args[1] .. "aidēdeits"}
data.forms["past_subj_1pl"] = {args[1] .. "aidēdeima"}
data.forms["past_subj_2pl"] = {args[1] .. "aidēdeiþ"}
data.forms["past_subj_3pl"] = {args[1] .. "aidēdeina"}
-- Non-finite forms
data.forms["inf"] = {args[1] .. "ān"}
data.forms["pres_ptcp"] = {args[1] .. "ānds"}
data.forms["past_ptcp"] = {args[1] .. "aiþs"}
postprocess(args, data)
return make_table(data) .. m_utilities.format_categories(data.categories, lang)
end
export["wk4"] = function(frame)
local params = {
[1] = {required = true, default = "{{{1}}}"},
["nopasv"] = {type = "boolean"},
}
local args = require("モジュール:parameters").process(frame:getParent().args, params)
make_Latn(args, {1})
local data = {forms = {}, info = "弱変化第4類", categories = {lang:getCanonicalName() .. " 弱変化動詞第4類"}}
-- Present indicative
data.forms["pres_indc_1sg"] = {args[1] .. "na"}
data.forms["pres_indc_2sg"] = {args[1] .. "nis"}
data.forms["pres_indc_3sg"] = {args[1] .. "niþ"}
data.forms["pres_indc_1du"] = {args[1] .. "nōs"}
data.forms["pres_indc_2du"] = {args[1] .. "nats"}
data.forms["pres_indc_1pl"] = {args[1] .. "nam"}
data.forms["pres_indc_2pl"] = {args[1] .. "niþ"}
data.forms["pres_indc_3pl"] = {args[1] .. "nand"}
-- Present subjunctive
data.forms["pres_subj_1sg"] = {args[1] .. "nau"}
data.forms["pres_subj_2sg"] = {args[1] .. "nais"}
data.forms["pres_subj_3sg"] = {args[1] .. "nai"}
data.forms["pres_subj_1du"] = {args[1] .. "naiwa"}
data.forms["pres_subj_2du"] = {args[1] .. "naits"}
data.forms["pres_subj_1pl"] = {args[1] .. "naima"}
data.forms["pres_subj_2pl"] = {args[1] .. "naiþ"}
data.forms["pres_subj_3pl"] = {args[1] .. "naina"}
-- Imperative
data.forms["impr_2sg"] = {args[1] .. "n"}
data.forms["impr_3sg"] = {args[1] .. "nadau"}
data.forms["impr_2du"] = {args[1] .. "nats"}
data.forms["impr_2pl"] = {args[1] .. "niþ"}
data.forms["impr_3pl"] = {args[1] .. "nandau"}
-- Passive indicative
-- No forms
-- Passive subjunctive
-- No forms
-- Past indicative
data.forms["past_indc_1sg"] = {args[1] .. "nōda"}
data.forms["past_indc_2sg"] = {args[1] .. "nōdēs"}
data.forms["past_indc_3sg"] = {args[1] .. "nōda"}
data.forms["past_indc_1du"] = {args[1] .. "nōdēdu"}
data.forms["past_indc_2du"] = {args[1] .. "nōdēduts"}
data.forms["past_indc_1pl"] = {args[1] .. "nōdēdum"}
data.forms["past_indc_2pl"] = {args[1] .. "nōdēduþ"}
data.forms["past_indc_3pl"] = {args[1] .. "nōdēdun"}
-- Past subjunctive
data.forms["past_subj_1sg"] = {args[1] .. "nōdēdjau"}
data.forms["past_subj_2sg"] = {args[1] .. "nōdēdeis"}
data.forms["past_subj_3sg"] = {args[1] .. "nōdēdi"}
data.forms["past_subj_1du"] = {args[1] .. "nōdēdeiwa"}
data.forms["past_subj_2du"] = {args[1] .. "nōdēdeits"}
data.forms["past_subj_1pl"] = {args[1] .. "nōdēdeima"}
data.forms["past_subj_2pl"] = {args[1] .. "nōdēdeiþ"}
data.forms["past_subj_3pl"] = {args[1] .. "nōdēdeina"}
-- Non-finite forms
data.forms["inf"] = {args[1] .. "nan"}
data.forms["pres_ptcp"] = {args[1] .. "nands"}
data.forms["past_ptcp"] = nil
postprocess(args, data)
return make_table(data) .. m_utilities.format_categories(data.categories, lang)
end
export["pp"] = function(frame)
local params = {
[1] = {required = true, default = "{{{1}}}"},
[2] = {required = true, default = "{{{2}}}"},
[3] = {required = true, default = "{{{3}}}"},
["pres2sg"] = {},
["pastpart"] = {},
}
local args = require("モジュール:parameters").process(frame:getParent().args, params)
make_Latn(args, {1, 2, 3, "pres2sg", "pastpart"})
local data = {forms = {}, info = "過去現在", categories = {lang:getCanonicalName() .. " 過去現在動詞"}}
-- Present indicative
data.forms["pres_indc_1sg"] = {args[2]}
data.forms["pres_indc_2sg"] = {args["pres2sg"] or args[2] .. "t"}
data.forms["pres_indc_3sg"] = {args[2]}
data.forms["pres_indc_1du"] = {args[1] .. "u"}
data.forms["pres_indc_2du"] = {args[1] .. "uts"}
data.forms["pres_indc_1pl"] = {args[1] .. "um"}
data.forms["pres_indc_2pl"] = {args[1] .. "uþ"}
data.forms["pres_indc_3pl"] = {args[1] .. "un"}
-- Present subjunctive
data.forms["pres_subj_1sg"] = {args[1] .. "jau"}
data.forms["pres_subj_2sg"] = {args[1] .. "eis"}
data.forms["pres_subj_3sg"] = {args[1] .. "i"}
data.forms["pres_subj_1du"] = {args[1] .. "eiwa"}
data.forms["pres_subj_2du"] = {args[1] .. "eits"}
data.forms["pres_subj_1pl"] = {args[1] .. "eima"}
data.forms["pres_subj_2pl"] = {args[1] .. "eiþ"}
data.forms["pres_subj_3pl"] = {args[1] .. "eina"}
-- Imperative
-- No forms
-- Passive indicative
-- No forms
-- Passive subjunctive
-- No forms
-- Past indicative
data.forms["past_indc_1sg"] = {args[3] .. "a"}
data.forms["past_indc_2sg"] = {args[3] .. "ēs"}
data.forms["past_indc_3sg"] = {args[3] .. "a"}
data.forms["past_indc_1du"] = {args[3] .. "ēdu"}
data.forms["past_indc_2du"] = {args[3] .. "ēduts"}
data.forms["past_indc_1pl"] = {args[3] .. "ēdum"}
data.forms["past_indc_2pl"] = {args[3] .. "ēduþ"}
data.forms["past_indc_3pl"] = {args[3] .. "ēdun"}
-- Past subjunctive
data.forms["past_subj_1sg"] = {args[3] .. "ēdjau"}
data.forms["past_subj_2sg"] = {args[3] .. "ēdeis"}
data.forms["past_subj_3sg"] = {args[3] .. "ēdi"}
data.forms["past_subj_1du"] = {args[3] .. "ēdeiwa"}
data.forms["past_subj_2du"] = {args[3] .. "ēdeits"}
data.forms["past_subj_1pl"] = {args[3] .. "ēdeima"}
data.forms["past_subj_2pl"] = {args[3] .. "ēdeiþ"}
data.forms["past_subj_3pl"] = {args[3] .. "ēdeina"}
-- Non-finite forms
data.forms["inf"] = {args[1] .. "an"}
data.forms["pres_ptcp"] = {args[1] .. "ands"}
data.forms["past_ptcp"] = {args["pastpart"] or args[3] .. "s"}
postprocess(args, data)
return make_table(data) .. m_utilities.format_categories(data.categories, lang)
end
-- Irregular verbs
export["wiljan"] = function(frame)
local params = {
}
local args = require("モジュール:parameters").process(frame:getParent().args, params)
local data = {
forms = {}, info = "弱変化, 不規則, 直説法現在形なし",
categories = {lang:getCanonicalName() .. " 弱変化動詞", lang:getCanonicalName() .. " 不規則動詞", lang:getCanonicalName() .. " 欠如動詞"}
}
-- Present indicative
-- No forms
-- Present subjunctive
data.forms["pres_subj_1sg"] = {"wiljau"}
data.forms["pres_subj_2sg"] = {"wileis"}
data.forms["pres_subj_3sg"] = {"wili"}
data.forms["pres_subj_1du"] = {"wileiwa"}
data.forms["pres_subj_2du"] = {"wileits"}
data.forms["pres_subj_1pl"] = {"wileima"}
data.forms["pres_subj_2pl"] = {"wileiþ"}
data.forms["pres_subj_3pl"] = {"wileina"}
-- Imperative
-- No forms
-- Passive indicative
-- No forms
-- Passive subjunctive
-- No forms
-- Past indicative
data.forms["past_indc_1sg"] = {"wilda"}
data.forms["past_indc_2sg"] = {"wildēs"}
data.forms["past_indc_3sg"] = {"wilda"}
data.forms["past_indc_1du"] = {"wildēdu"}
data.forms["past_indc_2du"] = {"wildēduts"}
data.forms["past_indc_1pl"] = {"wildēdum"}
data.forms["past_indc_2pl"] = {"wildēduþ"}
data.forms["past_indc_3pl"] = {"wildēdun"}
-- Past subjunctive
data.forms["past_subj_1sg"] = {"wildēdjau"}
data.forms["past_subj_2sg"] = {"wildēdeis"}
data.forms["past_subj_3sg"] = {"wildēdi"}
data.forms["past_subj_1du"] = {"wildēdeiwa"}
data.forms["past_subj_2du"] = {"wildēdeits"}
data.forms["past_subj_1pl"] = {"wildēdeima"}
data.forms["past_subj_2pl"] = {"wildēdeiþ"}
data.forms["past_subj_3pl"] = {"wildēdeina"}
-- Non-finite forms
data.forms["inf"] = {"wiljan"}
data.forms["pres_ptcp"] = {"wiljands"}
data.forms["past_ptcp"] = nil
postprocess(args, data)
return make_table(data) .. m_utilities.format_categories(data.categories, lang)
end
export["wisan"] = function(frame)
local params = {
}
local args = require("モジュール:parameters").process(frame:getParent().args, params)
local data = {
forms = {}, info = "強変化第5類, 不規則, 補充形を含む",
categories = {lang:getCanonicalName() .. " 今日変化動詞第5類", lang:getCanonicalName() .. " 不規則動詞", lang:getCanonicalName() .. " suppletive verbs"}
}
-- Present indicative
data.forms["pres_indc_1sg"] = {"im"}
data.forms["pres_indc_2sg"] = {"is"}
data.forms["pres_indc_3sg"] = {"ist"}
data.forms["pres_indc_1du"] = {"siju"}
data.forms["pres_indc_2du"] = {"sijuts"}
data.forms["pres_indc_1pl"] = {"sijum"}
data.forms["pres_indc_2pl"] = {"sijuþ"}
data.forms["pres_indc_3pl"] = {"sind"}
-- Present subjunctive
data.forms["pres_subj_1sg"] = {"sijau"}
data.forms["pres_subj_2sg"] = {"sijais"}
data.forms["pres_subj_3sg"] = {"sijai"}
data.forms["pres_subj_1du"] = {"sijaiwa"}
data.forms["pres_subj_2du"] = {"sijaits"}
data.forms["pres_subj_1pl"] = {"sijaima"}
data.forms["pres_subj_2pl"] = {"sijaiþ"}
data.forms["pres_subj_3pl"] = {"sijaina"}
-- Imperative
data.forms["impr_2sg"] = {"wis"}
data.forms["impr_3sg"] = {"wisadau"}
data.forms["impr_2du"] = {"wisats"}
data.forms["impr_2pl"] = {"wisiþ"}
data.forms["impr_3pl"] = {"wisandau"}
-- Passive indicative
-- No forms
-- Passive subjunctive
-- No forms
-- Past indicative
data.forms["past_indc_1sg"] = {"was"}
data.forms["past_indc_2sg"] = {"wast"}
data.forms["past_indc_3sg"] = {"was"}
data.forms["past_indc_1du"] = {"wēsu"}
data.forms["past_indc_2du"] = {"wēsuts"}
data.forms["past_indc_1pl"] = {"wēsum"}
data.forms["past_indc_2pl"] = {"wēsuþ"}
data.forms["past_indc_3pl"] = {"wēsun"}
-- Past subjunctive
data.forms["past_subj_1sg"] = {"wēsjau"}
data.forms["past_subj_2sg"] = {"wēseis"}
data.forms["past_subj_3sg"] = {"wēsi"}
data.forms["past_subj_1du"] = {"wēseiwa"}
data.forms["past_subj_2du"] = {"wēseits"}
data.forms["past_subj_1pl"] = {"wēseima"}
data.forms["past_subj_2pl"] = {"wēseiþ"}
data.forms["past_subj_3pl"] = {"wēseina"}
-- Non-finite forms
data.forms["inf"] = {"wisan"}
data.forms["pres_ptcp"] = {"wisands"}
data.forms["past_ptcp"] = {"wisans"}
postprocess(args, data)
return make_table(data) .. m_utilities.format_categories(data.categories, lang)
end
-- Make the table
function make_table(data)
local function repl(param)
if param == "info" then
return mw.getContentLanguage():ucfirst(data.info or "")
end
local form = data.forms[param]
if not form or #form == 0 then
return "—"
end
local ret_Goth = {}
local ret_Latn = {}
for key, subform in ipairs(form) do
table.insert(ret_Latn, m_links.full_link({lang = lang, term = subform, tr = "-"}))
table.insert(ret_Goth, m_links.full_link({lang = lang, term = m_translit.tr_reverse(subform), tr = "-"}))
end
return table.concat(ret_Goth, ", ") .. "<br/>" .. table.concat(ret_Latn, ", ")
end
local names = {
["indc"] = "直説法",
["subj"] = "接続法",
["impr"] = "命令法",
["pres"] = "現在",
["pasv"] = "受動態現在",
["past"] = "過去",
["1sg"] = "一人称単数",
["2sg"] = "二人称単数",
["3sg"] = "三人称単数",
["1du"] = "一人称双数",
["2du"] = "二人称双数",
["1pl"] = "一人称複数",
["2pl"] = "二人称複数",
["3pl"] = "三人称複数",
}
local pns = {"1sg", "2sg", "3sg", "1du", "2du", "1pl", "2pl", "3pl"}
local impr_pns = {"2sg", "3sg", "2du", "2pl", "3pl"}
local moods = {"indc", "subj"}
local tenses = {"pres", "past", "pasv"}
local wikicode = {}
table.insert(wikicode, "{| class=\"wikitable inflection-table vsSwitcher\" style=\"border-style: double; border-width: 3px;\" cellspacing=\"1\"")
table.insert(wikicode, "|-")
table.insert(wikicode, "! class=\"vsToggleElement\" style=\"background: #CCC; min-width: " .. (8 + #tenses * 12) .. "em; text-align: left;\" colspan=\"" .. (#tenses + 1) .. "\" | {{{info}}}")
table.insert(wikicode, "|- class=\"vsHide\"")
table.insert(wikicode, "! " .. mw.getContentLanguage():ucfirst("不定詞"))
table.insert(wikicode, "| colspan=\"" .. (#tenses) .. "\" | {{{inf}}}")
for _, mood in ipairs(moods) do
table.insert(wikicode, "|- class=\"vsHide\"")
table.insert(wikicode, "! style=\"min-width: 8em;\" | " .. mw.getContentLanguage():ucfirst(names[mood]))
for _, tense in ipairs(tenses) do
table.insert(wikicode, "! style=\"min-width: 12em;\" | " .. mw.getContentLanguage():ucfirst(names[tense]))
end
for _, pn in ipairs(pns) do
table.insert(wikicode, "|- class=\"vsHide\"")
table.insert(wikicode, "! " .. mw.getContentLanguage():ucfirst(names[pn]))
for _, tense in ipairs(tenses) do
table.insert(wikicode, "| {{{" .. tense .. "_" .. mood .. "_" .. pn .. "}}}")
end
end
end
table.insert(wikicode, "|- class=\"vsHide\"")
table.insert(wikicode, "! " .. mw.getContentLanguage():ucfirst(names["impr"]))
table.insert(wikicode, "!")
table.insert(wikicode, "! colspan=\"" .. (#tenses) .. "\" rowspan=\"" .. (#impr_pns + 1) .. "\"|")
for _, pn in ipairs(impr_pns) do
table.insert(wikicode, "|- class=\"vsHide\"")
table.insert(wikicode, "! " .. mw.getContentLanguage():ucfirst(names[pn]))
table.insert(wikicode, "| {{{impr_" .. pn .. "}}}")
end
table.insert(wikicode, "|- class=\"vsHide\"")
table.insert(wikicode, "|")
table.insert(wikicode, "! " .. mw.getContentLanguage():ucfirst("現在"))
table.insert(wikicode, "! " .. mw.getContentLanguage():ucfirst("過去"))
table.insert(wikicode, "! rowspan=\"2\" |")
table.insert(wikicode, "|- class=\"vsHide\"")
table.insert(wikicode, "! " .. mw.getContentLanguage():ucfirst("分詞"))
table.insert(wikicode, "| {{{pres_ptcp}}}")
table.insert(wikicode, "| {{{past_ptcp}}}")
table.insert(wikicode, "|}")
wikicode = table.concat(wikicode, "\n")
return mw.ustring.gsub(wikicode, "{{{([a-z0-9_]+)}}}", repl)
end
return export