モジュール:gem-verb

出典: フリー多機能辞典『ウィクショナリー日本語版(Wiktionary)』
ナビゲーションに移動 検索に移動

このモジュールについての説明文ページを モジュール:gem-verb/doc に作成できます

local m_utilities = require("モジュール:utilities")
local com = require("モジュール:gem-common")

local export = {}

local lang = require("モジュール:languages").getByCode("gem-pro")

-- Within this module, conjugations are the functions that do the actual
-- conjugating by creating the forms of a basic verb (not prefixed or
-- separable). They are defined further down.
local conjugations = {}

-- The main entry point.
-- This is the only function that can be invoked from a template.
function export.show(frame)
    local conj_type = frame.args[1] or error("活用の種類が指定されていません。引数1をモジュールの実行に与えて下さい。")
    local args = frame:getParent().args
    SUBPAGENAME = mw.title.getCurrentTitle().subpageText
    NAMESPACE = mw.title.getCurrentTitle().nsText
    
    local forms, title, categories
    
    if conjugations[conj_type] then
        forms, title, categories = conjugations[conj_type](args)
    else
        error("活用の種類不明 '" .. conj_type .. "'")
    end
    
    return make_table(forms, title) .. m_utilities.format_categories(categories, lang)
end


--[=[
    *** STRONG VERBS ***
]=]--

-- 強変化動詞を活用
conjugations["strong"] = function(args)
    local forms = {}
    local class = args["class"] or ""; if class ~= "" then class = "第" .. class .. "類" end
    local categories = {"ゲルマン祖語 強変化動詞" .. class}
    local title = "強変化" .. class
    
    local pres_stem = args[1] or (NAMESPACE == "テンプレート" and "(1)") or error("引数1が未入力です。")
    local past_sg_stem = args[2] or (NAMESPACE == "テンプレート" and "(2)") or error("引数2が未入力です。")
    local past_stem = args[3] or (NAMESPACE == "テンプレート" and "(3)") or error("引数3が未入力です。")
    local past_part_stem = args[4] or (NAMESPACE == "テンプレート" and "(4)") or error("引数4が未入力です。")
    local past_indc_stem = args["past_indc_stem"] or past_stem
    
    present_strong(forms, pres_stem)
    past_strong(forms, past_stem, past_sg_stem, past_indc_stem)
    forms["past_ptc"] = past_part_stem .. "anaz"
    
    return forms, title, categories
end

-- 強変化動詞j-現在を活用
conjugations["strong-j"] = function(args)
    local forms = {}
    local class = args["class"] or ""; if class ~= "" then class = "" .. class end
    local categories = {"ゲルマン祖語 強変化動詞" .. class}
    local title = "強変化" .. class .. " j-現在"
    
    local pres_stem = args[1] or (NAMESPACE == "テンプレート" and "(1)") or error("引数1が未入力です。")
    local past_sg_stem = args[2] or (NAMESPACE == "テンプレート" and "(2)") or error("引数2が未入力です。")
    local past_stem = args[3] or (NAMESPACE == "テンプレート" and "(3)") or error("引数3が未入力です。")
    local past_part_stem = args[4] or (NAMESPACE == "テンプレート" and "(4)") or error("引数4が未入力です。")
    local past_indc_stem = args["past_indc_stem"] or past_stem
    local j = args["j"] or (NAMESPACE == "テンプレート" and "j") or error("引数 j= が未入力です。")
    
    present_weak1(forms, pres_stem, j)
    past_strong(forms, past_stem, past_sg_stem, past_indc_stem)
    forms["past_ptc"] = past_part_stem .. "anaz"
    
    return forms, title, categories
end

-- Conjugate a weak verb with no suffix
conjugations["weak-nosuff"] = function(args)
    local forms = {}
    local categories = {"Proto-Germanic suffixless weak verbs"}
    local title = "weak suffixless"
    
    local stem = args[1] or (NAMESPACE == "テンプレート" and "(1)") or error("引数1が未入力です。")
    local past_stem = args[2]; if not past_stem or past_stem == "" then past_stem = stem .. "d" end
    
    present_strong(forms, stem)    
    past_weak(forms, past_stem)
    
    return forms, title, categories
end

-- 弱変化動詞第1類を活用
conjugations["weak1"] = function(args)
    local forms = {}
    local categories = {"ゲルマン祖語 弱変化動詞第1類"}
    local title = "弱変化第1類"
    
    local stem = args[1] or (NAMESPACE == "テンプレート" and "(1)") or error("引数1が未入力です。")
    local j = args["j"] or (NAMESPACE == "テンプレート" and "j") or error("引数 j= が未入力です。")
    
    present_weak1(forms, stem, j)
    past_weak(forms, stem .. "id")
    
    return forms, title, categories
end

-- 弱変化動詞j-現在第1類を活用
conjugations["weak1-j"] = function(args)
    local forms = {}
    local categories = {"ゲルマン祖語 弱変化動詞第1類"}
    local title = "弱変化j-現在第1類"
    
    local stem = args[1] or (NAMESPACE == "テンプレート" and "(1)") or error("引数1が未入力です。")
    local j = args["j"] or (NAMESPACE == "テンプレート" and "j") or error("引数 j= が未入力です。")
    
    present_weak1(forms, stem, j)    
    past_weak(forms, com.add_t(stem))
    forms["past_ptc"] = stem .. "idaz"
   
    return forms, title, categories
end

