Module:goh-verb

Hello, you have come here looking for the meaning of the word Module:goh-verb. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:goh-verb, but we will also tell you about its etymology, its characteristics and you will know how to say Module:goh-verb in singular and plural. Everything you need to know about the word Module:goh-verb you have here. The definition of the word Module:goh-verb will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:goh-verb, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

This module is used to create inflection tables for Old High German verbs.


local m_utilities = require("Module:utilities")
local com = require("Module:goh-common")
 
local export = {}
 
 local lang = require("Module:languages").getByCode("goh")
 
-- 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 or error("Conjugation type has not been specified. Please pass parameter 1 to the module invocation.")
	local args = frame:getParent().args
	SUBPAGENAME = mw.title.getCurrentTitle().subpageText
	NAMESPACE = mw.title.getCurrentTitle().nsText
 
	local forms, title, categories
 
	if conjugations then
		forms, title, categories = conjugations(args)
	else
		error("Unknown conjugation type '" .. conj_type .. "'")
	end
 
	return make_table(forms, title) .. m_utilities.format_categories(categories, lang)
end


--[=[
	*** STRONG VERBS ***
]=]--
 
-- Conjugate a strong verb
conjugations = function(args)
	local forms = {}
	local class = args or ""; if class ~= "" then class = " class " .. class end
	local categories = {"Old High German" .. class .. " strong verbs"}
	local title = "strong" .. class
	
	local pres_stem = args or (NAMESPACE == "Template" and "(1)") or error("The first parameter is missing")
	local past_sg_stem = args or (NAMESPACE == "Template" and "(2)") or error("The second parameter is missing")
	local past_stem = args or (NAMESPACE == "Template" and "(3)") or error("The third parameter is missing")
	local past_part_stem = args or (NAMESPACE == "Template" and "(4)") or error("The fourth parameter is missing")
	local mut_stem = (args or ""); if mut_stem == "" then mut_stem = pres_stem end
	local imperative = (args or ""); if imperative == "" then imperative = mut_stem end
	
	present_strong(forms, pres_stem, mut_stem, imperative)
	past_strong(forms, past_stem, past_sg_stem)
	forms = "gi" .. past_part_stem .. "an"
	
	return forms, title, categories
end

-- Conjugate a weak class 1a verb
conjugations = function(args)
	local forms = {}
	local categories = {"Old High German class 1 weak verbs"}
	local title = "weak class 1"
	
	local pres_stem = args or (NAMESPACE == "Template" and "(1)") or error("The first parameter is missing")
	local past_stem = args or (NAMESPACE == "Template" and "(2)") or error("The first parameter is missing")
	
	present_weak1(forms, pres_stem)
	present_weak1a(forms, pres_stem)
	past_weak(forms, past_stem .. "it")
	
	return forms, title, categories
end

-- Conjugate a weak class 1b verb
conjugations = function(args)
	local forms = {}
	local categories = {"Old High German class 1 weak verbs"}
	local title = "weak class 1"
	
	local pres_stem = args or (NAMESPACE == "Template" and "(1)") or error("The first parameter is missing")
	local past_stem = (args or ""); if past_stem == "" then past_stem = pres_stem end
	local tt = args or ""; if tt == "" then if past_stem:find("t$") then tt = "" else tt = "t" end end
		
	present_weak1(forms, pres_stem)	
	present_weak1b(forms, pres_stem)
	past_weak(forms, past_stem .. tt)
	
	return forms, title, categories
end

-- Conjugate a weak class 2 verb
conjugations = function(args)
	local forms = {}
	local categories = {"Old High German class 2 weak verbs"}
	local title = "weak class 2"
	
	local stem = args or (NAMESPACE == "Template" and "(1)") or error("The first parameter is missing")
	
	present_weak2(forms, stem)	
	past_weak(forms, stem .. "ot")
	
	return forms, title, categories
end

-- Conjugate a weak class 3 verb
conjugations = function(args)
	local forms = {}
	local categories = {"Old High German class 3 weak verbs"}
	local title = "weak class 3"
	
	local stem = args or (NAMESPACE == "Template" and "(1)") or error("The first parameter is missing")
	
	present_weak3(forms, stem)	
	past_weak(forms, stem .. "et")
	
	return forms, title, categories
end

-- Conjugate a preterite-present verb
conjugations = function(args)
	local forms = {}
	local categories = {"Old High German preterite-present verbs"}
	local title = "]"
	
	local pres_stem = args or (NAMESPACE == "Template" and "(1)") or error("The first parameter is missing")
	local pres_sg_stem = args or (NAMESPACE == "Template" and "(2)") or error("The second parameter is missing")
	local past_stem = args or (NAMESPACE == "Template" and "(3)") or error("The third parameter is missing")
	
	present_pp(forms, pres_stem, pres_sg_stem)
	past_weak(forms, past_stem)
	
	return forms, title, categories
