Module:dum-determiner-strong

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


local m_links = require("Module:links")
local m_common = require("Module:dum-common")

local lang = require("Module:languages").getByCode("dum")

local export = {}


function export.show(frame)
	local params = {
		 = {required = true, default = "{{{1}}}"},
		 = {required = false, default = "{{{2}}}"},
	}
	
	local args = require("Module:parameters").process(frame:getParent().args, params)
	
	local data = {forms = {}, categories = {}}
	
	local stem = mw.ustring.gsub(args, "()e$", "%1")
	
	local s_ending = ""
	
	if string.sub(stem, -1)=="s" then
		s_ending = {stem .. hatch .. "es"}
	else
		s_ending = {m_common.devoiced(m_common.checked(args)) .. "s"}
	end
	
	data.forms = {m_common.devoiced(m_common.checked(args))}
	data.forms = {stem .. "en"}
	data.forms = s_ending
	data.forms = {stem .. "en"}
	
	data.forms = {stem .. "e"}
	data.forms = {stem .. "e"}
	data.forms = er_stem(stem, args)
	data.forms = er_stem(stem, args)
	
	data.forms = {m_common.devoiced(m_common.checked(args))}
	data.forms = {m_common.devoiced(m_common.checked(args))}
	data.forms = s_ending
	data.forms = {stem .. "en"}
	
	data.forms = {stem .. "e"}
	data.forms = {stem .. "e"}
	data.forms = er_stem(stem, args)
	data.forms = {stem .. "en"}
	
	return make_table(data)
end


function er_stem(stem, exception)
	if exception=="{{{2}}}" then
		return 	{stem .. "er"}
	else
		return {exception}
	end
end

-- Make the table
function make_table(data)
	local function repl(param)
		local form = data.forms
		
		if not form or #form == 0 then
			return "—"
		end
		
		local ret = {}
		
		for key, subform in ipairs(form) do
			table.insert(ret, m_links.full_link({lang = lang, alt = subform}))
		end
		
		return table.concat(ret, ", ")
	end
	
	local names = {
		 = "masculine",
		 = "feminine",
		 = "neuter",
		
		 = "nominative",
		 = "accusative",
		 = "genitive",
		 = "dative",
		
		 = "singular",
		 = "plural",
	}
	
	local cases = {"nom", "acc", "gen", "dat"}
	local genders = {"m", "f", "n", "p"}
	
	local wikicode = {}
	
	table.insert(wikicode, mw.getCurrentFrame():expandTemplate{
		title = 'inflection-table-top',
		args = {
			title = '-',
			palette = 'indigo',
		}
	})
	
	table.insert(wikicode, '! class="outer" |')
	table.insert(wikicode, '! class="outer" colspan="3" | singular')
	table.insert(wikicode, '! class="outer" rowspan="2" | plural')
	table.insert(wikicode, '|-')
	table.insert(wikicode, '!')
	table.insert(wikicode, '! masculine')
	table.insert(wikicode, '! feminine')
	table.insert(wikicode, '! neuter')
	
	for _, case in ipairs(cases) do
		table.insert(wikicode, "|-")
		table.insert(wikicode, "! " .. names)
		
		for _, g in ipairs(genders) do
			table.insert(wikicode, "| {{{" .. g .. "_" .. case .. "}}}")
		end
	end
	
	table.insert(wikicode, mw.getCurrentFrame():expandTemplate{ title = 'inflection-table-bottom' })
	
	wikicode = table.concat(wikicode, "\n")
	
	return (mw.ustring.gsub(wikicode, "{{{(+)}}}", repl)) .. require("Module:utilities").format_categories(data.categories, lang)
end

return export