-- 弱変化動詞第2類を活用
conjugations["weak2"] = function(args)
    local forms = {}
    local categories = {"ゲルマン祖語 弱変化動詞第2類"}
    local title = "弱変化第2類"
    
    local stem = args[1] or (NAMESPACE == "テンプレート" and "(1)") or error("引数1が未入力です。")
    
    present_weak2(forms, stem)    
    past_weak(forms, stem .. "ōd")
    
    return forms, title, categories
end

-- 弱変化動詞第3類を活用
conjugations["weak3"] = function(args)
    local forms = {}
    local categories = {"ゲルマン祖語 弱変化動詞第3類"}
    local title = "弱変化第3類"
    
    local stem = args[1] or (NAMESPACE == "テンプレート" and "(1)") or error("The first parameter is missing")
    
    present_weak3_a(forms, stem)
    past_weak(forms, stem .. "ad")
    
    return forms, title, categories
end

-- Conjugate a weak class 3 j-present verb
conjugations["weak3-j"] = function(args)
    local forms = {}
    local categories = {"ゲルマン祖語 弱変化動詞第3類 j現在"}
    local title = "弱変化第3類 j現在"
    
    local stem = args[1] or (NAMESPACE == "Template" and "(1)") or error("The first parameter is missing")
    local j = args["j"] or (NAMESPACE == "Template" and "j") or error("The parameter j= is missing")
    
    present_weak3_ja(forms, stem, j)
    past_weak(forms, stem .. (j == "i" and "ī" or "") .. "d")
    
    return forms, title, categories
end

-- 弱変化動詞第4類を活用
conjugations["weak4"] = function(args)
    local forms = {}
    local categories = {"ゲルマン祖語 弱変化動詞第4類"}
    local title = "弱変化第4類"
    
    local stem = args[1] or (NAMESPACE == "テンプレート" and "(1)") or error("引数1が未入力です。")
    
    present_weak4(forms, stem)    
    past_weak(forms, stem .. "ōd")
    forms["past_ptc"] = ""
    
    return forms, title, categories
end

-- 過去現在動詞を活用
conjugations["pp"] = function(args)
    local forms = {}
    local categories = {"ゲルマン祖語 過去現在動詞"}
    local title = "[[過去現在動詞]]"
    
    local pres_stem = args[1] or (NAMESPACE == "テンプレート" and "(1)") or error("引数1が未入力です。")
    local pres_sg_stem = args[2] or (NAMESPACE == "テンプレート" and "(2)") or error("引数2が未入力です。")
    local past_stem = args[3] or (NAMESPACE == "テンプレート" and "(3)") or error("引数3が未入力です。")
    
    present_pp(forms, pres_stem, pres_sg_stem)
    past_weak(forms, past_stem)
    
    return forms, title, categories
end


--[=[
    *** IRREGULAR VERBS ***
]=]--

conjugations["beuną"] = function(args)
    local forms = {}
    local categories = {"ゲルマン祖語 不規則動詞"}
    local title = "不規則, 補充"
    
    past_strong(forms, "wēz", "was")
    forms["infinitive"] = "beuną"
    forms["pres_ptc"] = "wesandz"
    forms["past_ptc"] = ""
    
    -- 直説法
    forms["pres_indc_1sg"] = "biumi"
    forms["pres_indc_2sg"] = "biusi"
    forms["pres_indc_3sg"] = "biuþi"
    forms["pres_indc_1du"] = "beū?"
    forms["pres_indc_2du"] = "biuþiz"
    forms["pres_indc_1pl"] = "beum"
    forms["pres_indc_2pl"] = "beud"
    forms["pres_indc_3pl"] = "biunþi"
    
    -- 接続法
    forms["pres_subj_1sg"] = "biwjǭ?"
    forms["pres_subj_2sg"] = "biwjēs?"
    forms["pres_subj_3sg"] = "biwjē?"
    forms["pres_subj_1du"] = "biwīw"
    forms["pres_subj_2du"] = "biwīþiz"
    forms["pres_subj_1pl"] = "biwīm"
    forms["pres_subj_2pl"] = "biwīþ"
    forms["pres_subj_3pl"] = "biwīn"

    -- 命令法
    forms["impr_2sg"] = "beu"
    forms["impr_3sg"] = "beuþau"
    forms["impr_2du"] = "biudiz"
    forms["impr_2pl"] = "beuþ"
    forms["impr_3pl"] = "beunþau"
    
    -- 直説法受動態
    forms["pasv_indc_1sg"] = ""
    forms["pasv_indc_2sg"] = ""
    forms["pasv_indc_3sg"] = ""
    forms["pasv_indc_1du"] = ""
    forms["pasv_indc_2du"] = ""
    forms["pasv_indc_1pl"] = ""
    forms["pasv_indc_2pl"] = ""
    forms["pasv_indc_3pl"] = ""
    
    -- 接続法受動態
    forms["pasv_subj_1sg"] = ""
    forms["pasv_subj_2sg"] = ""
    forms["pasv_subj_3sg"] = ""
    forms["pasv_subj_1du"] = ""
    forms["pasv_subj_2du"] = ""
    forms["pasv_subj_1pl"] = ""
    forms["pasv_subj_2pl"] = ""
    forms["pasv_subj_3pl"] = ""

    return forms, title, categories
end

