Module:fi-verbs

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

This module is used for the various Finnish verb inflection tables.


local export = {}

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

-- Functions that do the actual inflecting by creating the forms of a basic term.
local inflections = {}

local kotus_grad_type = {
	 = "A",
	 = "B",
	 = "C",
	 = "D",
	 = "E",
	 = "F",
	 = "G",
	 = "H",
	 = "I",
	 = "J",
	 = "K",
	 = "L",
	 = "M"
}

local function tag_term(term)
	-- return require("Module:script utilities").tag_text(term, lang, nil, "term")
	return '<i class="Latn mention" lang="fi">' .. term .. '</i>'
end

local function normalize_apostrophes(term, link_target)
	if link_target then
		if term and mw.ustring.find(term, "’") then
			term = mw.ustring.gsub(term, "’", "'")
		end
	else
		if term and mw.ustring.find(term, "'") then
			term = mw.ustring.gsub(term, "'", "’")
		end
	end
	return term
end

-- Creates a link to a form.
local function make_link(term, accel_form)
	-- do not link inflected forms of suffixes
	if term:match("^-") or term:find("%[%[%-") then
		term = mw.ustring.gsub(term, "]", "")

		if target == mw.title.getCurrentTitle().fullText then
			return '<span class="Latn" lang="fi"><strong class="selflink">' .. term .. '</strong></span>'
		end

		return '<span class="Latn" lang="fi">' .. term .. '</span>'
	end
	
	-- if there is something difficult, use full module.
	if term:find(":") or term:find("<") or (accel_form and term:find("%[")) then
		if term:find(":") then term = mw.ustring.gsub(term, ":", "\\:") end
		
		return require("Module:links").full_link({
			lang = lang,
			term = term,
			accel = accel_form and ({ form = accel_form }) or nil
		})
	end
	
	-- otherwise, we can save a ton of memory by doing this manually.
	local target = normalize_apostrophes(term, true)
	
	if target == mw.title.getCurrentTitle().fullText then
		return '<span class="Latn" lang="fi"><strong class="selflink">' .. term .. '</strong></span>'
	end
	
	if term:find("%[") then
		return '<span class="Latn" lang="fi">' .. term .. '</span>'
	end
	
	if not accel_form then
		return '<span class="Latn" lang="fi">]</span>'
	end
	
	return '<span class="Latn form-of lang-fi ' .. accel_form .. '-form-of" lang="fi">]</span>'
end

-- The main entry point.
-- This is the only function that can be invoked from a template.
function export.show(frame)
	local infl_type = frame.args or error("Inflection type has not been specified. Please pass parameter 1 to the module invocation")
	local args = frame:getParent().args
	
	if not inflections then
		error("Unknown inflection type '" .. infl_type .. "'")
	end
	
	local data = {
		forms = {},
		title = nil,
		categories = {},
		vh = nil,
		pagename = mw.title.getCurrentTitle().text
	}

	if args and mw.title.getCurrentTitle().namespace > 0 then
		data.pagename = args.title
	end
	
	data.pagename = normalize_apostrophes(data.pagename)
	
	-- Generate the forms
	inflections(args, data)
	
	-- Postprocess
	postprocess(args, data)
	
	if args then
		table.insert(data.categories, "fi-conj with appendix")
	end
	
	if args then
		table.insert(data.categories, "fi-conj with noagent")
	end
	
	if args or
		args or args or args or args or args or args or
		args or args or args or args or args or args or args then
		table.insert(data.categories, "fi-conj with qual")
	end

	local categories
	if args then
		categories = ""
	else
		categories = require("Module:utilities").format_categories(data.categories, lang)
	end
	
	return make_table(data) .. categories
		.. require("Module:TemplateStyles")("Module:fi-verbs/style.css")
end

local function args_get_required(args, i, purpose)
	local v = args
	if not v then
		error(purpose .. " (parameter " .. i .. ") may not be omitted.")
	end
	return v
end

local function args_get_vowel_harmony(args, i)
	local v = args
	if not v or not mw.ustring.match(v, "^$") then
		error("Vowel harmony (parameter " .. i .. ") must be \"a\" or \"ä\".")
	end
	return v
end

-- Get parameters from the template, in standard order and numbering
local function get_params(args, num, invert_grades)
	local params = {}

	params.base = normalize_apostrophes(args)
	if num >= 2 then
		if num >= 4 then
			params.strong = normalize_apostrophes(args_get_required(args, 2, "Infinitive grade"))
			params.weak = normalize_apostrophes(args_get_required(args, 3, "Other grade"))
	
			-- Swap the grades
			if invert_grades then
				params.strong, params.weak = params.weak, params.strong
			end
		end

		if num >= 5 then
			params.final = args_get_required(args, 4, "Final letter(s)")
		end

		params.a = args_get_vowel_harmony(args, num)
	end
	
	if params.a then
		params.o = params.a == "ä" and "ö" or "o"
		params.u = params.a == "ä" and "y" or "u"
	end
	
	return params	
end



--[=[
	Inflection functions
]=]--

local stem_endings = {}

stem_endings = {
	 = "a",
	 = "akse¤",
}

stem_endings = {
	 = "essa¤",
	 = "en",
}

stem_endings = {
	 = "V",
	 = "vat",
	 = "massa",
	 = "masta",
	 = "maan",
	 = "malla",
	 = "matta",
	 = "man",
	 = "minen",
	 = "maisilla¤",
	 = "va",
	 = "ma",
	 = "maton",
}

stem_endings = {
	 = "n",
	 = "t",
	 = "mme",
	 = "tte",
	 = "",
	 = "",
}

stem_endings = {
	 = "",
	 = "vat",
}

stem_endings = {
	 = "n",
	 = "t",
	 = "mme",
	 = "tte",
}

stem_endings = {
	 = "sin",
	 = "sit",
	 = "si",
	 = "simme",
	 = "sitte",
	 = "sivat",
	 = "si",
}

stem_endings = {
	 = "oon",
	 = "aamme",
	 = "aa",
	 = "oot",
	 = "o",
}

stem_endings = {
	 = "en",
	 = "et",
	 = "ee",
	 = "emme",
	 = "ette",
	 = "evat",
	 = "e",
	 = "ut",
	 = "eet",
}

stem_endings = {
	 = "aan",
	 = "a",
}

stem_endings = {
	 = "iin",
	 = "aisiin",
	 = "aisi",
	 = "akoon",
	 = "ako",
	 = "aneen",
	 = "ane",
	 = "aessa",
	 = "aman",
	 = "ava",
	 = "u",
}

-- Make a copy of the endings, with front vowels
stem_endings = { = stem_endings,  = mw.clone(stem_endings)}

for stem_key, endings in pairs(stem_endings) do
	for key, ending in pairs(endings) do
		endings = mw.ustring.gsub(endings, "()", { = "ä",  = "ö",  = "y"})
	end
end

