Modul:Verb: Unterschied zwischen den Versionen

Aus KGS-Wiki
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
 
(40 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 7: Zeile 7:
local KONJ_PASS= 4
local KONJ_PASS= 4
local IMPERATIV= 5
local IMPERATIV= 5
local PERSONEN = {'1. Person Singular', '2. Person Singular', '3. Person Singular';
local PERSONEN = {'1S','2S','3S','1P','2P','3P'}
                  '1. Person Plural',   '2. Person Plural',   '3. Person Plural'}
local MODI = {}
MODI[IND_AKT]  = "Indikativ Aktiv"
MODI[KONJ_AKT] = "Konjunktiv Aktiv"
MODI[IND_PASS] = "Indikativ Passiv"
MODI[KONJ_PASS]= "Konjunktiv Passiv"
MODI[IMPERATIV]= "Imperativ"
local PRAES = 1
local PRAES = 1
local PERF  = 2
local PERF  = 2
Zeile 23: Zeile 16:
local RRISTUR = {'r', 'ris', 'tur', 'mur', 'mini', 'ntur'}
local RRISTUR = {'r', 'ris', 'tur', 'mur', 'mini', 'ntur'}


 
local frame = mw.getCurrentFrame()
function init()
local inf    = frame.args[1] or frame:getParent().args[1] or 'Infinitiv';
local frame = mw.getCurrentFrame()
local lInf  = frame.args[2] or frame:getParent().args[2] or 0;
    return {
local praes  = frame.args[3] or frame:getParent().args[3] or 'Präsensstamm + ';
        inf    = frame.args[1] or frame:getParent().args[1] or 'Infinitiv';
local perf  = frame.args[4] or frame:getParent().args[4] or 'Perfektstamm + ';
        lInf  = frame.args[2] or frame:getParent().args[2] or 0;
local lPerf  = frame.args[5] or frame:getParent().args[5] or 0;
        praes  = frame.args[3] or frame:getParent().args[3] or 'Präsensstamm + ';
local ppp    = frame.args[6] or frame:getParent().args[6] or 'PPP-Stamm + ';
        perf  = frame.args[4] or frame:getParent().args[4] or 'Perfektstamm + ';
local lPPP  = frame.args[7] or frame:getParent().args[7] or 0;
        lPerf  = frame.args[5] or frame:getParent().args[5] or 0;
local praesGV= frame.args.PraesGV or frame:getParent().args.PraesGV or 'AP';
        ppp    = frame.args[6] or frame:getParent().args[6] or 'PPP-Stamm + ';
local perfGV = frame.args.PerfGV or frame:getParent().args.PerfGV or 'AP';
        lPPP  = frame.args[7] or frame:getParent().args[7] or 0;
        praesGV= frame.args.PraesGV or frame:getParent().args.PraesGV or 'AP';
        perfGV = frame.args.PerfGV or frame:getParent().args.PerfGV or 'AP';
    }
end


function bildeInfinitive(params)
function bildeInfinitive(params)
local inf = params.inf
local praes = params.praes
local perf = params.perf
local ppp = params.ppp
local formen = {{},{}, {}}
local formen = {{},{}, {}}
formen[PRAES][IND_AKT] = inf
formen[PRAES][IND_AKT] = inf
Zeile 62: Zeile 46:
function bildePartizipien(params)
function bildePartizipien(params)
local formen = {}
local formen = {}
if params.praes:match("[ae]$") then
if praes:match("[ae]$") then
formen[PRAES] = params.praes .. "ns, " .. params.praes .. "ntis"
formen[PRAES] = praes .. "ns, " .. praes .. "ntis"
else
else
formen[PRAES] = params.praes .. "ens, " .. params.praes .. "entis"
formen[PRAES] = praes .. "ens, " .. praes .. "entis"
end
end
formen[PERF] = params.ppp .. "us/a/um"
formen[PERF] = ppp .. "us/a/um"
formen[FUTUR] = params.ppp .. "urus/a/um"
formen[FUTUR] = ppp .. "urus/a/um"
return formen
return formen
end
end
Zeile 74: Zeile 58:
function bildeND(params)
function bildeND(params)
local formen = {}
local formen = {}
if params.praes:match("[ae]$") then
if praes:match("[ae]$") then
formen[1] = params.praes .. "ndi"
formen[1] = praes .. "ndi"
formen[2] = params.praes .. "ndus/a/um"
formen[2] = praes .. "ndus/a/um"
else
else
formen[1] = params.praes .. "endi"
formen[1] = praes .. "endi"
formen[2] = params.praes .. "endus/a/um"
formen[2] = praes .. "endus/a/um"
end
end
return formen
return formen
Zeile 85: Zeile 69:


function bildePraesens(params)
function bildePraesens(params)
    local praes = params.praes
     local formen = createFormTable(praesGV)
     local formen = createFormTable(params.praesGV)
     local endungen = {}
     local endungen = {}
     endungen[IND_AKT]  = OST
     endungen[IND_AKT]  = OST
Zeile 92: Zeile 75:
     endungen[IND_PASS] = ORRISTUR
     endungen[IND_PASS] = ORRISTUR
     endungen[KONJ_PASS]= RRISTUR
     endungen[KONJ_PASS]= RRISTUR
    formen[IMPERATIV] = {}
     if not praes:match("[aei]$") then
     if not praes:match("[aei]$") then
         for person = 1, 6, 1 do
         for person = 1, 6, 1 do
             setIfPossible(formen[IND_AKT],  person, praes .. 'i' .. endungen[IND_AKT][person])
             setIfPossible(formen, PERSONEN[person] .. 'IA', praes .. 'i' .. endungen[IND_AKT][person])
             setIfPossible(formen[IND_PASS], person, praes .. 'i' .. endungen[IND_PASS][person])
             setIfPossible(formen, PERSONEN[person] .. 'IP', praes .. 'i' .. endungen[IND_PASS][person])
             setIfPossible(formen[KONJ_AKT], person, praes .. 'a' .. endungen[KONJ_AKT][person])
             setIfPossible(formen, PERSONEN[person] .. 'KA', praes .. 'a' .. endungen[KONJ_AKT][person])
             setIfPossible(formen[KONJ_PASS],person, praes .. 'a' .. endungen[KONJ_PASS][person])
             setIfPossible(formen, PERSONEN[person] .. 'KP', praes .. 'a' .. endungen[KONJ_PASS][person])
         end
         end
         setIfPossible(formen[IND_AKT], 1, praes .. 'o')
         setIfPossible(formen, '1SIA', praes .. 'o')
         setIfPossible(formen[IND_PASS], 1, praes .. 'or')
         setIfPossible(formen, '1SIP', praes .. 'or')
         setIfPossible(formen[IND_PASS], 2, praes .. 'eris')
         setIfPossible(formen, '2SIP', praes .. 'eris')
         setIfPossible(formen[IND_AKT], 6, praes .. 'unt')
         setIfPossible(formen, '3PIA', praes .. 'unt')
         setIfPossible(formen[IND_PASS], 6, praes .. 'untur')
         setIfPossible(formen, '3PIP', praes .. 'untur')
     end
     end
     if praes:match("a$") then
     if praes:match("a$") then
         setIfPossible(formen[IND_AKT], 1, praes:sub(1,-2) .. 'o')
         setIfPossible(formen, '1SIA', praes:sub(1,-2) .. 'o')
         setIfPossible(formen[IND_PASS], 1, praes:sub(1,-2) .. 'or')
         setIfPossible(formen, '1SIP', praes:sub(1,-2) .. 'or')
         setIfPossible(formen[KONJ_AKT], 1, praes:sub(1,-2) .. 'em')
         setIfPossible(formen, '1SKA', praes:sub(1,-2) .. 'em')
         setIfPossible(formen[KONJ_PASS],1, praes:sub(1,-2) .. 'er')
         setIfPossible(formen, '1SKP', praes:sub(1,-2) .. 'er')
         for person = 2, 6, 1 do
         for person = 2, 6, 1 do
             setIfPossible(formen[IND_AKT],  person, praes .. endungen[IND_AKT][person])
             setIfPossible(formen, PERSONEN[person] .. 'IA', praes .. endungen[IND_AKT][person])
             setIfPossible(formen[IND_PASS], person, praes .. endungen[IND_PASS][person])
             setIfPossible(formen, PERSONEN[person] .. 'IP', praes .. endungen[IND_PASS][person])
             setIfPossible(formen[KONJ_AKT], person, praes:sub(1,-2) .. 'e' .. endungen[KONJ_AKT][person])
             setIfPossible(formen, PERSONEN[person] .. 'KA', praes:sub(1,-2) .. 'e' .. endungen[KONJ_AKT][person])
             setIfPossible(formen[KONJ_PASS],person, praes:sub(1,-2) .. 'e' .. endungen[KONJ_PASS][person])
             setIfPossible(formen, PERSONEN[person] .. 'KP', praes:sub(1,-2) .. 'e' .. endungen[KONJ_PASS][person])
         end
         end
     end
     end
     if praes:match("[ei]$") then
     if praes:match("[ei]$") then
         for person = 1, 6, 1 do
         for person = 1, 6, 1 do
             setIfPossible(formen[IND_AKT],  person, praes .. endungen[IND_AKT][person])
             setIfPossible(formen, PERSONEN[person] .. 'IA', praes .. endungen[IND_AKT][person])
             setIfPossible(formen[IND_PASS], person, praes .. endungen[IND_PASS][person])
             setIfPossible(formen, PERSONEN[person] .. 'IP', praes .. endungen[IND_PASS][person])
             setIfPossible(formen[KONJ_AKT], person, praes .. 'a' .. endungen[KONJ_AKT][person])
             setIfPossible(formen, PERSONEN[person] .. 'KA', praes .. 'a' .. endungen[KONJ_AKT][person])
             setIfPossible(formen[KONJ_PASS],person, praes .. 'a' .. endungen[KONJ_PASS][person])
             setIfPossible(formen, PERSONEN[person] .. 'KP', praes .. 'a' .. endungen[KONJ_PASS][person])
         end
         end
         if not praes:match("e$") then
         if not praes:match("e$") then
             setIfPossible(formen[IND_AKT], 6, praes .. 'unt')
             setIfPossible(formen, '3PIA', praes .. 'unt')
             setIfPossible(formen[IND_PASS], 6, praes .. 'untur')
             setIfPossible(formen, '3PIP', praes .. 'untur')
         end
         end
     end
     end
     if praes:match("i$") and not params.inf:match("ir[ei]$") then
     if praes:match("i$") and not inf:match("ir[ei]$") then
         setIfPossible(formen[IND_PASS], 2, praes:sub(1,-2) .. 'eris')
         setIfPossible(formen, '2SIP', praes:sub(1,-2) .. 'eris')
     end
     end
    
    
     if params.praesGV:match("A") then
     if praesGV:match("A") then
     if praes:match("[aei]$") then
     if praes:match("[aei]$") then
     setIfPossible(formen[IMPERATIV],2, praes .. "!")
     setIfPossible(formen, 'ImpS', praes .. "!")
     setIfPossible(formen[IMPERATIV],5, praes .. "te!")
     setIfPossible(formen, 'ImpP', praes .. "te!")
     else
     else
     setIfPossible(formen[IMPERATIV],2, praes .. "e!")
     setIfPossible(formen, 'ImpS', praes .. "e!")
     setIfPossible(formen[IMPERATIV],5, praes .. "ite!")
     setIfPossible(formen, 'ImpP', praes .. "ite!")
     end
     end
     else
     else
     if praes:match("[aei]$") then
     if praes:match("[aei]$") then
     setIfPossible(formen[IMPERATIV],2, praes .. "re!")
     setIfPossible(formen, 'ImpS', praes .. "re!")
     setIfPossible(formen[IMPERATIV],5, praes .. "mini!")
     setIfPossible(formen, 'ImpP', praes .. "mini!")
     else
     else
     setIfPossible(formen[IMPERATIV],2, praes .. "ere!")
     setIfPossible(formen, 'ImpS', praes .. "ere!")
     setIfPossible(formen[IMPERATIV],5, praes .. "imini!")
     setIfPossible(formen, 'ImpP', praes .. "imini!")
     end
     end
     end
     end
Zeile 155: Zeile 137:


function bildeImperfekt(params)
function bildeImperfekt(params)
    local inf = params.inf
     local formen = createFormTable(praesGV)
    local praes = params.praes
     local formen = createFormTable(params.praesGV)
     local endungen = {}
     local endungen = {}
     endungen[IND_AKT]  = MST
     endungen[IND_AKT]  = MST
Zeile 170: Zeile 150:
     end
     end
      
      
     if not inf:match("r[ei]$") then
     if inf:match("[^r]i$") or inf:match("[^aei]ri") then
         konj_stamm = inf:sub(1,-2) .. 'ere'
         konj_stamm = inf:sub(1,-2) .. 'ere'
     end
     end
     if inf:match("ri$") then
     if inf:match("[aei]ri$") then
         konj_stamm = praes .. 're'
         konj_stamm = praes .. 're'
     end
     end
    local staemme = {}
    staemme[IND_AKT]  = ind_stamm
    staemme[IND_PASS] = ind_stamm
    staemme[KONJ_AKT] = konj_stamm
    staemme[KONJ_PASS]= konj_stamm
     for person = 1, 6, 1 do
     for person = 1, 6, 1 do
    for tm,_ in pairs(formen) do
        setIfPossible(formen, PERSONEN[person] .. 'IA', ind_stamm .. endungen[IND_AKT][person])
            setIfPossible(formen[tm], person, staemme[tm] .. endungen[tm][person])
        setIfPossible(formen, PERSONEN[person] .. 'IP', ind_stamm .. endungen[IND_PASS][person])
         end
        setIfPossible(formen, PERSONEN[person] .. 'KA', konj_stamm .. endungen[KONJ_AKT][person])
         setIfPossible(formen, PERSONEN[person] .. 'KP', konj_stamm .. endungen[KONJ_PASS][person])
     end
     end
     return formen
     return formen
Zeile 190: Zeile 166:


function bildeFuturI(params)
function bildeFuturI(params)
    local praes = params.praes
     local formen = createFormTable(praesGV, 'I')
     local formen = {}
     local endungen = {}
     local endungen = {}
     endungen[IND_AKT]  = MST
     endungen[IND_AKT]  = MST
     endungen[IND_PASS] = RRISTUR
     endungen[IND_PASS] = RRISTUR
    if params.praesGV:match("A") then
        formen[IND_AKT]  = {}
    end
    if params.praesGV:match("P") then
        formen[IND_PASS] = {}
    end
     if praes:match("[ae]$") then
     if praes:match("[ae]$") then
         setIfPossible(formen[IND_AKT], 1, praes .. 'bo')
         setIfPossible(formen, '1SIA', praes .. 'bo')
         setIfPossible(formen[IND_PASS], 1, praes .. 'bor')
         setIfPossible(formen, '1SIP', praes .. 'bor')
         for person = 2, 5, 1 do
         for person = 2, 5, 1 do
        for tm,_ in pairs(formen) do
            setIfPossible(formen, PERSONEN[person] .. 'IA', praes .. 'bi' .. endungen[IND_AKT][person])
                setIfPossible(formen[tm], person, praes .. 'bi' .. endungen[tm][person])
            setIfPossible(formen, PERSONEN[person] .. 'IP', praes .. 'bi' .. endungen[IND_PASS][person])
            end
         end
         end
         setIfPossible(formen[IND_PASS], 2, praes .. 'beris')
         setIfPossible(formen, '2SIP', praes .. 'beris')
         setIfPossible(formen[IND_AKT], 6, praes .. 'bunt')
         setIfPossible(formen, '3PIA', praes .. 'bunt')
         setIfPossible(formen[IND_PASS], 6, praes .. 'buntur')
         setIfPossible(formen, '3PIP', praes .. 'buntur')
     else
     else
         setIfPossible(formen[IND_AKT], 1, praes .. 'am')
         setIfPossible(formen, '1SIA', praes .. 'am')
         setIfPossible(formen[IND_PASS], 1, praes .. 'ar')
         setIfPossible(formen, '1SIP', praes .. 'ar')
         for person = 2, 6, 1 do
         for person = 2, 6, 1 do
        for m,_ in pairs(formen) do
            setIfPossible(formen, PERSONEN[person] .. 'IA', praes .. 'e' .. endungen[IND_AKT][person])
                setIfPossible(formen[m], person, praes .. 'e' .. endungen[m][person])
            setIfPossible(formen, PERSONEN[person] .. 'IP', praes .. 'e' .. endungen[IND_PASS][person])
            end
         end
         end
     end
     end
Zeile 225: Zeile 192:


function bildePerfekt(params)
function bildePerfekt(params)
    local perf = params.perf
     local formen = createFormTable(perfGV)
    local ppp = params.ppp
     local formen = createFormTable(params.perfGV)
     local endungen = {}
     local endungen = {}
     endungen[IND_AKT]  = {'i', 'isti', 'it', 'imus', 'istis', 'erunt'}
     endungen[IND_AKT]  = {'i', 'isti', 'it', 'imus', 'istis', 'erunt'}
Zeile 234: Zeile 199:
     endungen[KONJ_PASS]= {'us/a/um sim', 'us/a/um sis', 'us/a/um sit', 'i/ae/a simus', 'i/ae/a sitis', 'i/ae/a sint'}
     endungen[KONJ_PASS]= {'us/a/um sim', 'us/a/um sis', 'us/a/um sit', 'i/ae/a simus', 'i/ae/a sitis', 'i/ae/a sint'}
     for person = 1, 6, 1 do
     for person = 1, 6, 1 do
         setIfPossible(formen[IND_AKT], person, perf .. endungen[IND_AKT][person])
         setIfPossible(formen, PERSONEN[person] .. 'IA', perf .. endungen[IND_AKT][person])
         setIfPossible(formen[KONJ_AKT], person, perf .. 'eri' .. endungen[KONJ_AKT][person])
         setIfPossible(formen, PERSONEN[person] .. 'KA', perf .. 'eri' .. endungen[KONJ_AKT][person])
         setIfPossible(formen[IND_PASS], person, ppp .. endungen[IND_PASS][person])
         setIfPossible(formen, PERSONEN[person] .. 'IP', ppp .. endungen[IND_PASS][person])
         setIfPossible(formen[KONJ_PASS], person, ppp .. endungen[KONJ_PASS][person])
         setIfPossible(formen, PERSONEN[person] .. 'KP', ppp .. endungen[KONJ_PASS][person])
     end
     end
     return formen
     return formen
Zeile 243: Zeile 208:


function bildePlusquamperfekt(params)
function bildePlusquamperfekt(params)
    local perf = params.perf
     local formen = createFormTable(perfGV)
    local ppp = params.ppp
     local formen = createFormTable(params.perfGV)
     local endungen = {'us/a/um', 'us/a/um', 'us/a/um', 'i/ae/a', 'i/ae/a', 'i/ae/a'}
     local endungen = {'us/a/um', 'us/a/um', 'us/a/um', 'i/ae/a', 'i/ae/a', 'i/ae/a'}
    
    
     for person = 1, 6, 1 do
     for person = 1, 6, 1 do
         setIfPossible(formen[IND_AKT],  person, perf .. 'era' .. MST[person])
         setIfPossible(formen, PERSONEN[person] .. 'IA', perf .. 'era' .. MST[person])
         setIfPossible(formen[KONJ_AKT], person, perf .. 'isse' .. MST[person])
         setIfPossible(formen, PERSONEN[person] .. 'KA', perf .. 'isse' .. MST[person])
         setIfPossible(formen[IND_PASS], person, ppp .. endungen[person] .. ' era' .. MST[person])
         setIfPossible(formen, PERSONEN[person] .. 'IP', ppp .. endungen[person] .. ' era' .. MST[person])
         setIfPossible(formen[KONJ_PASS],person, ppp .. endungen[person] .. ' esse' .. MST[person])
         setIfPossible(formen, PERSONEN[person] .. 'KP', ppp .. endungen[person] .. ' esse' .. MST[person])
     end
     end
     return formen
     return formen
Zeile 258: Zeile 221:


function bildeFuturII(params)
function bildeFuturII(params)
    local perf = params.perf
     local formen = createFormTable(praesGV, 'I')
    local ppp = params.ppp
     local formen = {}
     local endungen = {'us/a/um', 'us/a/um', 'us/a/um', 'i/ae/a', 'i/ae/a', 'i/ae/a'}
     local endungen = {'us/a/um', 'us/a/um', 'us/a/um', 'i/ae/a', 'i/ae/a', 'i/ae/a'}
 
 
    if params.perfGV:match("A") then
        formen[IND_AKT] = {}
    end
    if params.perfGV:match("P") then
    formen[IND_PASS] = {}
    end
     for person = 1, 6, 1 do
     for person = 1, 6, 1 do
         setIfPossible(formen[IND_AKT],  person, perf .. 'eri' .. MST[person])
         setIfPossible(formen, PERSONEN[person] .. 'IA', perf .. 'eri' .. MST[person])
         setIfPossible(formen[IND_PASS], person, ppp .. endungen[person] .. ' eri' .. MST[person])
         setIfPossible(formen, PERSONEN[person] .. 'IP', ppp .. endungen[person] .. ' eri' .. MST[person])
     end
     end
      
      
     setIfPossible(formen[IND_AKT], 1, perf .. 'ero')
     setIfPossible(formen, '1SIA', perf .. 'ero')
     setIfPossible(formen[IND_PASS], 1, ppp .. 'us/a/um ero')
     setIfPossible(formen, '1SIP', ppp .. 'us/a/um ero')
     setIfPossible(formen[IND_PASS], 6, ppp .. 'i/ae/a erunt')
     setIfPossible(formen, '3PIP', ppp .. 'i/ae/a erunt')
     return formen
     return formen
end
end
Zeile 287: Zeile 242:
table = table .. ' !! Passiv'
table = table .. ' !! Passiv'
end
end
table = table .. '\n|-\n! Präsens\n'
table = table .. '\n|-\n! Präsens'
if praesGV:match("A") then
if praesGV:match("A") then
table = table .. ' || ' .. utils.enclose(formen[PRAES][IND_AKT])
table = table .. '\n| lang="la" | ' .. formen[PRAES][IND_AKT]
end
end
if praesGV:match("P") then
if praesGV:match("P") then
table = table .. ' || ' .. utils.enclose(formen[PRAES][IND_PASS])
table = table .. '\n| lang="la" | ' .. formen[PRAES][IND_PASS]
end
end
table = table .. '\n|-\n! Perfekt\n'
table = table .. '\n|-\n! Perfekt'
if perfGV:match("A") then
if perfGV:match("A") then
table = table .. ' || ' .. utils.enclose(formen[PERF][IND_AKT])
table = table .. '\n| lang="la" | ' .. formen[PERF][IND_AKT]
end
end
if perfGV:match("P") then
if perfGV:match("P") then
table = table .. ' || ' .. utils.enclose(formen[PERF][IND_PASS])
table = table .. '\n| lang="la" | ' .. formen[PERF][IND_PASS]
end
end
table = table .. '\n|-\n! Futur\n || ' .. utils.enclose(formen[FUTUR][IND_AKT])
table = table .. '\n|-\n! Futur'
table = table .. '\n| lang="la" | ' .. formen[FUTUR][IND_AKT]
if praesGV:match("AP") or perfGV:match("AP") then
if praesGV:match("AP") or perfGV:match("AP") then
table = table .. ' || ' .. utils.enclose(formen[FUTUR][IND_PASS])
table = table .. '\n| lang="la" | ' .. formen[FUTUR][IND_PASS]
end
end
table = table .. '\n|}\n'
table = table .. '\n|}\n'
Zeile 313: Zeile 269:
table = table .. '{| class="wikitable mw-collapsible"\n'
table = table .. '{| class="wikitable mw-collapsible"\n'
table = table .. '|+ [[Partizip]]ien\n'
table = table .. '|+ [[Partizip]]ien\n'
table = table .. '! [[Partizip Präsens Aktiv]]\n|| ' .. utils.enclose(formen[PRAES]) .. '\n'
table = table .. '! [[Partizip Präsens Aktiv|P<span class="ft-collapsible">artizip </span>P<span class="ft-collapsible">räsens </span>A<span class="ft-collapsible">ktiv</span>]]'
table = table .. '\n| lang="la" | ' .. formen[PRAES] .. '\n'
if perfGV == "AP" then
if perfGV == "AP" then
table = table .. '|-\n! [[Partizip Perfekt Passiv]]\n|| ' .. utils.enclose(formen[PERF]) .. '\n'
table = table .. '|-\n! [[Partizip Perfekt Passiv|P<span class="ft-collapsible">artizip </span>P<span class="ft-collapsible">erfekt </span>P<span class="ft-collapsible">assiv</span>]]'
table = table .. '\n| lang="la" | ' .. formen[PERF] .. '\n'
elseif perfGV == "P" then
elseif perfGV == "P" then
table = table .. '|-\n! [[Partizip Perfekt Deponens]]\n|| ' .. utils.enclose(formen[PERF]) .. '\n'
table = table .. '|-\n! [[Partizip Perfekt Deponens|P<span class="ft-collapsible">artizip </span>P<span class="ft-collapsible">erfekt </span>D<span class="ft-collapsible">eponens</span>]]'
table = table .. '\n| lang="la" | ' .. formen[PERF] .. '\n'
end
end
table = table .. '|-\n! [[Partizip Futur Aktiv]]\n|| ' .. utils.enclose(formen[FUTUR]) .. '\n'
table = table .. '|-\n! [[Partizip Futur Aktiv|P<span class="ft-collapsible">artizip </span>F<span class="ft-collapsible">utur </span>A<span class="ft-collapsible">ktiv</span>]]'
table = table .. '\n| lang="la" | ' .. formen[FUTUR] .. '\n'
table = table .. '|}'
table = table .. '|}'
return table
return table
Zeile 329: Zeile 289:
table = table .. "|+ ''nd''-Formen\n"
table = table .. "|+ ''nd''-Formen\n"
table = table .. "! [[Gerundium]] !! [[Gerundivum]]\n"
table = table .. "! [[Gerundium]] !! [[Gerundivum]]\n"
table = table .. "|-\n| " .. utils.enclose(formen[1]) .. ' || ' .. utils.enclose(formen[2]) .. '\n|}'
table = table .. '|-\n| lang="la" | ' .. formen[1] .. '\n| lang="la" | ' .. formen[2] .. '\n|}'
return table
return table
end
end


function render(tempus, formen, gv)
function setIfPossible(array,key,value)
    local table = ''
if array[key] then
    table = table .. '{| class="wikitable mw-collapsible"\n'
array[key] = value
    table = table .. '|+ [[' .. tempus .. ']]\n! Person'
    for k,_ in pairs(formen) do
    table = table .. ' !! ' .. utils.renderTemplate("Verb-TH", {TEMPUS = tempus, MODUS = MODI[k]:match("^%w+"), GV = MODI[k]:match("%w+$"), TYPE = gv})
    end
    table = table .. '\n|-\n'
    for person = 1, 6, 1 do
        table = table .. '! ' .. PERSONEN[person] .. '\n'
        for _,tm in pairs(formen) do
            table = table .. ' || ' .. utils.enclose(tm[person])
        end
        table = table .. '\n|-\n'
    end
    table = table .. '|}'
    return table
end
 
function setIfPossible(maybeArray,index,value)
if maybeArray then
maybeArray[index] = value
end
end
end
end


function createFormTable(gv)
function createFormTable(gv, modi)
modi = modi or 'IK'
local formen = {}
local formen = {}
if gv:match("A") then
for g in gv:gmatch('.') do
    formen[IND_AKT] = {}
for m in modi:gmatch('.') do
    formen[KONJ_AKT] = {}
for p = 1,3,1 do
    end
formen[p .. 'S' .. m .. g] = 'null'
    if gv:match("P") then
formen[p .. 'P' .. m .. g] = 'null'
    formen[IND_PASS] = {}
end
    formen[KONJ_PASS] = {}
end
    end
end
     return formen
     return formen
end
end


function p.render(frame)
function p.render(frame)
local pagecontent = ''
lektionen = {}
if tonumber(lInf) ~= 0 then
table.insert(lektionen, lInf)
end
if tonumber(lPerf) ~= 0 then
table.insert(lektionen, lPerf)
end
if tonumber(lPPP) ~= 0 then
table.insert(lektionen, lPPP)
end
pagecontent = pagecontent .. p.renderBox(frame)
    pagecontent = pagecontent .. p.renderFormen(frame)
    pagecontent = pagecontent .. utils.renderFooter(inf, bildePraesens(params)['1SI' .. praesGV:sub(1,1)], lektionen)
    return pagecontent
end
function p.renderBox(frame)
local pagecontent = ""
local pagecontent = ""
     params = init()
     local stammformen = {inf, bildePraesens(params)['1SI' .. praesGV:sub(1,1)], bildePerfekt(params)['1SI' .. perfGV:sub(1,1)]}
    if params.praesGV:match('A') then
     if not ppp:match("PPP") and perfGV == "AP" then
        praesTemp = IND_AKT
    table.insert(stammformen, ppp .. "um")
    else
    stammformen["lPPP"] = lPPP
        praesTemp = IND_PASS
    end
     if params.perfGV:match('A') then
        perfTemp = IND_AKT
    else
        perfTemp = IND_PASS
     end
     end
     infinitive = bildeInfinitive(params)
     stammformen["lInf"] = lInf
     praesens = bildePraesens(params)
     stammformen["lPerf"]= lPerf
    perfekt = bildePerfekt(params)
     if not mw.isSubsting() then
     if not mw.isSubsting() then
     pagecontent = pagecontent .. utils.renderTemplate("Achtung", {"Dieses Modul sollte nur mit <code>{{subst:#invoke:Verb|...}}</code> eingebunden werden! "})
     pagecontent = pagecontent .. utils.renderTemplate("Achtung", {"Dieses Modul sollte nur mit <code>{{subst:#invoke:Verb|...}}</code> eingebunden werden! "})
     end
     end
     pagecontent = pagecontent .. "{{DISPLAYTITLE:" .. params.inf .. "}}\n"
     pagecontent = pagecontent .. "{{DISPLAYTITLE:" .. inf .. "}}\n"
     pagecontent = pagecontent .. utils.renderTemplate("Legende Verb", {}) .. "\n"
     pagecontent = pagecontent .. utils.renderTemplate("Legende Verb", {}) .. "\n"
     pagecontent = pagecontent .. utils.renderTemplate("Thumbnailbox", {INHALT= utils.renderTemplate("Wortwolke", {params.inf, ""})}) .. "\n"
     pagecontent = pagecontent .. utils.renderWortwolke(inf) .. "\n"
     pagecontent = pagecontent .. ";[[Stammformen]]: " .. utils.enclose(params.inf) .. utils.renderTemplate("Link Campus-Lektion", {params.lInf})
     pagecontent = pagecontent .. utils.renderVokabelbox('Stammformen', stammformen)
    .. ", " .. utils.enclose(praesens[praesTemp][1])
     pagecontent = pagecontent .. '\n'
    .. ", " .. utils.enclose(perfekt[perfTemp][1]) .. utils.renderTemplate("Link Campus-Lektion", {params.lPerf})
     if praesGV == "P" and perfGV == "P" then
    if not params.ppp:match("PPP") and params.perfGV == "AP" then
        pagecontent = pagecontent .. ", " .. utils.enclose(params.ppp .. "um" .. utils.renderTemplate("Link Campus-Lektion", {params.lPPP}))
    end
     pagecontent = pagecontent .. '\n\n'
    pagecontent = pagecontent .. ";Bedeutungen\n\n"
    pagecontent = pagecontent .. ";Feste Wendungen\n\n"
    pagecontent = pagecontent .. ";Aufbau\n\n"
    pagecontent = pagecontent .. ";Verwandte Wörter\n\n"
    pagecontent = pagecontent .. ";In anderen Sprachen\n\n"
     if params.praesGV == "P" and params.perfGV == "P" then
     pagecontent = pagecontent .. utils.renderTemplate("Deponens", {}) .. '\n'
     pagecontent = pagecontent .. utils.renderTemplate("Deponens", {}) .. '\n'
     elseif params.praesGV == "P" or params.perfGV == "P" then
     elseif praesGV == "P" or perfGV == "P" then
     pagecontent = pagecontent .. utils.renderTemplate("Semideponens", {}) .. '\n'
     pagecontent = pagecontent .. utils.renderTemplate("Semideponens", {}) .. '\n'
     end
     end
     pagecontent = pagecontent .. "== Infinite Formen ==\n\n"
return pagecontent
     pagecontent = pagecontent .. renderInfinitive(infinitive, params.praesGV, params.perfGV)
end
 
function p.renderFormen(frame)
local pagecontent = ""
    --params = init()
     pagecontent = pagecontent .. "\n\n== Infinite Formen ==\n\n"
     pagecontent = pagecontent .. renderInfinitive(bildeInfinitive(params), praesGV, perfGV)
     pagecontent = pagecontent .. '\n\n'
     pagecontent = pagecontent .. '\n\n'
     pagecontent = pagecontent .. renderPartizipien(bildePartizipien(params), params.perfGV)
     pagecontent = pagecontent .. renderPartizipien(bildePartizipien(params), perfGV)
     pagecontent = pagecontent .. '\n\n'
     pagecontent = pagecontent .. '\n\n'
     pagecontent = pagecontent .. renderND(bildeND(params))
     pagecontent = pagecontent .. renderND(bildeND(params))
    pagecontent = pagecontent .. "\n\n== Formen mit Präsensstamm ==\n\n"
    pagecontent = pagecontent .. utils.renderFT('Verb', bildePraesens(params), {Tempus = 'Präsens'})
     pagecontent = pagecontent .. '\n\n'
     pagecontent = pagecontent .. '\n\n'
     pagecontent = pagecontent .. "== Formen mit Präsensstamm ==\n\n"
     pagecontent = pagecontent .. utils.renderFT('Verb', bildeImperfekt(params), {Tempus = 'Imperfekt'})
    pagecontent = pagecontent .. render('Präsens', praesens, params.praesGV)
     pagecontent = pagecontent .. '\n\n'
     pagecontent = pagecontent .. '\n\n'
     pagecontent = pagecontent .. render('Imperfekt', bildeImperfekt(params), params.praesGV)
     pagecontent = pagecontent .. utils.renderFT('Verb', bildeFuturI(params), {Tempus = 'Futur I'})
    pagecontent = pagecontent .. "\n\n== Formen mit Perfektstamm/PPP ==\n\n"
    pagecontent = pagecontent .. utils.renderFT('Verb', bildePerfekt(params), {Tempus = 'Perfekt'})
     pagecontent = pagecontent .. '\n\n'
     pagecontent = pagecontent .. '\n\n'
     pagecontent = pagecontent .. render('Futur I', bildeFuturI(params), params.praesGV)
     pagecontent = pagecontent .. utils.renderFT('Verb', bildePlusquamperfekt(params), {Tempus = 'Plusquamperfekt'})
     pagecontent = pagecontent .. '\n\n'
     pagecontent = pagecontent .. '\n\n'
     pagecontent = pagecontent .. "== Formen mit Perfektstamm/PPP ==\n\n"
     pagecontent = pagecontent .. utils.renderFT('Verb', bildeFuturII(params), {Tempus = 'Futur II'})
    pagecontent = pagecontent .. render('Perfekt', perfekt, params.perfGV)
    pagecontent = pagecontent .. '\n\n'
    pagecontent = pagecontent .. render('Plusquamperfekt', bildePlusquamperfekt(params), params.perfGV)
    pagecontent = pagecontent .. '\n\n'
    pagecontent = pagecontent .. render('Futur II', bildeFuturII(params), params.perfGV)
    pagecontent = pagecontent .. '\n\n'
    pagecontent = pagecontent .. "== Weblinks ==\n\n"
    pagecontent = pagecontent .. "* " .. utils.renderTemplate('Navigium', {params.inf}) .. "\n"
    pagecontent = pagecontent .. "* " .. utils.renderTemplate("Georges", {praesens[praesTemp][1]}) .. "\n"
    pagecontent = pagecontent .. "[[Kategorie:Verb (Latein)/" .. params.inf:sub(0,1) .. "]]\n"
    pagecontent = pagecontent .. utils.addCampusCategoryIfSet(params.lInf)
    pagecontent = pagecontent .. utils.addCampusCategoryIfSet(params.lPerf)
    pagecontent = pagecontent .. utils.addCampusCategoryIfSet(params.lPPP)
     return pagecontent
     return pagecontent
end
end
 
function p.parseArray(frame)
res = {}
    for k, v in string.gmatch(frame.args[1], "([^,]+):([^,]+)") do
    res[k] = v
    end
return mw.af.export(res)
end


return p
return p

Aktuelle Version vom 18. Oktober 2024, 06:02 Uhr

Dieses Modul erzeugt lateinische Konjugationstabellen aus gegebenen Stämmen.

💬
Beispiel
  • {{subst:#invoke:Verb|render|dare|20|da|ded|28|dat|47|PraesGV=AP|PerfGV=AP}} für ein Vollverb mit Aktiv und Passiv in Präsens- und Perfektstämmen
  • {{subst:#invoke:Verb|render|sequi||sequ|||secut||PraesGV=P|PerfGV=P}} für ein Deponens
  • {{subst:#invoke:Verb|render|gaudere|4|gaude|||gavis||PraesGV=AP|PerfGV=P}} für ein Semideponens, das in Perfektstämmen nur Passivformen bildet
  • {{subst:#invoke:Verb|render|facere|17|faci|fec|27|||PraesGV=A|PerfGV=A}} für ein Defectivum, das nur aktivische Formen bildet.
Erläuterung
{{subst: Immer nur mit subst einbinden, damit die Formen im Seitenquelltext landen und für die Suchfunktion auffindbar sind.
#invoke:Verb| Name des Moduls
render| rufe die Funktion render auf
irrumare| Infinitiv
0| Optional: Lektion, in der der Infinitiv eingeführt wurde
irruma| Präsensstamm
irrumav| Perfektstamm
0| Optional: Lektion, in der der Perfektstamm eingeführt wurde
irrumat| Stamm des PPP
0| Optional: Lektion, in der das PPP eingeführt wurde
PraesGV=AP Optional: Verfügbare Genera verbi in den präsentischen Zeiten.
Erlaubte Werte
  • AP: Verb bildet Aktiv- und Passivformen (Standard)
  • A: Verb bildet nur Aktivformen
  • P: Verb bildet nur Passivformen (Deponens)
PerfGV=AP}} Optional: Verfügbare Genera verbi in den perfektischen Zeiten.
Erlaubte Werte
  • AP: Verb bildet Aktiv- und Passivformen (Standard)
  • A: Verb bildet nur Aktivformen
  • P: Verb bildet nur Passivformen (Deponens)
👉
Hinweis

Dieses Modul sollte immer mit subst: eingebunden werden, damit alle Formen im durchsuchbaren Seitenquelltext landen und eine Suche nach dem auch zu dare führt.


local p = {}
local utils = require('Modul:LateinUtils')

local IND_AKT  = 1
local KONJ_AKT = 2
local IND_PASS = 3
local KONJ_PASS= 4
local IMPERATIV= 5
local PERSONEN = {'1S','2S','3S','1P','2P','3P'}
local PRAES = 1
local PERF  = 2
local FUTUR = 3
local OST = {'o', 's', 't', 'mus', 'tis', 'nt'}
local MST = {'m', 's', 't', 'mus', 'tis', 'nt'}
local ORRISTUR = {'or', 'ris', 'tur', 'mur', 'mini', 'ntur'}
local RRISTUR = {'r', 'ris', 'tur', 'mur', 'mini', 'ntur'}

local frame = mw.getCurrentFrame()
local inf    = frame.args[1] or frame:getParent().args[1] or 'Infinitiv';
local lInf   = frame.args[2] or frame:getParent().args[2] or 0;
local praes  = frame.args[3] or frame:getParent().args[3] or 'Präsensstamm + ';
local perf   = frame.args[4] or frame:getParent().args[4] or 'Perfektstamm + ';
local lPerf  = frame.args[5] or frame:getParent().args[5] or 0;
local ppp    = frame.args[6] or frame:getParent().args[6] or 'PPP-Stamm + ';
local lPPP   = frame.args[7] or frame:getParent().args[7] or 0;
local praesGV= frame.args.PraesGV or frame:getParent().args.PraesGV or 'AP';
local perfGV = frame.args.PerfGV or frame:getParent().args.PerfGV or 'AP';

function bildeInfinitive(params)
	local formen = {{},{}, {}}
	formen[PRAES][IND_AKT] = inf
	if inf:match(praes:sub(-1,-1) .. "r[ei]$") then
		formen[PRAES][IND_PASS] = praes .. "ri"
	elseif praes:match("i$") then
		formen[PRAES][IND_PASS] = praes
	else 
		formen[PRAES][IND_PASS] = praes .. "i"
	end
	formen[PERF][IND_AKT] = perf .. "isse"
	formen[PERF][IND_PASS] = ppp .. "um/am/um esse"
	formen[FUTUR][IND_AKT] = ppp .. "urum/am/um esse"
	formen[FUTUR][IND_PASS] = ppp .. "um iri"
	return formen
end

function bildePartizipien(params)
	local formen = {}
	if praes:match("[ae]$") then
		formen[PRAES] = praes .. "ns, " .. praes .. "ntis"
	else
		formen[PRAES] = praes .. "ens, " .. praes .. "entis"
	end
	formen[PERF] = ppp .. "us/a/um"
	formen[FUTUR] = ppp .. "urus/a/um"
	return formen
end

function bildeND(params)
	local formen = {}
	if praes:match("[ae]$") then
		formen[1] = praes .. "ndi"
		formen[2] = praes .. "ndus/a/um"
	else
		formen[1] = praes .. "endi"
		formen[2] = praes .. "endus/a/um"
	end
	return formen
end

function bildePraesens(params)
    local formen = createFormTable(praesGV)
    local endungen = {}
    endungen[IND_AKT]  = OST
    endungen[KONJ_AKT] = MST
    endungen[IND_PASS] = ORRISTUR
    endungen[KONJ_PASS]= RRISTUR
    if not praes:match("[aei]$") then
        for person = 1, 6, 1 do
            setIfPossible(formen, PERSONEN[person] .. 'IA', praes .. 'i' .. endungen[IND_AKT][person])
            setIfPossible(formen, PERSONEN[person] .. 'IP', praes .. 'i' .. endungen[IND_PASS][person])
            setIfPossible(formen, PERSONEN[person] .. 'KA', praes .. 'a' .. endungen[KONJ_AKT][person])
            setIfPossible(formen, PERSONEN[person] .. 'KP', praes .. 'a' .. endungen[KONJ_PASS][person])
        end
        setIfPossible(formen, '1SIA', praes .. 'o')
        setIfPossible(formen, '1SIP', praes .. 'or')
        setIfPossible(formen, '2SIP', praes .. 'eris')
        setIfPossible(formen, '3PIA', praes .. 'unt')
        setIfPossible(formen, '3PIP', praes .. 'untur')
    end
    if praes:match("a$") then
        setIfPossible(formen, '1SIA', praes:sub(1,-2) .. 'o')
        setIfPossible(formen, '1SIP', praes:sub(1,-2) .. 'or')
        setIfPossible(formen, '1SKA', praes:sub(1,-2) .. 'em')
        setIfPossible(formen, '1SKP', praes:sub(1,-2) .. 'er')
        for person = 2, 6, 1 do
            setIfPossible(formen, PERSONEN[person] .. 'IA', praes .. endungen[IND_AKT][person])
            setIfPossible(formen, PERSONEN[person] .. 'IP', praes .. endungen[IND_PASS][person])
            setIfPossible(formen, PERSONEN[person] .. 'KA', praes:sub(1,-2) .. 'e' .. endungen[KONJ_AKT][person])
            setIfPossible(formen, PERSONEN[person] .. 'KP', praes:sub(1,-2) .. 'e' .. endungen[KONJ_PASS][person])
        end
    end
    if praes:match("[ei]$") then
        for person = 1, 6, 1 do
            setIfPossible(formen, PERSONEN[person] .. 'IA', praes .. endungen[IND_AKT][person])
            setIfPossible(formen, PERSONEN[person] .. 'IP', praes .. endungen[IND_PASS][person])
            setIfPossible(formen, PERSONEN[person] .. 'KA', praes .. 'a' .. endungen[KONJ_AKT][person])
            setIfPossible(formen, PERSONEN[person] .. 'KP', praes .. 'a' .. endungen[KONJ_PASS][person])
        end
        if not praes:match("e$") then
            setIfPossible(formen, '3PIA', praes .. 'unt')
            setIfPossible(formen, '3PIP', praes .. 'untur')
        end
    end
    if praes:match("i$") and not inf:match("ir[ei]$") then
        setIfPossible(formen, '2SIP', praes:sub(1,-2) .. 'eris')
    end
    	
    if praesGV:match("A") then
    	if praes:match("[aei]$") then
    		setIfPossible(formen, 'ImpS', praes .. "!")
    		setIfPossible(formen, 'ImpP', praes .. "te!")
    	else
    		setIfPossible(formen, 'ImpS', praes .. "e!")
    		setIfPossible(formen, 'ImpP', praes .. "ite!")
    	end
    else
    	if praes:match("[aei]$") then
    		setIfPossible(formen, 'ImpS', praes .. "re!")
    		setIfPossible(formen, 'ImpP', praes .. "mini!")
    	else
    		setIfPossible(formen, 'ImpS', praes .. "ere!")
    		setIfPossible(formen, 'ImpP', praes .. "imini!")
    	end
    end
    return formen
end

function bildeImperfekt(params)
    local formen = createFormTable(praesGV)
    local endungen = {}
    endungen[IND_AKT]  = MST
    endungen[KONJ_AKT] = MST
    endungen[IND_PASS] = RRISTUR
    endungen[KONJ_PASS]= RRISTUR

    local ind_stamm = praes .. 'ba'
    local konj_stamm = inf
    if not praes:match("[ae]$") then
        ind_stamm = praes .. 'eba'
    end
    
    if inf:match("[^r]i$") or inf:match("[^aei]ri") then
        konj_stamm = inf:sub(1,-2) .. 'ere'
    end
    if inf:match("[aei]ri$") then
        konj_stamm = praes .. 're'
    end
    for person = 1, 6, 1 do
        setIfPossible(formen, PERSONEN[person] .. 'IA', ind_stamm .. endungen[IND_AKT][person])
        setIfPossible(formen, PERSONEN[person] .. 'IP', ind_stamm .. endungen[IND_PASS][person])
        setIfPossible(formen, PERSONEN[person] .. 'KA', konj_stamm .. endungen[KONJ_AKT][person])
        setIfPossible(formen, PERSONEN[person] .. 'KP', konj_stamm .. endungen[KONJ_PASS][person])
    end
    return formen
end

function bildeFuturI(params)
    local formen = createFormTable(praesGV, 'I')
    local endungen = {}
    endungen[IND_AKT]  = MST
    endungen[IND_PASS] = RRISTUR
    if praes:match("[ae]$") then
        setIfPossible(formen, '1SIA', praes .. 'bo')
        setIfPossible(formen, '1SIP', praes .. 'bor')
        for person = 2, 5, 1 do
            setIfPossible(formen, PERSONEN[person] .. 'IA', praes .. 'bi' .. endungen[IND_AKT][person])
            setIfPossible(formen, PERSONEN[person] .. 'IP', praes .. 'bi' .. endungen[IND_PASS][person])
        end
        setIfPossible(formen, '2SIP', praes .. 'beris')
        setIfPossible(formen, '3PIA', praes .. 'bunt')
        setIfPossible(formen, '3PIP', praes .. 'buntur')
    else
        setIfPossible(formen, '1SIA', praes .. 'am')
        setIfPossible(formen, '1SIP', praes .. 'ar')
        for person = 2, 6, 1 do
            setIfPossible(formen, PERSONEN[person] .. 'IA', praes .. 'e' .. endungen[IND_AKT][person])
            setIfPossible(formen, PERSONEN[person] .. 'IP', praes .. 'e' .. endungen[IND_PASS][person])
        end
    end
    return formen
end

function bildePerfekt(params)
    local formen = createFormTable(perfGV)
    local endungen = {}
    endungen[IND_AKT]  = {'i', 'isti', 'it', 'imus', 'istis', 'erunt'}
    endungen[KONJ_AKT] = MST
    endungen[IND_PASS] = {'us/a/um sum', 'us/a/um es', 'us/a/um est', 'i/ae/a sumus', 'i/ae/a estis', 'i/ae/a sunt'}
    endungen[KONJ_PASS]= {'us/a/um sim', 'us/a/um sis', 'us/a/um sit', 'i/ae/a simus', 'i/ae/a sitis', 'i/ae/a sint'}
    for person = 1, 6, 1 do
        setIfPossible(formen, PERSONEN[person] .. 'IA', perf .. endungen[IND_AKT][person])
        setIfPossible(formen, PERSONEN[person] .. 'KA', perf .. 'eri' .. endungen[KONJ_AKT][person])
        setIfPossible(formen, PERSONEN[person] .. 'IP', ppp .. endungen[IND_PASS][person])
        setIfPossible(formen, PERSONEN[person] .. 'KP', ppp .. endungen[KONJ_PASS][person])
    end
    return formen
end

function bildePlusquamperfekt(params)
    local formen = createFormTable(perfGV)
    local endungen = {'us/a/um', 'us/a/um', 'us/a/um', 'i/ae/a', 'i/ae/a', 'i/ae/a'}
  
    for person = 1, 6, 1 do
        setIfPossible(formen, PERSONEN[person] .. 'IA', perf .. 'era' .. MST[person])
        setIfPossible(formen, PERSONEN[person] .. 'KA', perf .. 'isse' .. MST[person])
        setIfPossible(formen, PERSONEN[person] .. 'IP', ppp .. endungen[person] .. ' era' .. MST[person])
        setIfPossible(formen, PERSONEN[person] .. 'KP', ppp .. endungen[person] .. ' esse' .. MST[person])
    end
    return formen
end

function bildeFuturII(params)
    local formen = createFormTable(praesGV, 'I')
    local endungen = {'us/a/um', 'us/a/um', 'us/a/um', 'i/ae/a', 'i/ae/a', 'i/ae/a'}

    for person = 1, 6, 1 do
        setIfPossible(formen, PERSONEN[person] .. 'IA', perf .. 'eri' .. MST[person])
        setIfPossible(formen, PERSONEN[person] .. 'IP', ppp .. endungen[person] .. ' eri' .. MST[person])
    end
    
    setIfPossible(formen, '1SIA', perf .. 'ero')
    setIfPossible(formen, '1SIP', ppp .. 'us/a/um ero')
    setIfPossible(formen, '3PIP', ppp .. 'i/ae/a erunt')
    return formen
end

function renderInfinitive(formen, praesGV, perfGV)
	local table = ""
	table = table .. '{| class="wikitable mw-collapsible"\n'
	table = table .. '|+ [[Infinitiv]]e\n! !! Aktiv'
	if praesGV == "AP" or perfGV == "AP" then
		table = table .. ' !! Passiv'
	end
	table = table .. '\n|-\n! Präsens'
	if praesGV:match("A") then
		table = table .. '\n| lang="la" | ' .. formen[PRAES][IND_AKT]
	end
	if praesGV:match("P") then
		table = table .. '\n| lang="la" | ' .. formen[PRAES][IND_PASS]
	end
	table = table .. '\n|-\n! Perfekt'
	if perfGV:match("A") then
		table = table .. '\n| lang="la" | ' .. formen[PERF][IND_AKT]
	end
	if perfGV:match("P") then
		table = table .. '\n| lang="la" | ' .. formen[PERF][IND_PASS]
	end
	table = table .. '\n|-\n! Futur'
	table = table .. '\n| lang="la" | ' .. formen[FUTUR][IND_AKT]
	if praesGV:match("AP") or perfGV:match("AP") then
		table = table .. '\n| lang="la" | ' .. formen[FUTUR][IND_PASS]
	end
	table = table .. '\n|}\n'
	return table
end

function renderPartizipien(formen, perfGV)
	local table = ''
	table = table .. '{| class="wikitable mw-collapsible"\n'
	table = table .. '|+ [[Partizip]]ien\n'
	table = table .. '! [[Partizip Präsens Aktiv|P<span class="ft-collapsible">artizip </span>P<span class="ft-collapsible">räsens </span>A<span class="ft-collapsible">ktiv</span>]]'
	table = table .. '\n| lang="la" | ' .. formen[PRAES] .. '\n'
	if perfGV == "AP" then
		table = table .. '|-\n! [[Partizip Perfekt Passiv|P<span class="ft-collapsible">artizip </span>P<span class="ft-collapsible">erfekt </span>P<span class="ft-collapsible">assiv</span>]]'
		table = table .. '\n| lang="la" | ' .. formen[PERF] .. '\n'
	elseif perfGV == "P" then
		table = table .. '|-\n! [[Partizip Perfekt Deponens|P<span class="ft-collapsible">artizip </span>P<span class="ft-collapsible">erfekt </span>D<span class="ft-collapsible">eponens</span>]]'
		table = table .. '\n| lang="la" | ' .. formen[PERF] .. '\n'
	end
	table = table .. '|-\n! [[Partizip Futur Aktiv|P<span class="ft-collapsible">artizip </span>F<span class="ft-collapsible">utur </span>A<span class="ft-collapsible">ktiv</span>]]'
	table = table .. '\n| lang="la" | ' .. formen[FUTUR] .. '\n'
	table = table .. '|}'
	return table
end

function renderND(formen)
	local table = ''
	table = table .. '{| class="wikitable mw-collapsible"\n'
	table = table .. "|+ ''nd''-Formen\n"
	table = table .. "! [[Gerundium]] !! [[Gerundivum]]\n"
	table = table .. '|-\n| lang="la" | ' .. formen[1] .. '\n| lang="la" | ' .. formen[2] .. '\n|}'
	return table
end

function setIfPossible(array,key,value)
	if array[key] then
		array[key] = value
	end
end

function createFormTable(gv, modi)
	modi = modi or 'IK'
	local formen = {}
	for g in gv:gmatch('.') do
		for m in modi:gmatch('.') do
			for p = 1,3,1 do
				formen[p .. 'S' .. m .. g] = 'null'
				formen[p .. 'P' .. m .. g] = 'null'
			end
		end
	end
    return formen
end

function p.render(frame)
	local pagecontent = ''
	lektionen = {}
	if tonumber(lInf) ~= 0 then
		table.insert(lektionen, lInf)
	end
	if tonumber(lPerf) ~= 0 then
		table.insert(lektionen, lPerf)
	end
	if tonumber(lPPP) ~= 0 then
		table.insert(lektionen, lPPP)
	end
	pagecontent = pagecontent .. p.renderBox(frame)
    pagecontent = pagecontent .. p.renderFormen(frame)
    pagecontent = pagecontent .. utils.renderFooter(inf, bildePraesens(params)['1SI' .. praesGV:sub(1,1)], lektionen)
    return pagecontent
end

function p.renderBox(frame)
	local pagecontent = ""
    local stammformen = {inf, bildePraesens(params)['1SI' .. praesGV:sub(1,1)], bildePerfekt(params)['1SI' .. perfGV:sub(1,1)]}
    if not ppp:match("PPP") and perfGV == "AP" then
    	table.insert(stammformen, ppp .. "um")
    	stammformen["lPPP"] = lPPP
    end
    stammformen["lInf"] = lInf
    stammformen["lPerf"]= lPerf
    if not mw.isSubsting() then
    	pagecontent = pagecontent .. utils.renderTemplate("Achtung", {"Dieses Modul sollte nur mit <code>{{subst:#invoke:Verb|...}}</code> eingebunden werden! "})
    end
    pagecontent = pagecontent .. "{{DISPLAYTITLE:" .. inf .. "}}\n"
    pagecontent = pagecontent .. utils.renderTemplate("Legende Verb", {}) .. "\n"
    pagecontent = pagecontent .. utils.renderWortwolke(inf) .. "\n"
    pagecontent = pagecontent .. utils.renderVokabelbox('Stammformen', stammformen)
    pagecontent = pagecontent .. '\n'
    if praesGV == "P" and perfGV == "P" then
    	pagecontent = pagecontent .. utils.renderTemplate("Deponens", {}) .. '\n'
    elseif praesGV == "P" or perfGV == "P" then
    	pagecontent = pagecontent .. utils.renderTemplate("Semideponens", {}) .. '\n'
    end
	return pagecontent
end

function p.renderFormen(frame)
	local pagecontent = ""
    --params = init()
    pagecontent = pagecontent .. "\n\n== Infinite Formen ==\n\n"
    pagecontent = pagecontent .. renderInfinitive(bildeInfinitive(params), praesGV, perfGV)
    pagecontent = pagecontent .. '\n\n'
    pagecontent = pagecontent .. renderPartizipien(bildePartizipien(params), perfGV)
    pagecontent = pagecontent .. '\n\n'
    pagecontent = pagecontent .. renderND(bildeND(params))
    pagecontent = pagecontent .. "\n\n== Formen mit Präsensstamm ==\n\n"
    pagecontent = pagecontent .. utils.renderFT('Verb', bildePraesens(params), {Tempus = 'Präsens'})
    pagecontent = pagecontent .. '\n\n'
    pagecontent = pagecontent .. utils.renderFT('Verb', bildeImperfekt(params), {Tempus = 'Imperfekt'})
    pagecontent = pagecontent .. '\n\n'
    pagecontent = pagecontent .. utils.renderFT('Verb', bildeFuturI(params), {Tempus = 'Futur I'})
    pagecontent = pagecontent .. "\n\n== Formen mit Perfektstamm/PPP ==\n\n"
    pagecontent = pagecontent .. utils.renderFT('Verb', bildePerfekt(params), {Tempus = 'Perfekt'})
    pagecontent = pagecontent .. '\n\n'
    pagecontent = pagecontent .. utils.renderFT('Verb', bildePlusquamperfekt(params), {Tempus = 'Plusquamperfekt'})
    pagecontent = pagecontent .. '\n\n'
    pagecontent = pagecontent .. utils.renderFT('Verb', bildeFuturII(params), {Tempus = 'Futur II'})
    return pagecontent
end	

return p