conjugations["dōną"] = function(args)
    local forms = {}
    local categories = {"ゲルマン祖語 不規則動詞"}
    local title = "不規則"
    
    present_weak2(forms, "d")
    past_weak(forms, "d")
    forms["pres_indc_1sg"] = "dōmi"
    forms["past_indc_1sg"] = "dedǭ"
    forms["past_indc_2sg"] = "dedēz"
    forms["past_indc_3sg"] = "dedē"
    forms["past_ptc"] = "dōnaz"
    
    -- 直説法受動態
    forms["pasv_indc_1sg"] = ""
    forms["pasv_indc_2sg"] = ""
    forms["pasv_indc_3sg"] = ""
    forms["pasv_indc_1du"] = ""
    forms["pasv_indc_2du"] = ""
    forms["pasv_indc_1pl"] = ""
    forms["pasv_indc_2pl"] = ""
    forms["pasv_indc_3pl"] = ""
    
    -- 接続法受動態
    forms["pasv_subj_1sg"] = ""
    forms["pasv_subj_2sg"] = ""
    forms["pasv_subj_3sg"] = ""
    forms["pasv_subj_1du"] = ""
    forms["pasv_subj_2du"] = ""
    forms["pasv_subj_1pl"] = ""
    forms["pasv_subj_2pl"] = ""
    forms["pasv_subj_3pl"] = ""

    return forms, title, categories
end

conjugations["gāną"] = function(args)
    local forms = {}
    local categories = {"ゲルマン祖語 不規則動詞"}
    local title = "不規則, 補充"
    
    present_weak3_a(forms, "g")
    past_weak(forms, "ijj")
    forms["past_ptc"] = "gānaz"
    
    -- 直説法受動態
    forms["pasv_indc_1sg"] = ""
    forms["pasv_indc_2sg"] = ""
    forms["pasv_indc_3sg"] = ""
    forms["pasv_indc_1du"] = ""
    forms["pasv_indc_2du"] = ""
    forms["pasv_indc_1pl"] = ""
    forms["pasv_indc_2pl"] = ""
    forms["pasv_indc_3pl"] = ""
    
    -- 接続法受動態
    forms["pasv_subj_1sg"] = ""
    forms["pasv_subj_2sg"] = ""
    forms["pasv_subj_3sg"] = ""
    forms["pasv_subj_1du"] = ""
    forms["pasv_subj_2du"] = ""
    forms["pasv_subj_1pl"] = ""
    forms["pasv_subj_2pl"] = ""
    forms["pasv_subj_3pl"] = ""

    return forms, title, categories
end

conjugations["stāną"] = function(args)
    local forms = {}
    local categories = {"ゲルマン祖語 不規則動詞"}
    local title = "不規則"
    
    present_weak3_a(forms, "st")
    past_strong(forms, "stōd", "stōþ")
    forms["past_ptc"] = "stadanaz"
    
    -- 直説法受動態
    forms["pasv_indc_1sg"] = ""
    forms["pasv_indc_2sg"] = ""
    forms["pasv_indc_3sg"] = ""
    forms["pasv_indc_1du"] = ""
    forms["pasv_indc_2du"] = ""
    forms["pasv_indc_1pl"] = ""
    forms["pasv_indc_2pl"] = ""
    forms["pasv_indc_3pl"] = ""
    
    -- 接続法受動態
    forms["pasv_subj_1sg"] = ""
    forms["pasv_subj_2sg"] = ""
    forms["pasv_subj_3sg"] = ""
    forms["pasv_subj_1du"] = ""
    forms["pasv_subj_2du"] = ""
    forms["pasv_subj_1pl"] = ""
    forms["pasv_subj_2pl"] = ""
    forms["pasv_subj_3pl"] = ""

    return forms, title, categories
end

conjugations["wesaną"] = function(args)
    local forms = {}
    local categories = {"ゲルマン祖語 不規則動詞"}
    local title = "不規則, 補充"
    
    present_strong(forms, "wes")
    past_strong(forms, "wēz", "was")
    forms["past_ptc"] = ""
    
    -- 直説法
    forms["pres_indc_1sg"] = "immi"
    forms["pres_indc_2sg"] = "izi"
    forms["pres_indc_3sg"] = "isti"
    forms["pres_indc_1du"] = "izū"
    forms["pres_indc_2du"] = "izudiz"
    forms["pres_indc_1pl"] = "izum"
    forms["pres_indc_2pl"] = "izud"
    forms["pres_indc_3pl"] = "sindi"
    
    -- 接続法
    forms["pres_subj_1sg"] = "sijǭ"
    forms["pres_subj_2sg"] = "sijēs"
    forms["pres_subj_3sg"] = "sijē"
    forms["pres_subj_1du"] = "sīw"
    forms["pres_subj_2du"] = "sīþiz"
    forms["pres_subj_1pl"] = "sīm"
    forms["pres_subj_2pl"] = "sīþ"
    forms["pres_subj_3pl"] = "sīn"
    
    -- 直説法受動態
    forms["pasv_indc_1sg"] = ""
    forms["pasv_indc_2sg"] = ""
    forms["pasv_indc_3sg"] = ""
    forms["pasv_indc_1du"] = ""
    forms["pasv_indc_2du"] = ""
    forms["pasv_indc_1pl"] = ""
    forms["pasv_indc_2pl"] = ""
    forms["pasv_indc_3pl"] = ""
    
    -- 接続法受動態
    forms["pasv_subj_1sg"] = ""
    forms["pasv_subj_2sg"] = ""
    forms["pasv_subj_3sg"] = ""
    forms["pasv_subj_1du"] = ""
    forms["pasv_subj_2du"] = ""
    forms["pasv_subj_1pl"] = ""
    forms["pasv_subj_2pl"] = ""
    forms["pasv_subj_3pl"] = ""

    return forms, title, categories