local function process_stems(data, stems, vh, no_make_stems)
	-- Create any stems that were not given
	if not no_make_stems then
		stems = stems or mw.clone(stems)
		
		if not stems and stems then
			stems = {}
			
			for _, stem in ipairs(stems) do
				table.insert(stems, mw.ustring.gsub(stem, "$", "") .. "i")
			end
		end
		
		if not stems and stems then
			stems = {}
			
			for _, stem in ipairs(stems) do
				table.insert(stems, stem .. "k")
			end
		end
		
		if not stems and stems then
			stems = {}
			
			for _, stem in ipairs(stems) do
				table.insert(stems, stem .. "n")
			end
		end
	end

	-- Create forms based on each stem, by adding endings to it
	if not stems and stems then
		stems = {}
		
		for _, stem in ipairs(stems) do
			table.insert(stems, (mw.ustring.gsub(stem, "e$", "i")))
		end
	end
	
	stems = stems or mw.clone(stems)
	stems = stems or mw.clone(stems)
	
	-- Go through each of the stems given
	for stem_key, substems in pairs(stems) do
		for _, stem in ipairs(substems) do
			-- Attach the endings to the stem
			for form_key, ending in pairs(stem_endings) do
				if not data.forms then
					data.forms = {}
				end
				
				-- If the ending is "V" then it is a copy of the preceding vowel...
				if ending == "V" then
					-- ...but not if the stem ends in a long vowel or diphthong.
					if mw.ustring.find(stem, "()%1$") or mw.ustring.find(stem, "()$") or mw.ustring.find(stem, "ie$") or mw.ustring.find(stem, "uo$") or mw.ustring.find(stem, "yö$") then
						ending = ""
					else
						ending = mw.ustring.match(stem, "()$") or ""
					end
				end
				
				table.insert(data.forms, stem .. ending)
			end
		end
	end

	data = vh
end


local KOTUS_TYPE = "] type "


local function make_kotus_title_number(type_number)
	return KOTUS_TYPE .. type_number
end


local function make_kotus_title_word(reference_word)
	return '/<span lang="fi" class="Latn">]</span>'
end


local function make_kotus_title(number, reference_word)
	return make_kotus_title_number(number) .. make_kotus_title_word(reference_word)
end


local function inflection_type_is(data, number, reference_word, strong, weak)
	local title = make_kotus_title_number(number)
	local has_gradation = strong and strong ~= weak

	if has_gradation then
		local letter = kotus_grad_type
		if letter then
			title = title .. "*" .. letter
		else
			title = title .. "*"
		end
	end

	title = title .. make_kotus_title_word(reference_word)

	if has_gradation then
		local EMPTY = "<small>∅</small>"
		local function format(grade)
			if grade == "" then
				return EMPTY
			else
				return "''" .. grade .. "''"
			end
		end
		title = title .. ", " .. format(strong) .. "-" .. format(weak) .. " gradation"
	else
		title = title .. ", no gradation"
	end

	data.title = title

	table.insert(data.categories, "Finnish " .. reference_word .. "-type verbs")
end


local function inflection_type_is_t_d(data, number, reference_word, weak)
	if weak == "d" then
		inflection_type_is(data, number, reference_word, "t", "d")
	else
		inflection_type_is(data, number, reference_word, weak .. "t", weak .. weak)
	end
end


local function inflection_type_is_combo(data, number_a, reference_word_a, number_b, reference_word_b, strong, weak)
	local title = KOTUS_TYPE
	local has_gradation = strong and strong ~= weak
	local gradation_suffix = ""

	if has_gradation then
		local letter = kotus_grad_type
		if letter then
			gradation_suffix = "*" .. letter
		else
			gradation_suffix = "*"
		end
	end

	title = title .. number_a .. gradation_suffix .. make_kotus_title_word(reference_word_a)
	title = title .. " and " .. number_b .. gradation_suffix .. make_kotus_title_word(reference_word_b)

	if has_gradation then
		local EMPTY = "<small>∅</small>"
		local function format(grade)
			if grade == "" then
				return EMPTY
			else
				return "''" .. grade .. "''"
			end
		end
		title = title .. ", " .. format(strong) .. "-" .. format(weak) .. " gradation"
	else
		title = title .. ", no gradation"
	end

	data.title = title

	table.insert(data.categories, "Finnish " .. reference_word_a .. "-type verbs")
	table.insert(data.categories, "Finnish " .. reference_word_b .. "-type verbs")
end


--[=[
	Inflection types
]=]--