end

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

conjugations = function(args)
	local forms = {}
	local categories = {"Old High German irregular verbs"}
	local title = "irregular"
	
	present_weak2(forms, "tu")
	forms = "tues"
	
	forms = "teta"
	forms = "tati"
	forms = "teta"
	
	past_generic(forms, "tat")
	
	forms = "gitan"
	
	return forms, title, categories
end

conjugations = function(args)
	local forms = {}
	local categories = {"Old High German irregular verbs"}
	local title = "irregular, suppletive"
	
	-- Indicative
	forms = "gam"
	forms = "gas"
	forms = "gat"
	forms = "gam(es)"
	forms = "gat"
	forms = "gant"
	
	-- Subjunctive
	forms = "ge"
	forms = "ges"
	forms = "ge"
	forms = "gem(es)"
	forms = "get"
	forms = "gen"
	
	-- Imperative
	forms = "gang"
	forms = "gat"
	
	forms = "gan"
	forms = "ganti"
	
	past_strong(forms, "giang", "giang")
	forms = "gigangan"
	
	return forms, title, categories
end

conjugations = function(args)
	local forms = {}
	local categories = {"Old High German irregular verbs"}
	local title = "irregular, suppletive"
	
	-- Indicative
	forms = "stam"
	forms = "stas"
	forms = "stat"
	forms = "stam(es)"
	forms = "stat"
	forms = "stant"
	
	-- Subjunctive
	forms = "ste"
	forms = "stes"
	forms = "ste"
	forms = "stem(es)"
	forms = "stet"
	forms = "sten"
	
	-- Imperative
	forms = "stant"
	forms = "stat"
	
	forms = "stan"
	forms = "stanti"
	
	past_strong(forms, "stuont", "stuont")
	forms = "gistantan"
	
	return forms, title, categories
end
 
function present_strong(forms, stem, mut_stem, imperative)
	-- Indicative
	forms = mut_stem .. "u"
	forms = mut_stem .. "is"
	forms = mut_stem .. "it"
	forms = stem .. "em(es)"
	forms = stem .. "et"
	forms = stem .. "ant"
	
	-- Subjunctive
	forms = stem .. "e"
	forms = stem .. "es"
	forms = stem .. "e"
	forms = stem .. "em(es)"
	forms = stem .. "et"
	forms = stem .. "en"
	
	-- Imperative
	forms = com.dbl_cons(imperative)
	forms = stem .. "et"
	
	forms = stem .. "an"
	forms = stem .. "anti"
end
 
function present_weak1(forms, stem, pres_stem)
	pres_stem = stem
	
	-- Indicative
	forms = stem .. "u"
	forms = stem .. "is"
	forms = stem .. "it"
	forms = stem .. "em(es)"
	forms = stem .. "et"
	forms = stem .. "ent"
	
	-- Subjunctive
	forms = stem .. "e"
	forms = stem .. "es"
	forms = stem .. "e"
	forms = stem .. "em(es)"
	forms = stem .. "et"
	forms = stem .. "en"
end

function present_weak1a(forms, stem, pres_stem)
	pres_stem = stem
	
	present_weak1(forms, stem)
	
	-- Imperative
	forms = com.impr_1a(stem .. "i")
	forms = stem .. "et"
	
	forms = stem .. "en"
	forms = stem .. "enti"
end

function present_weak1b(forms, stem, pres_stem)
	pres_stem = stem
	
	present_weak1(forms, stem)
	
	-- Imperative
	forms = stem .. "i"
	forms = stem .. "et"
	
	forms = stem .. "en"
	forms = stem .. "enti"
end

function present_weak2(forms, stem)
	-- Indicative
	forms = stem .. "om"
	forms = stem .. "os"
	forms = stem .. "ot"
	forms = stem .. "om(es)"
	forms = stem .. "ot"
	forms = stem .. "ont"
	
	-- Subjunctive
	forms = stem .. "o"
	forms = stem .. "os"
	forms = stem .. "o"
	forms = stem .. "om(es)"
	forms = stem .. "ot"
	forms = stem .. "on"
	
	-- Imperative
	forms = stem .. "o"
	forms = stem .. "ot"
	
	forms = stem .. "on"
	forms = stem .. "onti"
end

function present_weak3(forms, stem)
	-- Indicative
	forms = stem .. "em"
	forms = stem .. "es"
	forms = stem .. "et"
	forms = stem .. "em(es)"
	forms = stem .. "et"
	forms = stem .. "ent"
	
	-- Subjunctive
	forms = stem .. "e"
	forms = stem .. "es"
	forms = stem .. "e"
	forms = stem .. "em(es)"
	forms = stem .. "et"
	forms = stem .. "en"
	
	-- Imperative
	forms = stem .. "e"
	forms = stem .. "et"
	
	forms = stem .. "en"
	forms = stem .. "enti"