end

conjugations["wiljaną"] = function(args)
    local forms = {}
    local categories = {"ゲルマン祖語 不規則動詞"}
    local title = "不規則, 欠如"
    
    -- 直説法
    forms["pres_indc_1sg"] = ""
    forms["pres_indc_2sg"] = ""
    forms["pres_indc_3sg"] = ""
    forms["pres_indc_1du"] = ""
    forms["pres_indc_2du"] = ""
    forms["pres_indc_1pl"] = ""
    forms["pres_indc_2pl"] = ""
    forms["pres_indc_3pl"] = ""
    
    -- 接続法
    forms["pres_subj_1sg"] = "wiljų"
    forms["pres_subj_2sg"] = "wilīz"
    forms["pres_subj_3sg"] = "wilī"
    forms["pres_subj_1du"] = "wilīw"
    forms["pres_subj_2du"] = "wilīdiz"
    forms["pres_subj_1pl"] = "wilīm"
    forms["pres_subj_2pl"] = "wilīd"
    forms["pres_subj_3pl"] = "wilīn"
    
    -- 命令法
    forms["impr_2sg"] = ""
    forms["impr_3sg"] = ""
    forms["impr_2du"] = ""
    forms["impr_2pl"] = ""
    forms["impr_3pl"] = ""
    
    -- 直説法受動態
    forms["pasv_indc_1sg"] = ""
    forms["pasv_indc_2sg"] = ""
    forms["pasv_indc_3sg"] = ""
    forms["pasv_indc_1du"] = ""
    forms["pasv_indc_2du"] = ""
    forms["pasv_indc_1pl"] = ""
    forms["pasv_indc_2pl"] = ""
    forms["pasv_indc_3pl"] = ""
    
    -- 接続法受動態
    forms["pasv_subj_1sg"] = ""
    forms["pasv_subj_2sg"] = ""
    forms["pasv_subj_3sg"] = ""
    forms["pasv_subj_1du"] = ""
    forms["pasv_subj_2du"] = ""
    forms["pasv_subj_1pl"] = ""
    forms["pasv_subj_2pl"] = ""
    forms["pasv_subj_3pl"] = ""
    
    forms["infinitive"] = "wiljaną"
    forms["pres_ptc"] = "wiljandz"
    
    past_weak(forms, "weld")
    forms["past_ptc"] = ""
    
    return forms, title, categories
end


--[=[
    *** HELPER FUNCTIONS ***
]=]--

function present_strong(forms, stem)
    local i_stem = com.i_mutation(stem) .. "i"
    
    -- 直説法
    forms["pres_indc_1sg"] = stem .. "ō"
    forms["pres_indc_2sg"] = i_stem .. "zi"
    forms["pres_indc_3sg"] = i_stem .. "di"
    forms["pres_indc_1du"] = stem .. "ōz"
    forms["pres_indc_2du"] = stem .. "adiz"
    forms["pres_indc_1pl"] = stem .. "amaz"
    forms["pres_indc_2pl"] = i_stem .. "d"
    forms["pres_indc_3pl"] = stem .. "andi"
    
    -- 接続法
    forms["pres_subj_1sg"] = stem .. "aų"
    forms["pres_subj_2sg"] = stem .. "aiz"
    forms["pres_subj_3sg"] = stem .. "ai"
    forms["pres_subj_1du"] = stem .. "aiw"
    forms["pres_subj_2du"] = stem .. "aidiz"
    forms["pres_subj_1pl"] = stem .. "aim"
    forms["pres_subj_2pl"] = stem .. "aid"
    forms["pres_subj_3pl"] = stem .. "ain"
    
    -- 命令法
    forms["impr_2sg"] = stem
    forms["impr_3sg"] = stem .. "adau"
    forms["impr_2du"] = stem .. "adiz"
    forms["impr_2pl"] = i_stem .. "d"
    forms["impr_3pl"] = stem .. "andau"
    
    -- 直説法受動態
    forms["pasv_indc_1sg"] = stem .. "ai"
    forms["pasv_indc_2sg"] = stem .. "azai"
    forms["pasv_indc_3sg"] = stem .. "adai"
    forms["pasv_indc_1du"] = ""
    forms["pasv_indc_2du"] = ""
    forms["pasv_indc_1pl"] = stem .. "andai"
    forms["pasv_indc_2pl"] = stem .. "andai"
    forms["pasv_indc_3pl"] = stem .. "andai"
    
    -- 接続法受動態
    forms["pasv_subj_1sg"] = "?"
    forms["pasv_subj_2sg"] = stem .. "aizau"
    forms["pasv_subj_3sg"] = stem .. "aidau"
    forms["pasv_subj_1du"] = ""
    forms["pasv_subj_2du"] = ""
    forms["pasv_subj_1pl"] = stem .. "aindau"
    forms["pasv_subj_2pl"] = stem .. "aindau"
    forms["pasv_subj_3pl"] = stem .. "aindau"
    
    forms["infinitive"] = stem .. "aną"
    forms["pres_ptc"] = stem .. "andz"
end