inflections = function(args, data)
	local params = get_params(args, 5)
	local apo = (params.weak == "" and mw.ustring.sub(params.base, -1) == params.final) and "'" or ""
	
	local stems = {}
	stems      = {params.base .. params.strong .. params.final}
	stems = {params.base .. params.weak .. apo .. params.final}
	stems      = {params.base .. params.strong .. params.final .. "i"}
	stems = {params.base .. params.weak .. apo .. params.final .. "i"}
	stems = {params.base .. params.weak .. apo .. params.final .. "t"}
	stems = {params.base .. params.weak .. apo .. params.final .. "tt"}
	
	inflection_type_is(data, 52, "sanoa", params.strong, params.weak)
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 4)
	
	local stems = {}
	stems      = {params.base .. params.strong .. params.a}
	stems = {params.base .. params.weak .. params.a}
	stems      = {params.base .. params.strong .. "i"}
	stems = {params.base .. params.weak .. "i"}
	stems = {params.base .. params.weak .. "et"}
	stems = {params.base .. params.weak .. "ett"}
	
	inflection_type_is(data, 53, "muistaa", params.strong, params.weak)
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 2)
	local weak = mw.ustring.match(params.base, "()$") or "d"
	
	local stems = {}
	stems      = {params.base .. "t" .. params.a}
	stems = {params.base .. weak .. params.a}
	stems      = {params.base .. "si"}
	stems = {params.base .. weak .. "et"}
	stems = {params.base .. weak .. "ett"}
	
	inflection_type_is_t_d(data, 54, "huutaa", weak)
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 2)
	local weak = mw.ustring.match(params.base, "()$") or "d"
	
	local stems = {}
	stems      = {params.base .. "t" .. params.a}
	stems = {params.base .. weak .. params.a}
	stems      = {params.base .. "ti", params.base .. "si"}
	stems = {params.base .. weak .. "i", params.base .. "si"}
	stems = {params.base .. weak .. "et"}
	stems = {params.base .. weak .. "ett"}
	
	inflection_type_is_t_d(data, 55, "soutaa", weak)
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 4)
	
	local stems = {}
	stems      = {params.base .. params.strong .. params.a}
	stems = {params.base .. params.weak .. params.a}
	stems      = {params.base .. params.strong .. params.o .. "i"}
	stems = {params.base .. params.weak .. params.o .. "i"}
	stems = {params.base .. params.weak .. "et"}
	stems = {params.base .. params.weak .. "ett"}
	
	inflection_type_is(data, 56, "kaivaa", params.strong, params.weak)
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 2)
	local weak = mw.ustring.match(params.base, "()$") or "d"
	
	local stems = {}
	stems      = {params.base .. "t" .. params.a}
	stems = {params.base .. weak .. params.a}
	stems      = {params.base .. "si", params.base .. "t" .. params.o .. "i"}
	stems = {params.base .. "si", params.base .. weak .. params.o .. "i"}
	stems = {params.base .. weak .. "et"}
	stems = {params.base .. weak .. "ett"}
	
	inflection_type_is_t_d(data, 57, "saartaa", weak)
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 4)
	
	local stems = {}
	stems      = {params.base .. params.strong .. "e"}
	stems = {params.base .. params.weak .. "e"}
	stems      = {params.base .. params.strong .. "i"}
	stems = {params.base .. params.weak .. "i"}
	stems = {params.base .. params.weak .. "et"}
	stems = {params.base .. params.weak .. "ett"}
	
	inflection_type_is(data, 58, "laskea", params.strong, params.weak)
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 2)
	local weak = mw.ustring.match(params.base, "()$") or "d"
	
	local stems = {}
	stems      = {params.base .. "te"}
	stems = {params.base .. weak .. "e"}
	stems      = {params.base .. "si"}
	stems = {params.base .. weak .. "et"}
	stems = {params.base .. weak .. "ett"}
	
	inflection_type_is_t_d(data, 59, "tuntea", weak)
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 2)
	
	local stems = {}
	stems      = {params.base .. "hte"}
	stems = {params.base .. "hde"}
	stems      = {params.base .. "hti", params.base .. "ksi"}
	stems = {params.base .. "hdi", params.base .. "ksi"}
	stems = {params.base .. "hdet"}
	stems = {params.base .. "hdett"}
	
	inflection_type_is(data, 60, "lähteä", "t", "d")
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 4)
	
	local apo = (params.weak == "" and mw.ustring.sub(params.base, -1) == "i") and "'" or ""
	
	local stems = {}
	stems      = {params.base .. params.strong .. "i"}
	stems = {params.base .. params.weak .. apo .. "i"}
	stems      = {params.base .. params.strong .. "i"}
	stems = {params.base .. params.weak .. apo .. "i"}
	stems = {params.base .. params.weak .. apo .. "it"}
	stems = {params.base .. params.weak .. apo .. "itt"}
	
	inflection_type_is(data, 61, "sallia", params.strong, params.weak)
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 2)
	
	local stems = {}
	stems      = {params.base .. "d"}
	stems      = {params.base}
	stems      = {params.base}
	stems = {params.base .. "d"}
	stems = {params.base .. "t"}
	
	inflection_type_is(data, 62, "voida")
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 2)
	local vowel = mw.ustring.sub(params.base, -1)
	
	local stems = {}
	stems      = {params.base .. vowel .. "d"}
	stems      = {params.base .. vowel}
	stems      = {params.base .. "i"}
	stems      = {params.base .. "i"}
	stems = {params.base .. vowel .. "d"}
	stems = {params.base .. vowel .. "t"}
	
	inflection_type_is(data, 63, "saada")
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 2)
	local past_cond_stem = mw.ustring.sub(params.base, 1, -3) .. mw.ustring.sub(params.base, -1)
	
	local stems = {}
	stems      = {params.base .. "d"}
	stems      = {params.base}
	stems      = {past_cond_stem .. "i"}
	stems      = {past_cond_stem .. "i"}
	stems = {params.base .. "d"}
	stems = {params.base .. "t"}
	
	inflection_type_is(data, 64, "juoda")
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 2)
	
	local stems = {}
	stems      = {params.base .. params.u .. "d"}
	stems      = {params.base .. params.u}
	stems      = {params.base .. "vi"}
	stems      = {params.base .. "vi"}
	stems = {params.base .. params.u .. "d"}
	stems = {params.base .. params.u .. "t"}
	
	inflection_type_is(data, 65, "käydä")
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 5, true)
	
	local stems = {}
	stems      = {params.base .. params.weak .. params.final .. "st"}
	stems      = {params.base .. params.strong .. params.final .. "se"}
	stems      = {params.base .. params.strong .. params.final .. "si"}
	stems      = {params.base .. params.weak .. params.final .. "sk"}
	stems      = {params.base .. params.weak .. params.final .. "ss"}
	stems = {params.base .. params.weak .. params.final .. "st"}
	stems = {params.base .. params.weak .. params.final .. "st"}
	
	inflection_type_is(data, 66, "rohkaista", params.strong, params.weak)
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 5, true)
	local cons = mw.ustring.sub(params.final, -1)
	
	local stems = {}
	stems      = {params.base .. params.weak .. params.final .. cons}
	stems      = {params.base .. params.strong .. params.final .. "e"}
	stems      = {params.base .. params.strong .. params.final .. "i"}
	stems      = {params.base .. params.weak .. params.final .. "k"}
	stems      = {params.base .. params.weak .. params.final .. cons}
	stems = {params.base .. params.weak .. params.final .. cons}
	stems = {params.base .. params.weak .. params.final .. "t"}
	
	inflection_type_is(data, 67, "tulla", params.strong, params.weak)
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 2)
	
	local stems = {}
	stems      = {params.base .. "d"}
	stems      = {params.base, params.base .. "tse"}
	stems      = {params.base, params.base .. "tsi"}
	stems      = {params.base .. "k"}
	stems      = {params.base .. "n"}
	stems = {params.base .. "d"}
	stems = {params.base .. "t"}
	
	inflection_type_is(data, 68, "tupakoida")
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 2)
	
	local stems = {}
	stems      = {params.base .. "t"}
	stems      = {params.base .. "tse"}
	stems      = {params.base .. "tsi"}
	stems      = {params.base .. "tk"}
	stems      = {params.base .. "nn"}
	stems = {params.base .. "t"}
	stems = {params.base .. "tt"}
	
	inflection_type_is(data, 69, "valita")
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 2)
	
	local stems = {}
	stems      = {params.base .. "st"}
	stems      = {params.base .. "kse"}
	stems      = {params.base .. "ksi"}
	stems      = {params.base .. "sk"}
	stems      = {params.base .. "ss"}
	stems = {params.base .. "st"}
	stems = {params.base .. "st"}
	
	inflection_type_is(data, 70, "juosta")
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 2)
	
	local stems = {}
	stems      = {params.base .. "hd"}
	stems      = {params.base .. "ke"}
	stems = {params.base .. "e"}
	stems      = {params.base .. "ki"}
	stems = {params.base .. "i"}
	stems      = {params.base .. "hk"}
	stems      = {params.base .. "hn"}
	stems = {params.base .. "hd"}
	stems = {params.base .. "ht"}
	
	inflection_type_is(data, 71, "nähdä", "k", "")
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 5, true)
	
	local stems = {}
	stems      = {params.base .. params.weak .. params.final .. "t"}
	stems      = {params.base .. params.strong .. params.final .. "ne"}
	stems      = {params.base .. params.strong .. params.final .. "ni"}
	stems      = {params.base .. params.weak .. params.final .. "tk"}
	stems      = {params.base .. params.weak .. params.final .. "nn"}
	stems = {params.base .. params.weak .. params.final .. "t"}
	stems = {params.base .. params.weak .. params.final .. "tt"}
	
	inflection_type_is(data, 72, "vanheta", params.strong, params.weak)
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 4, true)
	
	local stems = {}
	stems      = {params.base .. params.weak .. params.a .. "t"}
	stems      = {params.base .. params.strong .. params.a .. params.a}
	stems      = {params.base .. params.strong .. params.a .. "si"}
	stems      = {params.base .. params.strong .. params.a .. "i"}
	stems      = {params.base .. params.weak .. params.a .. "tk"}
	stems      = {params.base .. params.weak .. params.a .. "nn"}
	stems = {params.base .. params.weak .. params.a .. "t"}
	stems = {params.base .. params.weak .. params.a .. "tt"}
	
	inflection_type_is(data, 73, "salata", params.strong, params.weak)
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 5, true)
	
	local stems = {}
	stems      = {params.base .. params.weak .. params.final .. "t"}
	stems      = {params.base .. params.strong .. params.final .. params.a}
	stems      = {params.base .. params.strong .. params.final .. "si"}
	stems      = {params.base .. params.strong .. params.final .. params.a .. "i", params.base .. params.strong .. params.final .. "i"}
	stems      = {params.base .. params.weak .. params.final .. "tk"}
	stems      = {params.base .. params.weak .. params.final .. "nn"}
	stems = {params.base .. params.weak .. params.final .. "t"}
	stems = {params.base .. params.weak .. params.final .. "tt"}
	
	inflection_type_is(data, 74, "katketa", params.strong, params.weak)
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 5, true)
	
	local stems = {}
	stems      = {params.base .. params.weak .. params.final .. "t"}	
	stems      = {params.base .. params.strong .. params.final .. params.a}
	stems      = {params.base .. params.strong .. params.final .. "si"}
	stems      = {params.base .. params.weak .. params.final .. "tk"}
	stems      = {params.base .. params.weak .. params.final .. "nn"}
	stems = {params.base .. params.weak .. params.final .. "t"}
	stems = {params.base .. params.weak .. params.final .. "tt"}
	
	inflection_type_is(data, 75, "selvitä", params.strong, params.weak)
	process_stems(data, stems, params.a)