end
 
-- Create preterite-present present forms
function present_pp(forms, stem, sg_stem)
	-- Indicative
	forms = sg_stem
	forms = sg_stem
	forms = sg_stem
	forms = stem .. "um(es)"
	forms = stem .. "ut"
	forms = stem .. "un"
	
	-- Subjunctive
	forms = stem .. "ī"
	forms = stem .. "is"
	forms = stem .. "i"
	forms = stem .. "im(es)"
	forms = stem .. "it"
	forms = stem .. "in"
	
	-- Imperative
	forms = ""
	forms = ""
	
	forms = stem .. "an"
	forms = stem .. "anti"
end

-- Create strong past-tense forms
function past_strong(forms, stem, sg_stem, indc_stem)
	forms = com.dbl_cons(sg_stem)
	forms = sg_stem .. "i"
	forms = com.dbl_cons(sg_stem)
	
	past_generic(forms, stem, indc_stem)
end

-- Create weak past-tense forms
function past_weak(forms, stem, past_stem)
	forms = com.dbl_t(stem .. "a")
	forms = com.dbl_t(stem .. "os")
	forms = com.dbl_t(stem .. "a")
	
	past_generic(forms, stem, past_stem)
	
	forms = com.dbl_cons(com.dbl_t("gi" .. stem))
end

-- Create general past-tense forms
function past_generic(forms, stem, indc_stem, past_stem)
	past_stem = indc_stem
	indc_stem = indc_stem or stem
	
	-- Nonsingular indicative
	forms = com.dbl_t(indc_stem .. "um(es)")
	forms = com.dbl_t(indc_stem .. "ut")
	forms = com.dbl_t(indc_stem .. "un")
	
	-- Subjunctive
	forms = com.dbl_t(stem .. "i")
	forms = com.dbl_t(stem .. "is")
	forms = com.dbl_t(stem .. "i")
	forms = com.dbl_t(stem .. "im(es)")
	forms = com.dbl_t(stem .. "it")
	forms = com.dbl_t(stem .. "in")
end

-- Make the table
function make_table(forms, title)
	-- Make links out of all forms
	
	for key, form in pairs(forms) do
		forms = com.link_form(form)
	end
	
	return [=[
<div class="NavFrame" style="width: 40em">
<div class="NavHead" style="text-align: left">Conjugation of '']=] .. forms .. "''" .. (title and " (" .. title .. ")" or "") .. [=[</div>
<div class="NavContent">
{| style="width: 100%; line-height: 125%; background-color:#F5FFFA; text-align:center; border: 1px solid #CCCCFF;" cellpadding="3" cellspacing="1" class="inflection-table"
|- style="background-color:#EFEFEF; "
|-
! style="font-size:90%; background-color:#93C572" | ]
! style="font-size:90%; background-color:#90EE90" | ]
! style="font-size:90%; background-color:#90EE90" | ]
|-
! ]&nbsp;]
| ]=] .. forms .. " || " .. forms .. [=[
 
|-
! ]&nbsp;]
| ]=] .. forms .. " || " .. forms .. [=[
 
|-
! ]&nbsp;]
| ]=] .. forms .. " || " .. forms .. [=[
 
|-
! ]&nbsp;]
| ]=] .. forms .. " || " .. forms .. [=[
 
|-
! ]&nbsp;]
| ]=] .. forms .. " || " .. forms .. [=[
 
|-
! ]&nbsp;]
| ]=] .. forms .. " || " .. forms .. [=[
 
|-
! style="font-size:90%; background-color:#93C572" | ]
! style="font-size:90%; background-color:#90EE90" | ]
! style="font-size:90%; background-color:#90EE90" | ]
|-
! ]&nbsp;]
| ]=] .. forms .. " || " .. forms .. [=[
 
|-
! ]&nbsp;]
| ]=] .. forms .. " || " .. forms .. [=[
 
|-
! ]&nbsp;]
| ]=] .. forms .. " || " .. forms .. [=[
 
|-
! ]&nbsp;]
| ]=] .. forms .. " || " .. forms .. [=[
 
|-
! ]&nbsp;]
| ]=] .. forms .. " || " .. forms .. [=[
 
|-
! ]&nbsp;]
| ]=] .. forms .. " || " .. forms .. [=[
 
|-
! style="font-size:90%; background-color:#93C572" | ]
! style="font-size:90%; background-color:#90EE90" | 
! style="font-size:90%; background-color:#90EE90" | 
|-
! ]
| ]=] .. forms .. [=[
 
|-
! ]
| ]=] .. forms .. [=[
 
|-
! style="font-size:90%; background-color:#93C572" | ]
! style="font-size:90%; background-color:#90EE90" | ]
! style="font-size:90%; background-color:#90EE90" | ]
|-
!
| ]=] .. forms .. " || " .. forms .. [=[
 
|}</div></div>]=]
end

return export