function present_weak1(forms, stem, j)
    local i_stem = stem .. (j == "j" and "i" or "ī")
    stem = stem .. j
    
    -- 直説法
    forms["pres_indc_1sg"] = stem .. "ō"
    forms["pres_indc_2sg"] = i_stem .. "si"
    forms["pres_indc_3sg"] = i_stem .. "þi"
    forms["pres_indc_1du"] = stem .. "ōs"
    forms["pres_indc_2du"] = stem .. "aþiz"
    forms["pres_indc_1pl"] = stem .. "amaz"
    forms["pres_indc_2pl"] = i_stem .. "þ"
    forms["pres_indc_3pl"] = stem .. "anþi"
    
    -- 接続法
    forms["pres_subj_1sg"] = stem .. "aų"
    forms["pres_subj_2sg"] = stem .. "ais"
    forms["pres_subj_3sg"] = stem .. "ai"
    forms["pres_subj_1du"] = stem .. "aiw"
    forms["pres_subj_2du"] = stem .. "aiþiz"
    forms["pres_subj_1pl"] = stem .. "aim"
    forms["pres_subj_2pl"] = stem .. "aiþ"
    forms["pres_subj_3pl"] = stem .. "ain"
    
    -- 命令法
    forms["impr_2sg"] = i_stem
    forms["impr_3sg"] = stem .. "aþau"
    forms["impr_2du"] = stem .. "aþiz"
    forms["impr_2pl"] = i_stem .. "þ"
    forms["impr_3pl"] = stem .. "anþau"
    
    -- 直説法受動態
    forms["pasv_indc_1sg"] = stem .. "ai"
    forms["pasv_indc_2sg"] = stem .. "asai"
    forms["pasv_indc_3sg"] = stem .. "aþai"
    forms["pasv_indc_1du"] = ""
    forms["pasv_indc_2du"] = ""
    forms["pasv_indc_1pl"] = stem .. "anþai"
    forms["pasv_indc_2pl"] = stem .. "anþai"
    forms["pasv_indc_3pl"] = stem .. "anþai"
    
    -- 接続法受動態
    forms["pasv_subj_1sg"] = "?"
    forms["pasv_subj_2sg"] = stem .. "aisau"
    forms["pasv_subj_3sg"] = stem .. "aiþau"
    forms["pasv_subj_1du"] = ""
    forms["pasv_subj_2du"] = ""
    forms["pasv_subj_1pl"] = stem .. "ainþau"
    forms["pasv_subj_2pl"] = stem .. "ainþau"
    forms["pasv_subj_3pl"] = stem .. "ainþau"
    
    forms["infinitive"] = stem .. "aną"
    forms["pres_ptc"] = stem .. "andz"
end

function present_weak2(forms, stem)
    -- 直説法
    forms["pres_indc_1sg"] = stem .. "ō"
    forms["pres_indc_2sg"] = stem .. "ōsi"
    forms["pres_indc_3sg"] = stem .. "ōþi"
    forms["pres_indc_1du"] = stem .. "ōs"
    forms["pres_indc_2du"] = stem .. "ōþiz"
    forms["pres_indc_1pl"] = stem .. "ōmaz"
    forms["pres_indc_2pl"] = stem .. "ōþ"
    forms["pres_indc_3pl"] = stem .. "ōnþi"
    
    -- 接続法
    forms["pres_subj_1sg"] = stem .. "ǭ"
    forms["pres_subj_2sg"] = stem .. "ōs"
    forms["pres_subj_3sg"] = stem .. "ō"
    forms["pres_subj_1du"] = stem .. "ōw"
    forms["pres_subj_2du"] = stem .. "ōþiz"
    forms["pres_subj_1pl"] = stem .. "ōm"
    forms["pres_subj_2pl"] = stem .. "ōþ"
    forms["pres_subj_3pl"] = stem .. "ōn"
    
    -- 命令法
    forms["impr_2sg"] = stem .. "ō"
    forms["impr_3sg"] = stem .. "ōþau"
    forms["impr_2du"] = stem .. "ōþiz"
    forms["impr_2pl"] = stem .. "ōþ"
    forms["impr_3pl"] = stem .. "ōnþau"
    
    -- 直説法受動態
    forms["pasv_indc_1sg"] = stem .. "ōi"
    forms["pasv_indc_2sg"] = stem .. "ōsai"
    forms["pasv_indc_3sg"] = stem .. "ōþai"
    forms["pasv_indc_1du"] = ""
    forms["pasv_indc_2du"] = ""
    forms["pasv_indc_1pl"] = stem .. "ōnþai"
    forms["pasv_indc_2pl"] = stem .. "ōnþai"
    forms["pasv_indc_3pl"] = stem .. "ōnþai"
    
    -- 接続法受動態
    forms["pasv_subj_1sg"] = "?"
    forms["pasv_subj_2sg"] = stem .. "ōsau"
    forms["pasv_subj_3sg"] = stem .. "ōþau"
    forms["pasv_subj_1du"] = ""
    forms["pasv_subj_2du"] = ""
    forms["pasv_subj_1pl"] = stem .. "ōnþau"
    forms["pasv_subj_2pl"] = stem .. "ōnþau"
    forms["pasv_subj_3pl"] = stem .. "ōnþau"
    
    forms["infinitive"] = stem .. "ōną"
    forms["pres_ptc"] = stem .. "ōndz"
end

