Module:nn-verb-irreg

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

This module needs documentation.
Please document this module by describing its purpose and usage on the documentation page.

local export = {}

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

function export.main(frame)
	local PAGENAME = mw.title.getCurrentTitle().text
	local NAMESPACE = mw.title.getCurrentTitle().nsText
	
	-- Retrieve and process arguments
	
	local params = {
		 = {required = true, list = "pres_tense"},
		 = {required = true, list = "past_tense"},
		 = {required = true, list = "past_part"},
		
		 = {default = "", list = "pasv_inf"},
		 = {default = "", list = "pres_part"},
		 = {default = "", list = "imp"},
		 = {alias_of = 6},
		
		 = {},
		 = {type = "boolean"},
		 = {type = "boolean"},
		 = {type = "boolean"},
		 = {type = "boolean"},
		}
	
	local args = require("Module:parameters").process(frame:getParent().args, params)
	
	-- Figure out roots
	
	local length = PAGENAME:len()
	local cons1 = PAGENAME:sub(1, 1):find('')
	local cons2 = PAGENAME:sub(2, 2):find('')
	
	local root = PAGENAME
	
	if not (length == 3 and cons1 and cons2) and PAGENAME:find('$') and length > 2 then
		root = PAGENAME:sub(1, length-1)
	end
	
	local second_root = args or root
	local root2 = root
	
	if root:sub(length-1, length-1) == 'j' and length > 3 then
		root2 = root:sub(1, length-2)
	end
	
	if PAGENAME:find('ast$') or PAGENAME:find('as$') then
		args = true
		args = true
	end
	
	local data = {lang = lang, pos_category = "verbs", categories = {}, inflections = {}}
	
	-- Add inflections
	args.label = "present tense"
	table.insert(data.inflections, args)
	
	args.label = "past tense"
	table.insert(data.inflections, args)
	
	args.label = "past participle"
	table.insert(data.inflections, args)
	
	if not (args or args) then
		if args == "" then
			args = second_root .. "ast"
		end
		
		args.label = "passive infinitive"
		table.insert(data.inflections, args)
	end
	
	if not (args or args) then
		if args == "" then
			args = second_root .. "ande"
		end
		
		args.label = "present participle"
		table.insert(data.inflections, args)
	end
	
	if not (args or args) then
		if args == "" then
			if root:sub(length-2, length-1) == 'mm' then
				args = root:sub(1, length-2)
			else
				args = root2
			end
		end
		
		args.label = "imperative"
		table.insert(data.inflections, args)
	end
	
	return require('Module:headword').full_headword(data)
end

return export