end

inflections = function(args, data)
	local params = get_params(args, 2)
	
	local stems = {}
	stems      = {params.base .. "t" .. params.a}
	stems = {params.base .. "d" .. params.a}
	stems      = {params.base .. "si"}
	stems      = {params.base .. "t" .. params.a .. "n", params.base .. "nn"}
	stems = {params.base .. "det"}
	stems = {params.base .. "dett"}
	
	inflection_type_is(data, 76, "taitaa", "t", "d")
	process_stems(data, stems, params.a)
end


inflections = function(args, data)
	local stems = {}
	stems      = {"virkka"}
	stems      = {"virkka"}
	stems = {"virka"}
	stems      = {"virkkoi"}
	stems = {"virkoi"}
	stems      = {"virkkai"}
	stems      = {"virkkak"}
	stems      = {"virkkan"}
	
	process_stems(data, stems, "a", true)
	
	local stems = {}
	
	stems = {"virket"}
	stems = {"virkett"}
	
	process_stems(data, stems, "ä", true)

	inflection_type_is_combo(data, 56, "kaivaa", 53, "muistaa", "kk", "k")
	data.title = data.title .. ", irregular vowel harmony"
end

inflections = function(args, data)
	local stems = {}
	stems      = {"seist"}
	stems      = {"seisk"}
	stems      = {"seiss"}
	stems = {"seist"}
	stems = {"seist"}
	
	process_stems(data, stems, "ä", true)
	
	local stems = {}
	stems      = {"seiso"}
	stems      = {"seisoi"}
	stems      = {"seisoi"}
	
	process_stems(data, stems, "a", true)

	inflection_type_is_combo(data, 52, "sanoa", 66, "rohkaista")
end

inflections = function(args, data)
	local stems = {}
	stems      = {"oll"}
	stems      = {"ole"}
	stems      = {"oli"}
	stems      = {"olk"}
	stems      = {"oll"}
	stems = {"oll"}
	stems = {"olt"}
	
	process_stems(data, stems, "a")
	
	data.forms = {"on"}
	data.forms = {"ovat"}
	
	data.forms = {"lienen"}
	data.forms = {"lienet"}
	data.forms = {"lienee"}
	data.forms = {"lienemme"}
	data.forms = {"lienette"}
	data.forms = {"lienevät"}
	data.forms = {"liene"}

	inflection_type_is_combo(data, 67, "tulla", 64, "juoda")
end


-- Helper functions

local complex_forms = {
	-- Present
	 = { "en", "pres_conn" },
	 = { "et", "pres_conn" },
	 = { "ei", "pres_conn" },
	 = { "emme", "pres_conn" },
	 = { "ette", "pres_conn" },
	 = { "eivät", "pres_conn" },
	 = { "ei", "pres_pasv_conn" },
	
	 = { "olen", "past_part" },
	 = { "olet", "past_part" },
	 = { "on", "past_part" },
	 = { "olemme", "past_part_pl" },
	 = { "olette", "past_part_pl" },
	 = { "ovat", "past_part_pl" },
	 = { "on", "past_pasv_part" },
	
	 = { "en ole", "past_part" },
	 = { "et ole", "past_part" },
	 = { "ei ole", "past_part" },
	 = { "emme ole", "past_part_pl" },
	 = { "ette ole", "past_part_pl" },
	 = { "eivät ole", "past_part_pl" },
	 = { "ei ole", "past_pasv_part" },
	
	-- Past
	 = { "en", "past_part" },
	 = { "et", "past_part" },
	 = { "ei", "past_part" },
	 = { "emme", "past_part_pl" },
	 = { "ette", "past_part_pl" },
	 = { "eivät", "past_part_pl" },
	 = { "ei", "past_pasv_part" },
	
	 = { "olin", "past_part" },
	 = { "olit", "past_part" },
	 = { "oli", "past_part" },
	 = { "olimme", "past_part_pl" },
	 = { "olitte", "past_part_pl" },
	 = { "olivat", "past_part_pl" },
	 = { "oli", "past_pasv_part" },
	
	 = { "en ollut", "past_part" },
	 = { "et ollut", "past_part" },
	 = { "ei ollut", "past_part" },
	 = { "emme olleet", "past_part_pl" },
	 = { "ette olleet", "past_part_pl" },
	 = { "eivät olleet", "past_part_pl" },
	 = { "ei ollut", "past_pasv_part" },
	
	-- Conditional
	 = { "en", "cond_conn" },
	 = { "et", "cond_conn" },
	 = { "ei", "cond_conn" },
	 = { "emme", "cond_conn" },
	 = { "ette", "cond_conn" },
	 = { "eivät", "cond_conn" },
	 = { "ei", "cond_pasv_conn" },
	
	 = { "olisin", "past_part" },
	 = { "olisit", "past_part" },
	 = { "olisi", "past_part" },
	 = { "olisimme", "past_part_pl" },
	 = { "olisitte", "past_part_pl" },
	 = { "olisivat", "past_part_pl" },
	 = { "olisi", "past_pasv_part" },
	
	 = { "en olisi", "past_part" },
	 = { "et olisi", "past_part" },
	 = { "ei olisi", "past_part" },
	 = { "emme olisi", "past_part_pl" },
	 = { "ette olisi", "past_part_pl" },
	 = { "eivät olisi", "past_part_pl" },
	 = { "ei olisi", "past_pasv_part" },
	
	-- Imperative
	 = { "älä", "impr_2sg" },
	 = { "älköön", "impr_conn" },
	 = { "älkäämme", "impr_conn" },
	 = { "älkää", "impr_conn" },
	 = { "älkööt", "impr_conn" },
	 = { "älköön", "impr_pasv_conn" },
	
	 = { "olkoon", "past_part" },
	 = { "olkoot", "past_part_pl" },
	 = { "olkoon", "past_pasv_part" },
	
	 = { "älköön olko", "past_part" },
	 = { "älkööt olko", "past_part_pl" },
	 = { "älköön olko", "past_pasv_part" },
	
	-- Potential
	 = { "en", "potn_conn" },
	 = { "et", "potn_conn" },
	 = { "ei", "potn_conn" },
	 = { "emme", "potn_conn" },
	 = { "ette", "potn_conn" },
	 = { "eivät", "potn_conn" },
	 = { "ei", "potn_pasv_conn" },
	
	 = { "lienen", "past_part" },
	 = { "lienet", "past_part" },
	 = { "lienee", "past_part" },
	 = { "lienemme", "past_part_pl" },
	 = { "lienette", "past_part_pl" },
	 = { "lienevät", "past_part_pl" },
	 = { "lienee", "past_pasv_part" },
	
	 = { "en liene", "past_part" },
	 = { "et liene", "past_part" },
	 = { "ei liene", "past_part" },
	 = { "emme liene", "past_part_pl" },
	 = { "ette liene", "past_part_pl" },
	 = { "eivät liene", "past_part_pl" },
	 = { "ei liene", "past_pasv_part" },
}