function present_weak3_ja(forms, stem, j)
    local i_stem = stem .. (j == "i" and "ij" or "") .. "ai"
    stem = stem .. (j == "i" and "ij" or j)
    
    -- 直説法
    forms["pres_indc_1sg"] = stem .. "ō"
    forms["pres_indc_2sg"] = i_stem .. "si"
    forms["pres_indc_3sg"] = i_stem .. "þi"
    forms["pres_indc_1du"] = stem .. "ōs"
    forms["pres_indc_2du"] = stem .. "aþiz"
    forms["pres_indc_1pl"] = stem .. "amaz"
    forms["pres_indc_2pl"] = i_stem .. "þ"
    forms["pres_indc_3pl"] = stem .. "anþi"
    
    -- 接続法
    forms["pres_subj_1sg"] = stem .. "aų"
    forms["pres_subj_2sg"] = stem .. "ais"
    forms["pres_subj_3sg"] = stem .. "ai"
    forms["pres_subj_1du"] = stem .. "aiw"
    forms["pres_subj_2du"] = stem .. "aiþiz"
    forms["pres_subj_1pl"] = stem .. "aim"
    forms["pres_subj_2pl"] = stem .. "aiþ"
    forms["pres_subj_3pl"] = stem .. "ain"
    
    -- 命令法
    forms["impr_2sg"] = i_stem
    forms["impr_3sg"] = stem .. "aþau"
    forms["impr_2du"] = stem .. "aþiz"
    forms["impr_2pl"] = i_stem .. "þ"
    forms["impr_3pl"] = stem .. "anþau"
    
    -- 直説法受動態
    forms["pasv_indc_1sg"] = ""
    forms["pasv_indc_2sg"] = ""
    forms["pasv_indc_3sg"] = ""
    forms["pasv_indc_1du"] = ""
    forms["pasv_indc_2du"] = ""
    forms["pasv_indc_1pl"] = ""
    forms["pasv_indc_2pl"] = ""
    forms["pasv_indc_3pl"] = ""
    
    -- 接続法受動態
    forms["pasv_subj_1sg"] = ""
    forms["pasv_subj_2sg"] = ""
    forms["pasv_subj_3sg"] = ""
    forms["pasv_subj_1du"] = ""
    forms["pasv_subj_2du"] = ""
    forms["pasv_subj_1pl"] = ""
    forms["pasv_subj_2pl"] = ""
    forms["pasv_subj_3pl"] = ""
    
    forms["infinitive"] = stem .. "aną"
    forms["pres_ptc"] = stem .. "andz"
end

function present_weak3_a(forms, stem)
    -- 直説法
    forms["pres_indc_1sg"] = stem .. "ō"
    forms["pres_indc_2sg"] = stem .. "aisi"
    forms["pres_indc_3sg"] = stem .. "aiþi"
    forms["pres_indc_1du"] = stem .. "ōs"
    forms["pres_indc_2du"] = stem .. "āþiz"
    forms["pres_indc_1pl"] = stem .. "āmaz"
    forms["pres_indc_2pl"] = stem .. "aiþ"
    forms["pres_indc_3pl"] = stem .. "ānþi"
    
    -- 接続法
    forms["pres_subj_1sg"] = "?"
    forms["pres_subj_2sg"] = "?"
    forms["pres_subj_3sg"] = "?"
    forms["pres_subj_1du"] = "?"
    forms["pres_subj_2du"] = "?"
    forms["pres_subj_1pl"] = "?"
    forms["pres_subj_2pl"] = "?"
    forms["pres_subj_3pl"] = "?"
    
    -- 命令法
    forms["impr_2sg"] = stem .. "ai"
    forms["impr_3sg"] = stem .. "āþau"
    forms["impr_2du"] = stem .. "āþiz"
    forms["impr_2pl"] = stem .. "aiþ"
    forms["impr_3pl"] = stem .. "ānþau"
    
    -- 直説法受動態
    forms["pasv_indc_1sg"] = "?"
    forms["pasv_indc_2sg"] = stem .. "āsai"
    forms["pasv_indc_3sg"] = stem .. "āþai"
    forms["pasv_indc_1du"] = ""
    forms["pasv_indc_2du"] = ""
    forms["pasv_indc_1pl"] = stem .. "ānþai"
    forms["pasv_indc_2pl"] = stem .. "ānþai"
    forms["pasv_indc_3pl"] = stem .. "ānþai"
    
    -- 接続法受動態
    forms["pasv_subj_1sg"] = "?"
    forms["pasv_subj_2sg"] = "?"
    forms["pasv_subj_3sg"] = "?"
    forms["pasv_subj_1du"] = ""
    forms["pasv_subj_2du"] = ""
    forms["pasv_subj_1pl"] = "?"
    forms["pasv_subj_2pl"] = "?"
    forms["pasv_subj_3pl"] = "?"
    
    forms["infinitive"] = stem .. "āną"
    forms["pres_ptc"] = stem .. "āndz"
end

function present_weak4(forms, stem)
    -- 直説法
    forms["pres_indc_1sg"] = stem .. "ō"
    forms["pres_indc_2sg"] = stem .. "ōsi"
    forms["pres_indc_3sg"] = stem .. "ōþi"
    forms["pres_indc_1du"] = stem .. "ōs"
    forms["pres_indc_2du"] = stem .. "aþiz"
    forms["pres_indc_1pl"] = stem .. "amaz"
    forms["pres_indc_2pl"] = stem .. "aþ"
    forms["pres_indc_3pl"] = stem .. "anþi"
    
    -- 接続法
    forms["pres_subj_1sg"] = stem .. "aų"
    forms["pres_subj_2sg"] = stem .. "ais"
    forms["pres_subj_3sg"] = stem .. "ai"
    forms["pres_subj_1du"] = stem .. "aiw"
    forms["pres_subj_2du"] = stem .. "aiþiz"
    forms["pres_subj_1pl"] = stem .. "aim"
    forms["pres_subj_2pl"] = stem .. "aiþ"
    forms["pres_subj_3pl"] = stem .. "ain"
    
    -- 命令法
    forms["impr_2sg"] = stem .. "ō"
    forms["impr_3sg"] = stem .. "ōþau"
    forms["impr_2du"] = stem .. "aþiz"
    forms["impr_2pl"] = stem .. "aþ"
    forms["impr_3pl"] = stem .. "anþau"
    
    -- 直説法受動態
    forms["pasv_indc_1sg"] = ""
    forms["pasv_indc_2sg"] = ""
    forms["pasv_indc_3sg"] = ""
    forms["pasv_indc_1du"] = ""
    forms["pasv_indc_2du"] = ""
    forms["pasv_indc_1pl"] = ""
    forms["pasv_indc_2pl"] = ""
    forms["pasv_indc_3pl"] = ""
    
    -- 接続法受動態
    forms["pasv_subj_1sg"] = ""
    forms["pasv_subj_2sg"] = ""
    forms["pasv_subj_3sg"] = ""
    forms["pasv_subj_1du"] = ""
    forms["pasv_subj_2du"] = ""
    forms["pasv_subj_1pl"] = ""
    forms["pasv_subj_2pl"] = ""
    forms["pasv_subj_3pl"] = ""
    
    forms["infinitive"] = stem .. "aną"
    forms["pres_ptc"] = stem .. "andz"
end

-- 過去現在動詞の現在形を作成
function present_pp(forms, stem, sg_stem)
    -- 直説法
    forms["pres_indc_1sg"] = sg_stem
    forms["pres_indc_2sg"] = com.add_t(sg_stem)
    forms["pres_indc_3sg"] = sg_stem
    forms["pres_indc_1du"] = stem .. "ū"
    forms["pres_indc_2du"] = stem .. "udiz"
    forms["pres_indc_1pl"] = stem .. "um"
    forms["pres_indc_2pl"] = stem .. "ud"
    forms["pres_indc_3pl"] = stem .. "un"
    
    -- 接続法
    forms["pres_subj_1sg"] = stem .. "į̄"
    forms["pres_subj_2sg"] = stem .. "īz"
    forms["pres_subj_3sg"] = stem .. "ī"
    forms["pres_subj_1du"] = stem .. "īw"
    forms["pres_subj_2du"] = stem .. "īdiz"
    forms["pres_subj_1pl"] = stem .. "īm"
    forms["pres_subj_2pl"] = stem .. "īd"
    forms["pres_subj_3pl"] = stem .. "īn"
    
    -- 命令法
    forms["impr_2sg"] = ""
    forms["impr_3sg"] = ""
    forms["impr_2du"] = ""
    forms["impr_2pl"] = ""
    forms["impr_3pl"] = ""
    
    -- 直説法受動態
    forms["pasv_indc_1sg"] = ""
    forms["pasv_indc_2sg"] = ""
    forms["pasv_indc_3sg"] = ""
    forms["pasv_indc_1du"] = ""
    forms["pasv_indc_2du"] = ""
    forms["pasv_indc_1pl"] = ""
    forms["pasv_indc_2pl"] = ""
    forms["pasv_indc_3pl"] = ""
    
    -- 接続法受動態
    forms["pasv_subj_1sg"] = ""
    forms["pasv_subj_2sg"] = ""
    forms["pasv_subj_3sg"] = ""
    forms["pasv_subj_1du"] = ""
    forms["pasv_subj_2du"] = ""
    forms["pasv_subj_1pl"] = ""
    forms["pasv_subj_2pl"] = ""
    forms["pasv_subj_3pl"] = ""

    forms["infinitive"] = stem .. "aną"
    forms["pres_ptc"] = stem .. "andz"
end

-- 強変化動詞の過去形を作成
function past_strong(forms, stem, sg_stem, indc_stem)
    forms["past_indc_1sg"] = sg_stem
    forms["past_indc_2sg"] = com.add_t(sg_stem)
    forms["past_indc_3sg"] = sg_stem
    
    past_generic(forms, stem, indc_stem)
end

-- 弱変化動詞の過去形を作成
function past_weak(forms, stem)
    forms["past_indc_1sg"] = stem .. "ǭ"
    forms["past_indc_2sg"] = stem .. "ēz"
    forms["past_indc_3sg"] = stem .. "ē"
    
    past_generic(forms, stem .. "ēd")
    
    forms["past_ptc"] = stem .. "az"
end

-- 一般的な過去形を作成
function past_generic(forms, stem, indc_stem)
    indc_stem = indc_stem or stem
    
    -- 直説法(単数以外)
    forms["past_indc_1du"] = indc_stem .. "ū"
    forms["past_indc_2du"] = indc_stem .. "udiz"
    forms["past_indc_1pl"] = indc_stem .. "um"
    forms["past_indc_2pl"] = indc_stem .. "ud"
    forms["past_indc_3pl"] = indc_stem .. "un"
    
    -- 接続法
    forms["past_subj_1sg"] = stem .. "į̄"
    forms["past_subj_2sg"] = stem .. "īz"
    forms["past_subj_3sg"] = stem .. "ī"
    forms["past_subj_1du"] = stem .. "īw"
    forms["past_subj_2du"] = stem .. "īdiz"
    forms["past_subj_1pl"] = stem .. "īm"
    forms["past_subj_2pl"] = stem .. "īd"
    forms["past_subj_3pl"] = stem .. "īn"