function postprocess(args, data)
	local appendix = args; if appendix == "" then appendix = nil end
	local qual = args; if qual == "" then qual = nil end
	local q4i = args; if q4i == "" then q4i = nil end
	local extranotes = {}
	
	-- Create the periphrastic forms (negative and perfect)
	local function make_forms(aux, forms)
		if not forms then
			return nil
		end
		
		local ret = {}
		
		for _, form in ipairs(forms) do
			table.insert(ret, aux .. " ]")
		end
		
		return ret
	end

	if qual then data.no_accel = true end
	
	-- Present
	for key, value in pairs(complex_forms) do
		data.forms = make_forms(value, data.forms])
	end
	
	-- Add qualifier
	for key, form in pairs(data.forms) do
		-- Add qual
		-- for participles, qual is before, while for others it is after
		if q4i and key == "inf4" then
			for i, subform in ipairs(form) do
				subform = (q4i and q4i .. " " or "") .. subform
				form = subform
			end
			if form.rare then
				for i, subform in ipairs(form.rare) do
					subform = (q4i and q4i .. " " or "") .. subform
					form.rare = subform
				end
			end
		elseif string.sub(key, -5) == "_part" then
			for i, subform in ipairs(form) do
				subform = (qual and qual .. " " or "") .. subform
				form = subform
			end
			if form.rare then
				for i, subform in ipairs(form.rare) do
					subform = (qual and qual .. " " or "") .. subform
					form.rare = subform
				end
			end
		else
			for i, subform in ipairs(form) do
				subform = subform .. (qual and " " .. qual or "")
				form = subform
			end
			if form.rare then
				for i, subform in ipairs(form.rare) do
					subform = subform .. (qual and " " .. qual or "")
					form.rare = subform
				end
			end
		end
		
		data.forms = form
	end
	
	data.is_appendix = appendix
	
	if args.noagent then
		data.forms = nil
	end

	if data.forms == data.forms then
		table.insert(extranotes, "&#42; The third-person singular indicative form " .. tag_term(data.forms) .. " does not exhibit ], <br/>unlike the first infinitive (the lemma form), even though they are spelled identically.")
	end

	if extranotes then
		data.extranotes = extranotes
	end
	
	-- Check if the lemma form matches the page name
	if not appendix and not (args or args or args or args or args or args) and (lang:makeEntryName(data.forms)) ~= normalize_apostrophes(data.pagename, true) then
		table.insert(data.categories, "Finnish entries with inflection not matching pagename")
	end
end

local inf_to_accel = {
	 = nil,
	 = "long|first|inf",
	 = "ine|of|second|actv|inf",
	 = "ine|of|second|pasv|inf",
	 = "ist|of|second|actv|inf",
	 = "ine|of|third|actv|inf",
	 = "ela|of|third|actv|inf",
	 = "ill|of|third|actv|inf",
	 = "ade|of|third|actv|inf",
	 = "abe|of|third|actv|inf",
	 = "ist|of|third|actv|inf",
	 = "ist|of|third|pasv|inf",
	 = "vnoun",
	 = "fifth|inf"
}

local part_to_accel = {
	 = "pres|actv|part",
	 = "pres|pasv|part",
	 = "past|actv|part",
	 = "past|pasv|part",
	 = "agentpart",
	 = "neg|part"
}

function convert_to_accel_inf(form)
	return inf_to_accel
end

function convert_to_accel_part(form)
	return "participle-" .. part_to_accel
end

function convert_to_accel(form, vh)
	if mw.ustring.match(form, "_perf") then
		-- all perf forms involve the past participle which we do not want
		-- to create manually
		return nil
	elseif form == "inf4" then
		return "vnoun-" .. vh
	elseif mw.ustring.match(form, "^inf") then
		return convert_to_accel_inf(form)
	elseif mw.ustring.match(form, "_part$") then
		return convert_to_accel_part(form)
	end

	-- imperative connegative is special
	if form == "impr_2sg_neg" then
		return "2|s|impr|conn"
	elseif mw.ustring.match(form, "impr_%d%a%a_neg") then
		return "3|or|p|impr|conn"
	end

	-- split to tense/mood, person, extra
	local tmood, person, extra = unpack(mw.text.split(form, "_"))
	local tense, mood = "", tmood
	if tmood == "pres" or tmood == "past" then
		tense, mood = tmood .. "|", "indc"
	end

	-- negative/connegative?
	if extra == "neg" then
		local result = tense
		if person == "pasv" then
			result = result .. "pasv"
		else
			-- not passive => active (no distinction between person here)
			result = result .. "actv"
		end
		result = result .. "|" .. mood .. "|conn"
		return result
	end

	-- convert person if not passive
	person = person:gsub("(%d)(%a)%a", "%1|%2")
	return person .. "|" .. tense .. mood
end

local poss_endings = {
	 = "ni",  = "si",  = "mme",  = "nne",  = "nsa"
}

local accel_prefixes = {
	 = "1|s",  = "2|s",  = "1|p",  = "2|p",  = "3"
}