end

-- テーブルの作成
function make_table(forms, title)
    -- Make links out of all forms
    for key, form in pairs(forms) do
        forms[key] = com.tag_form(form)
    end
    
    return [=[
<div class="NavFrame" style="width: 100%;">
<div class="NavHead" style="text-align: left"> '']=] .. forms["infinitive"] .. "'' の活用" .. (title and " (" .. title .. ")" or "") .. [=[</div>
<div class="NavContent">
{| class="wikitable inflection-table" style="text-align: left; width: 100%; line-height: 125%; margin: 0;"
|-
| colspan="1" |
! colspan="3" | [[能動態]]
! colspan="2" | [[受動態]]
|-
! [[現在形|現在]]
! style="width: 16%;" | [[直説法]]
! style="width: 16%;" | [[接続法]]
! style="width: 16%;" | [[命令法]]
! style="width: 16%;" | [[直説法]]
! style="width: 16%;" | [[接続法]]
|-
! [[一人称]][[単数]]
| ]=] .. forms["pres_indc_1sg"] .. " || " .. forms["pres_subj_1sg"] .. " || &mdash; || " .. forms["pasv_indc_1sg"] .. " || " .. forms["pasv_subj_1sg"] .. [=[

|-
! [[二人称]]単数
| ]=] .. forms["pres_indc_2sg"] .. " || " .. forms["pres_subj_2sg"] .. " || " .. forms["impr_2sg"] .. " || " .. forms["pasv_indc_2sg"] .. " || " .. forms["pasv_subj_2sg"] .. [=[

|-
! [[三人称]]単数
| ]=] .. forms["pres_indc_3sg"] .. " || " .. forms["pres_subj_3sg"] .. " || " .. forms["impr_3sg"] .. " || " .. forms["pasv_indc_3sg"] .. " || " .. forms["pasv_subj_3sg"] .. [=[

|-
! 一人称[[双数]]
| ]=] .. forms["pres_indc_1du"] .. " || " .. forms["pres_subj_1du"] .. " || &mdash; || " .. forms["pasv_indc_1du"] .. " || " .. forms["pasv_subj_1du"] .. [=[

|-
! 二人称双数
| ]=] .. forms["pres_indc_2du"] .. " || " .. forms["pres_subj_2du"] .. " || " .. forms["impr_2du"] .. " || " .. forms["pasv_indc_2du"] .. " || " .. forms["pasv_subj_2du"] .. [=[

|-
! 一人称[[複数]]
| ]=] .. forms["pres_indc_1pl"] .. " || " .. forms["pres_subj_1pl"] .. " || &mdash; || " .. forms["pasv_indc_1pl"] .. " || " .. forms["pasv_subj_1pl"] .. [=[

|-
! 二人称複数
| ]=] .. forms["pres_indc_2pl"] .. " || " .. forms["pres_subj_2pl"] .. " || " .. forms["impr_2pl"] .. " || " .. forms["pasv_indc_2pl"] .. " || " .. forms["pasv_subj_2pl"] .. [=[

|-
! 三人称複数
| ]=] .. forms["pres_indc_3pl"] .. " || " .. forms["pres_subj_3pl"] .. " || " .. forms["impr_3pl"] .. " || " .. forms["pasv_indc_3pl"] .. " || " .. forms["pasv_subj_3pl"] .. [=[

|-
| colspan="6" |
|-
! colspan="1" | [[過去形|過去]]
! style="width: 20%;" | [[直説法]]
! style="width: 20%;" | [[接続法]]
| colspan="3" rowspan="9" |
|-
! 一人称単数
| ]=] .. forms["past_indc_1sg"] .. " || " .. forms["past_subj_1sg"] .. [=[

|-
! 二人称単数
| ]=] .. forms["past_indc_2sg"] .. " || " .. forms["past_subj_2sg"] .. [=[

|-
! 三人称単数
| ]=] .. forms["past_indc_3sg"] .. " || " .. forms["past_subj_3sg"] .. [=[

|-
! 一人称双数
| ]=] .. forms["past_indc_1du"] .. " || " .. forms["past_subj_1du"] .. [=[

|-
! 二人称双数
| ]=] .. forms["past_indc_2du"] .. " || " .. forms["past_subj_2du"] .. [=[

|-
! 一人称複数
| ]=] .. forms["past_indc_1pl"] .. " || " .. forms["past_subj_1pl"] .. [=[

|-
! 二人称複数
| ]=] .. forms["past_indc_2pl"] .. " || " .. forms["past_subj_2pl"] .. [=[

|-
! 三人称複数
| ]=] .. forms["past_indc_3pl"] .. " || " .. forms["past_subj_3pl"] .. [=[

|-
| colspan="6" |
|-
|
! 現在
! 過去
| colspan="3" rowspan="2" |
|-
! [[分詞]]
| ]=] .. forms["pres_ptc"] .. " || " .. forms["past_ptc"] .. [=[

|}</div></div>]=]
end

function make_bot_list(forms, hasSep)
    local ret = ""
    
    if hasSep then
        ret = ret .. "* sep=1\n"
    end
    
    for key, form in pairs(forms) do
        ret = ret .. "* " .. key .. "=" .. form .. "\n"
    end
    
    return ret
end

return export