-- Make the table
function make_table(data)
	local vh = data.vh
	local function show_form(form, accel_form)
		if not form then
			return "&mdash;"
		elseif type(form) ~= "table" then
			error("a non-table value was given in the list of inflected forms.")
		end
		
		local ret = {}
		
		for key, subform in ipairs(form) do
			if mw.ustring.find(subform, "¤") then subform = mw.ustring.gsub(subform, "¤", "") end
			local accel = (accel_form and not data.no_accel) and accel_form or nil
			table.insert(ret, make_link(subform, accel))
		end
		
		return table.concat(ret, "<br/>")
	end
	
	local function make_and_show_poss_table(form, vh, accel_suffix)
		local short
		
		if mw.ustring.find(form, "()¤") then
			short = mw.ustring.gsub(form, "()¤", "%1%1n")
		end
		
		local function poss_repl(mode)
			local ending = poss_endings
			if ending:find("a") then ending = mw.ustring.gsub(ending, "a", vh) end
			local forms = {(mw.ustring.gsub(form, "¤", ending))}
			
			if mode == "3" and short then
				table.insert(forms, 1, short)
			end
			
			local ret = {}
			
			for key, subform in ipairs(forms) do
				local accel = (accel_suffix and not data.no_accel) and accel_prefixes .. "|form|of|" .. accel_suffix or nil
				table.insert(ret, make_link(subform, accel))
			end
			
			return table.concat(ret, "<br/>")
		end
		
		local poss_table_wikicode = [=[
{| class="inflection-table vsSwitcher fi-conj-poss" data-toggle-category="possessive inflection"
|- class="fi-conj-poss-header"
! class="vsToggleElement fi-conj-poss-toggle" colspan="3" | Possessive forms
|- class="vsHide"
! Person
! sing.
! plur.
|- class="vsHide"
! 1st
| {{{1s}}}
| {{{1p}}}
|- class="vsHide"
! 2nd
| {{{2s}}}
| {{{2p}}}
|- class="vsHide"
! 3rd
| colspan="2" | {{{3}}}
|}]=]
		
		return mw.ustring.gsub(poss_table_wikicode, "{{{(+)}}}", poss_repl)
	end
	
	local function repl(param)
		if param == "lemma" then
			return (data.is_appendix and make_link(data.pagename) or tag_term(data.pagename))
		elseif param == "info" then
			return data.title and " (" .. data.title .. ")" or ""
		elseif param == "extranotes" then
			if data.extranotes and #data.extranotes > 0 then
				return "<br/>\n" .. table.concat(data.extranotes, "<br/>\n")
			else
				return ""
			end
		elseif param:find("^m_") then
			return tag_term(param:sub(3))
		elseif param:find("^poss_") then
			local result = ""
			local accel_suffix = convert_to_accel(param:sub(6), nil)
			for _, subform in ipairs(data.forms) do
				result = result .. make_and_show_poss_table(subform, vh, accel_suffix) .. "\n"
			end
			return result
		else
			return show_form(data.forms, convert_to_accel(param, vh))
		end
	end
	
	local wikicode = [=[
<div class="noresize">
{| class="inflection-table vsSwitcher fi-conj" data-toggle-category="conjugation"
|-
! class="vsToggleElement" colspan="7" | ] of {{{lemma}}}{{{info}}}
|- class="vsHide"
! colspan="7" | ]
|- class="vsHide"
! colspan="4" | ]
! colspan="3" | perfect
|- class="vsHide"
! class="fi-conj-header-person" colspan="2" | person
! class="fi-conj-header-posneg thsub" | positive
! class="fi-conj-header-posneg thsub" | negative
! class="fi-conj-header-person" | person
! class="fi-conj-header-posneg thsub" | positive
! class="fi-conj-header-posneg thsub" | negative
|- class="vsHide"
! colspan="2" | <span title="first-person singular">1st&nbsp;sing.</span>
| data-accel-col="1" | {{{pres_1sg}}}
| data-accel-col="2" | {{{pres_1sg_neg}}}
! <span title="first-person singular">1st&nbsp;sing.</span>
| data-accel-col="3" | {{{pres_perf_1sg}}}
| data-accel-col="4" | {{{pres_perf_1sg_neg}}}
|- class="vsHide"
! colspan="2" | <span title="second-person singular">2nd&nbsp;sing.</span>
| data-accel-col="1" | {{{pres_2sg}}}
| data-accel-col="2" | {{{pres_2sg_neg}}}
! <span title="second-person singular">2nd&nbsp;sing.</span>
| data-accel-col="3" | {{{pres_perf_2sg}}}
| data-accel-col="4" | {{{pres_perf_2sg_neg}}}
|- class="vsHide"
! colspan="2" | <span title="third-person singular">3rd&nbsp;sing.</span>
| data-accel-col="1" | {{{pres_3sg}}}
| data-accel-col="2" | {{{pres_3sg_neg}}}
! <span title="third-person singular">3rd&nbsp;sing.</span>
| data-accel-col="3" | {{{pres_perf_3sg}}}
| data-accel-col="4" | {{{pres_perf_3sg_neg}}}
|- class="vsHide"
! colspan="2" | <span title="first-person plural">1st&nbsp;plur.</span>
| data-accel-col="1" | {{{pres_1pl}}}
| data-accel-col="2" | {{{pres_1pl_neg}}}
! <span title="first-person plural">1st&nbsp;plur.</span>
| data-accel-col="3" | {{{pres_perf_1pl}}}
| data-accel-col="4" | {{{pres_perf_1pl_neg}}}
|- class="vsHide"
! colspan="2" | <span title="second-person plural">2nd&nbsp;plur.</span>
| data-accel-col="1" | {{{pres_2pl}}}
| data-accel-col="2" | {{{pres_2pl_neg}}}
! <span title="second-person plural">2nd&nbsp;plur.</span>
| data-accel-col="3" | {{{pres_perf_2pl}}}
| data-accel-col="4" | {{{pres_perf_2pl_neg}}}
|- class="vsHide"
! colspan="2" | <span title="third-person plural">3rd&nbsp;plur.</span>
| data-accel-col="1" | {{{pres_3pl}}}
| data-accel-col="2" | {{{pres_3pl_neg}}}
! <span title="third-person plural">3rd&nbsp;plur.</span>
| data-accel-col="3" | {{{pres_perf_3pl}}}
| data-accel-col="4" | {{{pres_perf_3pl_neg}}}
|- class="vsHide"
! colspan="2" | <span title="passive/impersonal">passive</span>
| data-accel-col="1" | {{{pres_pasv}}}
| data-accel-col="2" | {{{pres_pasv_neg}}}
! <span title="passive/impersonal">passive</span>
| data-accel-col="3" | {{{pres_perf_pasv}}}
| data-accel-col="4" | {{{pres_perf_pasv_neg}}}
|- class="vsHide"
! colspan="4" | ]
! colspan="3" | pluperfect
|- class="vsHide"
! class="fi-conj-header-person" colspan="2" | person
! class="fi-conj-header-posneg thsub" | positive
! class="fi-conj-header-posneg thsub" | negative
! class="fi-conj-header-person" | person
! class="fi-conj-header-posneg thsub" | positive
! class="fi-conj-header-posneg thsub" | negative
|- class="vsHide"
! colspan="2" | <span title="first-person singular">1st&nbsp;sing.</span>
| data-accel-col="1" | {{{past_1sg}}}
| data-accel-col="2" | {{{past_1sg_neg}}}
! <span title="first-person singular">1st&nbsp;sing.</span>
| data-accel-col="3" | {{{past_perf_1sg}}}
| data-accel-col="4" | {{{past_perf_1sg_neg}}}
|- class="vsHide"
! colspan="2" | <span title="second-person singular">2nd&nbsp;sing.</span>
| data-accel-col="1" | {{{past_2sg}}}
| data-accel-col="2" | {{{past_2sg_neg}}}
! <span title="second-person singular">2nd&nbsp;sing.</span>
| data-accel-col="3" | {{{past_perf_2sg}}}
| data-accel-col="4" | {{{past_perf_2sg_neg}}}
|- class="vsHide"
! colspan="2" | <span title="third-person singular">3rd&nbsp;sing.</span>
| data-accel-col="1" | {{{past_3sg}}}
| data-accel-col="2" | {{{past_3sg_neg}}}
! <span title="third-person singular">3rd&nbsp;sing.</span>
| data-accel-col="3" | {{{past_perf_3sg}}}
| data-accel-col="4" | {{{past_perf_3sg_neg}}}
|- class="vsHide"
! colspan="2" | <span title="first-person plural">1st&nbsp;plur.</span>
| data-accel-col="1" | {{{past_1pl}}}
| data-accel-col="2" | {{{past_1pl_neg}}}
! <span title="first-person plural">1st&nbsp;plur.</span>
| data-accel-col="3" | {{{past_perf_1pl}}}
| data-accel-col="4" | {{{past_perf_1pl_neg}}}
|- class="vsHide"
! colspan="2" | <span title="second-person plural">2nd&nbsp;plur.</span>
| data-accel-col="1" | {{{past_2pl}}}
| data-accel-col="2" | {{{past_2pl_neg}}}
! <span title="second-person plural">2nd&nbsp;plur.</span>
| data-accel-col="3" | {{{past_perf_2pl}}}
| data-accel-col="4" | {{{past_perf_2pl_neg}}}
|- class="vsHide"
! colspan="2" | <span title="third-person plural">3rd&nbsp;plur.</span>
| data-accel-col="1" | {{{past_3pl}}}
| data-accel-col="2" | {{{past_3pl_neg}}}
! <span title="third-person plural">3rd&nbsp;plur.</span>
| data-accel-col="3" | {{{past_perf_3pl}}}
| data-accel-col="4" | {{{past_perf_3pl_neg}}}
|- class="vsHide"
! colspan="2" | <span title="passive/impersonal">passive</span>
| data-accel-col="1" | {{{past_pasv}}}
| data-accel-col="2" | {{{past_pasv_neg}}}
! <span title="passive/impersonal">passive</span>
| data-accel-col="3" | {{{past_perf_pasv}}}
| data-accel-col="4" | {{{past_perf_pasv_neg}}}
|- class="vsHide"
! colspan="7" | ]
|- class="vsHide"
! colspan="4" | present
! colspan="3" | perfect
|- class="vsHide"
! class="fi-conj-header-person" colspan="2" | person
! class="fi-conj-header-posneg thsub" | positive
! class="fi-conj-header-posneg thsub" | negative
! class="fi-conj-header-person" | person
! class="fi-conj-header-posneg thsub" | positive
! class="fi-conj-header-posneg thsub" | negative
|- class="vsHide"
! colspan="2" | <span title="first-person singular">1st&nbsp;sing.</span>
| data-accel-col="1" | {{{cond_1sg}}}
| data-accel-col="2" | {{{cond_1sg_neg}}}
! <span title="first-person singular">1st&nbsp;sing.</span>
| data-accel-col="3" | {{{cond_perf_1sg}}}
| data-accel-col="4" | {{{cond_perf_1sg_neg}}}
|- class="vsHide"
! colspan="2" | <span title="second-person singular">2nd&nbsp;sing.</span>
| data-accel-col="1" | {{{cond_2sg}}}
| data-accel-col="2" | {{{cond_2sg_neg}}}
! <span title="second-person singular">2nd&nbsp;sing.</span>
| data-accel-col="3" | {{{cond_perf_2sg}}}
| data-accel-col="4" | {{{cond_perf_2sg_neg}}}
|- class="vsHide"
! colspan="2" | <span title="third-person singular">3rd&nbsp;sing.</span>
| data-accel-col="1" | {{{cond_3sg}}}
| data-accel-col="2" | {{{cond_3sg_neg}}}
! <span title="third-person singular">3rd&nbsp;sing.</span>
| data-accel-col="3" | {{{cond_perf_3sg}}}
| data-accel-col="4" | {{{cond_perf_3sg_neg}}}
|- class="vsHide"
! colspan="2" | <span title="first-person plural">1st&nbsp;plur.</span>
| data-accel-col="1" | {{{cond_1pl}}}
| data-accel-col="2" | {{{cond_1pl_neg}}}
! <span title="first-person plural">1st&nbsp;plur.</span>
| data-accel-col="3" | {{{cond_perf_1pl}}}
| data-accel-col="4" | {{{cond_perf_1pl_neg}}}
|- class="vsHide"
! colspan="2" | <span title="second-person plural">2nd&nbsp;plur.</span>
| data-accel-col="1" | {{{cond_2pl}}}
| data-accel-col="2" | {{{cond_2pl_neg}}}
! <span title="second-person plural">2nd&nbsp;plur.</span>
| data-accel-col="3" | {{{cond_perf_2pl}}}
| data-accel-col="4" | {{{cond_perf_2pl_neg}}}
|- class="vsHide"
! colspan="2" | <span title="third-person plural">3rd&nbsp;plur.</span>
| data-accel-col="1" | {{{cond_3pl}}}
| data-accel-col="2" | {{{cond_3pl_neg}}}
! <span title="third-person plural">3rd&nbsp;plur.</span>
| data-accel-col="3" | {{{cond_perf_3pl}}}
| data-accel-col="4" | {{{cond_perf_3pl_neg}}}
|- class="vsHide"
! colspan="2" | <span title="passive/impersonal">passive</span>
| data-accel-col="1" | {{{cond_pasv}}}
| data-accel-col="2" | {{{cond_pasv_neg}}}
! <span title="passive/impersonal">passive</span>
| data-accel-col="3" | {{{cond_perf_pasv}}}
| data-accel-col="4" | {{{cond_perf_pasv_neg}}}
|- class="vsHide"
! colspan="7" | ]
|- class="vsHide"
! colspan="4" | present
! colspan="3" | perfect
|- class="vsHide"
! class="fi-conj-header-person" colspan="2" | person
! class="fi-conj-header-posneg thsub" | positive
! class="fi-conj-header-posneg thsub" | negative
! class="fi-conj-header-person" | person
! class="fi-conj-header-posneg thsub" | positive
! class="fi-conj-header-posneg thsub" | negative
|- class="vsHide"
! colspan="2" | <span title="first-person singular">1st&nbsp;sing.</span>
| &mdash;
| &mdash;
! <span title="first-person singular">1st&nbsp;sing.</span>
| &mdash;
| &mdash;
|- class="vsHide"
! colspan="2" | <span title="second-person singular">2nd&nbsp;sing.</span>
| data-accel-col="1" | {{{impr_2sg}}}
| data-accel-col="2" | {{{impr_2sg_neg}}}
! <span title="second-person singular">2nd&nbsp;sing.</span>
| data-accel-col="3" | &mdash;
| data-accel-col="4" | &mdash;
|- class="vsHide"
! colspan="2" | <span title="third-person singular">3rd&nbsp;sing.</span>
| data-accel-col="1" | {{{impr_3sg}}}
| data-accel-col="2" | {{{impr_3sg_neg}}}
! <span title="third-person singular">3rd&nbsp;sing.</span>
| data-accel-col="3" | {{{impr_perf_3sg}}}
| data-accel-col="4" | {{{impr_perf_3sg_neg}}}
|- class="vsHide"
! colspan="2" | <span title="first-person plural">1st&nbsp;plur.</span>
| data-accel-col="1" | {{{impr_1pl}}}
| data-accel-col="2" | {{{impr_1pl_neg}}}
! <span title="first-person plural">1st&nbsp;plur.</span>
| data-accel-col="3" | &mdash;
| data-accel-col="4" | &mdash;
|- class="vsHide"
! colspan="2" | <span title="second-person plural">2nd&nbsp;plur.</span>
| data-accel-col="1" | {{{impr_2pl}}}
| data-accel-col="2" | {{{impr_2pl_neg}}}
! <span title="second-person plural">2nd&nbsp;plur.</span>
| data-accel-col="3" | &mdash;
| data-accel-col="4" | &mdash;
|- class="vsHide"
! colspan="2" | <span title="third-person plural">3rd&nbsp;plur.</span>
| data-accel-col="1" | {{{impr_3pl}}}
| data-accel-col="2" | {{{impr_3pl_neg}}}
! <span title="third-person plural">3rd&nbsp;plur.</span>
| data-accel-col="3" | {{{impr_perf_3pl}}}
| data-accel-col="4" | {{{impr_perf_3pl_neg}}}
|- class="vsHide"
! colspan="2" | <span title="passive/impersonal">passive</span>
| data-accel-col="1" | {{{impr_pasv}}}
| data-accel-col="2" | {{{impr_pasv_neg}}}
! <span title="passive/impersonal">passive</span>
| data-accel-col="3" | {{{impr_perf_pasv}}}
| data-accel-col="4" | {{{impr_perf_pasv_neg}}}
|- class="vsHide"
! colspan="7" | ]
|- class="vsHide"
! colspan="4" | present
! colspan="3" | perfect
|- class="vsHide"
! class="fi-conj-header-person" colspan="2" | person
! class="fi-conj-header-posneg thsub" | positive
! class="fi-conj-header-posneg thsub" | negative
! class="fi-conj-header-person" | person
! class="fi-conj-header-posneg thsub" | positive
! class="fi-conj-header-posneg thsub" | negative
|- class="vsHide"
! colspan="2" | <span title="first-person singular">1st&nbsp;sing.</span>
| data-accel-col="1" | {{{potn_1sg}}}
| data-accel-col="2" | {{{potn_1sg_neg}}}
! <span title="first-person singular">1st&nbsp;sing.</span>
| data-accel-col="3" | {{{potn_perf_1sg}}}
| data-accel-col="4" | {{{potn_perf_1sg_neg}}}
|- class="vsHide"
! colspan="2" | <span title="second-person singular">2nd&nbsp;sing.</span>
| data-accel-col="1" | {{{potn_2sg}}}
| data-accel-col="2" | {{{potn_2sg_neg}}}
! <span title="second-person singular">2nd&nbsp;sing.</span>
| data-accel-col="3" | {{{potn_perf_2sg}}}
| data-accel-col="4" | {{{potn_perf_2sg_neg}}}
|- class="vsHide"
! colspan="2" | <span title="third-person singular">3rd&nbsp;sing.</span>
| data-accel-col="1" | {{{potn_3sg}}}
| data-accel-col="2" | {{{potn_3sg_neg}}}
! <span title="third-person singular">3rd&nbsp;sing.</span>
| data-accel-col="3" | {{{potn_perf_3sg}}}
| data-accel-col="4" | {{{potn_perf_3sg_neg}}}
|- class="vsHide"
! colspan="2" | <span title="first-person plural">1st&nbsp;plur.</span>
| data-accel-col="1" | {{{potn_1pl}}}
| data-accel-col="2" | {{{potn_1pl_neg}}}
! <span title="first-person plural">1st&nbsp;plur.</span>
| data-accel-col="3" | {{{potn_perf_1pl}}}
| data-accel-col="4" | {{{potn_perf_1pl_neg}}}
|- class="vsHide"
! colspan="2" | <span title="second-person plural">2nd&nbsp;plur.</span>
| data-accel-col="1" | {{{potn_2pl}}}
| data-accel-col="2" | {{{potn_2pl_neg}}}
! <span title="second-person plural">2nd&nbsp;plur.</span>
| data-accel-col="3" | {{{potn_perf_2pl}}}
| data-accel-col="4" | {{{potn_perf_2pl_neg}}}
|- class="vsHide"
! colspan="2" | <span title="third-person plural">3rd&nbsp;plur.</span>
| data-accel-col="1" | {{{potn_3pl}}}
| data-accel-col="2" | {{{potn_3pl_neg}}}
! <span title="third-person plural">3rd&nbsp;plur.</span>
| data-accel-col="3" | {{{potn_perf_3pl}}}
| data-accel-col="4" | {{{potn_perf_3pl_neg}}}
|- class="vsHide"
! colspan="2" | <span title="passive/impersonal">passive</span>
| data-accel-col="1" | {{{potn_pasv}}}
| data-accel-col="2" | {{{potn_pasv_neg}}}
! <span title="passive/impersonal">passive</span>
| data-accel-col="3" | {{{potn_perf_pasv}}}
| data-accel-col="4" | {{{potn_perf_pasv_neg}}}
|- class="vsHide"
! colspan="7" | Nominal forms
|- class="vsHide"
! colspan="4" | ]s
! colspan="3" | ]s
|- class="vsHide"
! colspan="2" |
! class="thsub" |active
! class="thsub" |passive
!
! class="thsub" | active
! class="thsub" |passive
|- class="vsHide"
! colspan="2" | 1st
| data-accel-col="1" colspan="2" | {{{inf1}}}
! present
| data-accel-col="1" | {{{pres_part}}}
| data-accel-col="1" | {{{pres_pasv_part}}}
|- class="vsHide"
! colspan="2" | long 1st<sup>1</sup>
| data-accel-col="1" colspan="2" |
{{{poss_inf1_long}}}
! past
| data-accel-col="1" | {{{past_part}}}
| data-accel-col="1" | {{{past_pasv_part}}}
|- class="vsHide"
! rowspan="3" | 2nd
! class="thsub" rowspan="2" | inessive<sup>2</sup>
| data-accel-col="1" | {{{inf2_ine}}}
| data-accel-col="1" | {{{inf2_pasv_ine}}}
! agent<sup>4</sup>
| data-accel-col="1" colspan="2" | {{{agnt_part}}}
|- class="vsHide"
| data-accel-col="1" colspan="2" |
{{{poss_inf2_ine}}}
! negative
| data-accel-col="1" colspan="2" | {{{nega_part}}}
|- class="vsHide"
! class="thsub" | instructive
| data-accel-col="1" | {{{inf2_ins}}}
| &mdash;
| colspan="3" rowspan="10" class="fi-conj-notes" | <div style="white-space:normal;min-width:100%;max-width:min-content;"><sup>1)</sup> Used only with a possessive suffix.<br/>
<sup>2)</sup> Usually with a possessive suffix (active only).<br/>
<sup>3)</sup> Some uses of the verbal noun are called the 'fourth infinitive' by certain sources (]).<br/>
<sup>4)</sup> Usually with a possessive suffix. May not be used with all verbs, especially intransitive ones (]). Distinct from nouns with the {{{m_-ma}}} suffix and third infinitive forms.{{{extranotes}}}</div>
|- class="vsHide"
! rowspan="6" | 3rd
! class="thsub" | inessive
| data-accel-col="1" | {{{inf3_ine}}}
| &mdash;
|- class="vsHide"
! class="thsub" | elative
| data-accel-col="1" | {{{inf3_ela}}}
| &mdash;
|- class="vsHide"
! class="thsub" | illative
| data-accel-col="1" | {{{inf3_ill}}}
| &mdash;
|- class="vsHide thsub" |
! class="thsub" | adessive
| data-accel-col="1" | {{{inf3_ade}}}
| &mdash;
|- class="vsHide thsub" |
! class="thsub" | abessive
| data-accel-col="1" | {{{inf3_abe}}}
| &mdash;
|- class="vsHide thsub" |
! class="thsub" | instructive
| data-accel-col="1" | {{{inf3_ins}}}
| data-accel-col="1" | {{{inf3_pasv_ins}}}
|- class="vsHide thsub" |
! 4th<sup>3</sup>
! class="thsub" | verbal noun
| colspan="2" data-accel-col="1" | {{{inf4}}}
|- class="vsHide thsub" |
! colspan="2" | 5th<sup>1</sup>
| colspan="2" data-accel-col="1" |
{{{poss_inf5}}}
|}
</div>]=]
	
	return mw.ustring.gsub(wikicode, "{{{(+)}}}", repl)
end

return export