Module:pl-verb

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

Work in progress module for conjugation of Polish verbs.


local export = {}

local m_g = require('Module:gender and number')
local m_links = require('Module:links')
local m_adj = require('Module:pl-adj')
local m_noun = require('Module:pl-noun')
local lang = require("Module:languages").getByCode("pl")

tense_rows = {
	{	tense = "inf";
		title = "infinitive";
		pltitle = "bezokolicznik";
		color = "#e2e4c0";
		inflects_for = {};
	},
	{	tense = "pres";
		title = "present tense";
		pltitle = "czas teraźniejszy";
		color = "#c0cfe4";
		inflects_for = { person = true; impersonal = true; number = true; };
	},
	{	tense = "past";
		title = "past tense";
		pltitle = "czas przeszły";
		color = "#b0e4e4";
		inflects_for = { person = true; impersonal = true; gender = true; number = true; };
	},
	{	tense = "fut";
		title = "future tense";
		pltitle = "czas przyszły";
		color = "#c0e4c0";
		inflects_for = { person = true; impersonal = true; gender = true; number = true; };
	},
	-- single-word future tense for perfective verbs
	{	tense = "sfut";
		title = "future tense";
		pltitle = "czas przyszły prosty";
		color = "#c0e4c0";
		inflects_for = { person = true; impersonal = true; gender = false; number = true; };
	},
	{	tense = "cond";
		title = "conditional";
		pltitle = "tryb przypuszczający";
		color = "#f4f4c0";
		inflects_for = { person = true; impersonal = true; gender = true; number = true; };
	},
	{	tense = "imp";
		title = "imperative";
		pltitle = "tryb rozkazujący";
		color = "#e4d4c0";
		inflects_for = { person = true; number = true; };
	},
	{	tense = "aadj";
		title = "active adjectival participle";
		pltitle = "imiesłów przymiotnikowy czynny";
		color = "#e2e4c0";
		inflects_for = { gender = true; number = true; case = true; };
	},
	{	tense = "padj";
		title = "passive adjectival participle";
		pltitle = "imiesłów przymiotnikowy bierny";
		color = "#e2e4c0";
		inflects_for = { gender = true; number = true; case = true; };
	},
	{	tense = "pastadj";
		title = "past adjectival participle";
		pltitle = "imiesłów przymiotnikowy przeszły";
		color = "#e2e4c0";
		inflects_for = { gender = true; number = true; case = true; };
	},
	{	tense = "cadv";
		title = "contemporary adverbial participle";
		pltitle = "imiesłów przysłówkowy współczesny";
		color = "#e2e4c0";
		inflects_for = {};
	},
	{	tense = "aadv";
		title = "anterior adverbial participle";
		pltitle = "imiesłów przysłówkowy uprzedni";
		color = "#e2e4c0";
		inflects_for = {};
	},
	{	tense = "vn";
		title = "verbal noun\n" .. m_g.format_list({"n-s"}, lang);
		pltitle = "rzeczownik odczasownikowy";
		color = "#e2e4c0";
		inflects_for = { number = true; case = true; };
	}
}

local numbers = {
	{ key = "s"; en = "singular"; pl = "liczba pojedyncza"; },
	{ key = "p"; en = "plural"; pl = "liczba mnoga"; },
}

local genders = {
	{ key = "m"; glist = {"m-s"}; pl = "rodzaj męski"; number = "s"; },
	{ key = "f"; glist = {"f-s"}; pl = "rodzaj żeński"; number = "s"; },
	{ key = "n"; glist = {"n-s"}; pl = "rodzaj nijaki"; number = "s"; },
	{ key = "p"; glist = {"m-pr-p"}; pl = "rodzaj męskoosobowy"; number = "p"; },
	{ key = "o"; glist = {"np-p"}; pl = "rodzaj niemęskoosobowy"; number = "p"; },
}

local persons = {
	{ key = "1"; en = "1<sup>st</sup>"; pl = "pierwsza osoba (ja, my)"; },
	{ key = "2"; en = "2<sup>nd</sup>"; pl = "druga osoba (ty, wy)"; },
	{ key = "3"; en = "3<sup>rd</sup>"; pl = "trzecia osoba (on, ona, ono, pan, pani, oni, one)"; },
}

-- Same as above, but adds the impersonal form.
-- Normally I would append to the previous array, but Lua is so braindead that
-- it doesn't even have an array copy function.
local persons_impersonal = {
	{ key = "1"; en = "1<sup>st</sup>"; pl = "pierwsza osoba (ja, my)"; },
	{ key = "2"; en = "2<sup>nd</sup>"; pl = "druga osoba (ty, wy)"; },
	{ key = "3"; en = "3<sup>rd</sup>"; pl = "trzecia osoba (on, ona, ono, pan, pani, oni, one)"; },
	{ key = "impers"; en = "impersonal"; pl = "forma bezosobowa"; },
}

-- todo: export from Module:pl-noun instead of copying
local cases = {
	{ key = "nom"; en = "nominative, vocative"; pl = "mianownik (kto? co?), wołacz (o!)" },
	{ key = "gen"; en = "genitive"; pl = "dopełniacz (kogo? czego?)" },
	{ key = "dat"; en = "dative"; pl = "celownik (komu? czemu?)" },
	{ key = "acc"; en = "accusative"; pl = "biernik (kogo? co?)" },
	{ key = "ins"; en = "instrumental"; pl = "narzędnik (kim? czym?)" },
	{ key = "loc"; en = "locative"; pl = "miejscownik (o kim? o czym?)" },
	--{ key = "voc"; en = "vocative"; pl = "wołacz (o!)" },
}

-- Generate a table contains true for each space-separated word in str
local function make_lookup_table(str)
	local ret = {}
	for i in mw.ustring.gmatch(str, "%w+") do
		ret = 1
	end
	return ret
end

local function make_link(str)
	local x = [=[if not str then
		return "—"
	else
		local linked = {}
		for word in mw.ustring.gmatch("%a+", str) do
			table.insert(linked, m_links.full_link(word, nil, lang, nil, nil, nil, {}, false))
		end
		return table.concat(linked, " ")
	end]=]
	return str or "—"
end

local function make_row(rowparams, show, conjinfo)
	if show == 0 or (rowparams.subordinate and show == 0) then
		return ''
	end
	local l2rows = { "" }
	local tspan = 'colspan="2"'
	if rowparams.inflects_for.person then
		if rowparams.inflects_for.impersonal then
			l2rows = persons_impersonal
		else
			l2rows = persons
		end
		tspan = ('rowspan="%d"'):format(#l2rows)
	elseif rowparams.inflects_for.case then
		l2rows = cases
		tspan = ('rowspan="%d"'):format(#cases)
	end
	row = ('! %s title="%s" style="background:%s" | %s\n'):format(
		tspan, rowparams.pltitle, rowparams.color, rowparams.title)
	for _, l2row in ipairs(l2rows) do
		if l2row ~= "" and show == 1 then
			row = row .. ('! style="background:%s" title="%s" | %s\n'):format(
				rowparams.color, l2row.pl, l2row.en)
		end
		if l2row == "" or show == 1 then
			if l2row.key == "impers" then
				local key = rowparams.tense .. "impers"
				row = row .. ('| colspan="%d" | %s\n'):format(show.allcols, make_link(conjinfo))
			-- handling for rows that inflect for gender
			elseif rowparams.inflects_for.gender then
				for i, g in ipairs(genders) do
					if show == 1 then
						local key = rowparams.tense .. (l2row.key or l2row) .. g.key
						row = row .. ('| %s\n'):format(make_link(conjinfo))
					end
				end
			-- handling for rows that inflect only by number
			elseif rowparams.inflects_for.number then
				if show.scols > 0 then
					local key = rowparams.tense .. (l2row.key or l2row) .. "s"
					row = row .. ('| colspan="%d" | %s\n'):format(show.scols, make_link(conjinfo))
				end
				if show.pcols > 0 then
					local key = rowparams.tense .. (l2row.key or l2row) .. "p"
					row = row .. ('| colspan="%d" | %s\n'):format(show.pcols, make_link(conjinfo))
				end
			-- handling for rows that do not inflect at all (e.g. infinitive)
			else
				local key = rowparams.tense .. (l2row.key or l2row)
				row = row .. ('| colspan="%d" | %s\n'):format(show.allcols, make_link(conjinfo))
			end
			row = row .. '|-\n'
		end
	end
	return row
end

function export.make_table_markup(conjinfo, hide)
	local show = make_lookup_table("m f n p o 1 2 3 impers "
		.. "inf pres past fut cond "
		.. "imp aadj padj cadv aadv vn nom gen dat acc ins loc voc")

	for k, _ in pairs(hide) do
		show = 0
	end

	show.scols = show.m + show.f + show.n
	show.pcols = show.p + show.o
	show.allcols = show.scols + show.pcols

	if show.allcols == 0 then
		error("All colums hidden")
	end

	header = (
[=[<div class="NavFrame">
<div class="NavHead inflection-table-verb">Conjugation of %s</div>
<div class="NavContent">
{| class="inflection-table wikitable" style="width: 100%%; background: #F0F0F0; margin: 0 auto"
]=]):format(conjinfo.inf)

	local numbers_row = [=[! rowspan="2" style="background:#C0C0C0" | &nbsp;
! style="background:#C0C0C0" | &nbsp;
]=]
	if show.scols > 0 then
		numbers_row = numbers_row ..
			('! colspan="%d" title="%s" style="background:#C0C0C0" | singular\n')
			:format(show.scols, numbers.pl)
	end
	if show.pcols > 0 then
		numbers_row = numbers_row ..
			('! colspan="%d" title="%s" style="background:#C0C0C0" | plural\n')
			:format(show.pcols, numbers.pl)
	end
	numbers_row = numbers_row .. "|-\n"

	local genders_row = '! style="background:#C0C0C0" | person\n'
	for _, g in ipairs(genders) do
		if show then
			genders_row = genders_row ..
				('! title="%s" style="background:#C0C0C0" | %s\n')
				:format(g.pl, m_g.format_list(g.glist, lang))
		end
	end
	genders_row = genders_row .. "|-\n"

	rows = {}
	for _, rowparams in ipairs(tense_rows) do
		table.insert(rows, make_row(rowparams, show, conjinfo))
	end

	local footer = '|}</div></div>'

	local table_markup = header .. numbers_row .. genders_row
		.. table.concat(rows) .. footer
	return table_markup
end

-- Generic patterns
local patterns = {}
patterns = function(pargs)
	local conjinfo = {
		inf = pargs;
		pres1s = pargs;
		pres1p = pargs .. "my";
		pres2s = pargs .. "sz";
		pres2p = pargs .. "cie";
		pres3s = pargs;
		pres3p = pargs;
		presimpers = pargs .. " się";
		past1m = pargs .. "łem";
		past1f = pargs .. "łam";
		past1p = pargs .. "liśmy";
		past1o = pargs .. "łyśmy";
		past2m = pargs .. "łeś";
		past2f = pargs .. "łaś";
		past2p = pargs .. "liście";
		past2o = pargs .. "łyście";
		past3m = pargs .. "ł";
		past3f = pargs .. "ła";
		past3n = pargs .. "ło";
		past3p = pargs .. "li";
		past3o = pargs .. "ły";
		imp1p = pargs .. "my";
		imp2s = pargs;
		imp2p = pargs .. "cie";
		imp3s = "niech " .. pargs;
		imp3p = "niech " .. pargs;
		cadv = pargs .. "ąc";
		aadjm = pargs .. "ący";
		aadjf = pargs .. "ąca";
		aadjn = pargs .. "ące";
		aadjp = pargs .. "ący";
		aadjo = pargs .. "ące";
	}

	if pargs.pp then
		local decl = m_adj.autoinflect(pargs.pp)
		local t = {}
		t.nomm = decl; t.nomf = decl; t.nomn = decl; t.nomp = decl; t.nomo = decl;
		t.genm = decl; t.genf = decl; t.genn = decl; t.genp = decl; t.geno = decl;
		t.datm = decl; t.datf = decl; t.datn = decl; t.datp = decl; t.dato = decl;
		                  t.accf = decl; t.accn = decl; t.accp = decl; t.acco = decl;
		t.insm = decl; t.insf = decl; t.insn = decl; t.insp = decl; t.inso = decl;
		t.locm = decl; t.locf = decl; t.locn = decl; t.locp = decl; t.loco = decl;
		t.accm = decl .. "/" .. decl;
		for k, v in pairs(t) do
			conjinfo = v
		end
	end

	local vn = pargs.vn or pargs .. "nie"
	local vndecl = m_noun.autoinflect("n", {}, vn)
	for i, case in ipairs(cases) do
		local key = case.key .. "s"
		conjinfo = vndecl
	end
	
	if pargs.ip then
		pastimpers = pargs.ip
	end

	-- future tense and conditional
	local fut_byc = {
		 = { s = "będę"; p = "będziemy"; };
		 = { s = "będziesz"; p = "będziecie"; };
		 = { s = "będzie"; p = "będą"; };
	}
	local cond_suffix = {
		 = { s = "bym"; p = "byśmy"; };
		 = { s = "byś"; p = "byście"; };
		 = { s = "by"; p = "by"; };
	}
	for _, pers in ipairs(persons) do
		for _, gender in ipairs(genders) do
			if gender.key ~= "n" or pers.key == "3" then
				local fut_key = "fut" .. pers.key .. gender.key
				local cond_key = "cond" .. pers.key .. gender.key
				local past_key = "past3" .. gender.key
				conjinfo = fut_byc .. " " .. conjinfo
				conjinfo = conjinfo .. cond_suffix
			end
		end
	end
	return conjinfo
end

patterns = function(pargs)
	local conjinfo = {
		inf = pargs;
		sfut1s = pargs;
		sfut1p = pargs .. "my";
		sfut2s = pargs .. "sz";
		sfut2p = pargs .. "cie";
		sfut3s = pargs;
		sfut3p = pargs;
		sfutimpers = pargs .. " się";
		past1m = pargs .. "łem";
		past1f = pargs .. "łam";
		past1p = pargs .. "liśmy";
		past1o = pargs .. "łyśmy";
		past2m = pargs .. "łeś";
		past2f = pargs .. "łaś";
		past2p = pargs .. "liście";
		past2o = pargs .. "łyście";
		past3m = pargs .. "ł";
		past3f = pargs .. "ła";
		past3n = pargs .. "ło";
		past3p = pargs .. "li";
		past3o = pargs .. "ły";
		imp1p = pargs .. "my";
		imp2s = pargs;
		imp2p = pargs .. "cie";
		imp3s = "niech " .. pargs;
		imp3p = "niech " .. pargs;
	}

	if pargs.pp then
		local decl = m_adj.autoinflect(pargs.pp)
		local t = {}
		t.nomm = decl; t.nomf = decl; t.nomn = decl; t.nomp = decl; t.nomo = decl;
		t.genm = decl; t.genf = decl; t.genn = decl; t.genp = decl; t.geno = decl;
		t.datm = decl; t.datf = decl; t.datn = decl; t.datp = decl; t.dato = decl;
		                  t.accf = decl; t.accn = decl; t.accp = decl; t.acco = decl;
		t.insm = decl; t.insf = decl; t.insn = decl; t.insp = decl; t.inso = decl;
		t.locm = decl; t.locf = decl; t.locn = decl; t.locp = decl; t.loco = decl;
		t.accm = decl .. "/" .. decl;
		for k, v in pairs(t) do
			conjinfo = v
		end
	end

	local vn = pargs.vn or pargs .. "nie"
	local vndecl = m_noun.autoinflect("n", {}, vn)
	for i, case in ipairs(cases) do
		local key = case.key .. "s"
		conjinfo = vndecl
	end

	-- conditional
	local cond_suffix = {
		 = { s = "bym"; p = "byśmy"; };
		 = { s = "byś"; p = "byście"; };
		 = { s = "by"; p = "by"; };
	}
	for _, pers in ipairs(persons) do
		for _, gender in ipairs(genders) do
			if gender.key ~= "n" or pers.key == "3" then
				local cond_key = "cond" .. pers.key .. gender.key
				local past_key = "past3" .. gender.key
				conjinfo = conjinfo .. cond_suffix
			end
		end
	end
	return conjinfo
end

-- Regular patterns
patterns = function(pargs)
	if not pargs.a then
		error("aspect not specified")
	end
	local gargs = {
		pargs .. "ć",
		pargs .. "m",
		pargs,
		pargs .. "ją",
		pargs,
		pargs,
		pargs,
		pargs .. "j"
	}
	gargs.vn = pargs .. "nie"
	gargs.pp = pargs .. "ny"
	gargs.ap = pargs .. "wszy"

	local conjinfo = patterns(gargs)
	conjinfo.pastimpers = pargs .. "no"
	conjinfo.aadv = pargs .. "wszy"
	return conjinfo
end

patterns = function(pargs)
	if not pargs.a then
		error("aspect not specified")
	end
	local gargs = {
		pargs .. "eć",
		pargs .. "em",
		pargs .. "e",
		pargs .. "eją",
		pargs .. "a",
		pargs .. "a",
		pargs .. "e",
		pargs .. "ej"
	}
	gargs.vn = pargs .. "enie"
	gargs.pp = pargs .. "any"
	gargs.ap = pargs .. "awszy"

	local conjinfo = patterns(gargs)
	conjinfo.pastimpers = pargs .. "ano"
	conjinfo.aadv = pargs .. "awszy"
	return conjinfo
end

patterns = function(pargs)
	if not pargs.a then
		error("aspect not specified")
	end
	local gargs = {
		pargs .. "eć",
		pargs .. "eję",
		pargs .. "eje",
		pargs .. "eją",
		pargs .. "a",
		pargs .. "a",
		pargs .. "e",
		pargs .. "ej"
	}
	gargs.vn = pargs .. "enie"
	gargs.pp = pargs .. "ały"
	gargs.ap = pargs .. "awszy"

	local conjinfo = patterns(gargs)
	conjinfo.pastimpers = pargs .. "ano"
	conjinfo.aadv = pargs .. "awszy"
	return conjinfo
end

patterns = function(pargs)
	if not pargs.a then
		error("aspect not specified")
	end
	local gargs = {
		pargs .. "ować",
		pargs .. "uję",
		pargs .. "uje",
		pargs .. "ują",
		pargs .. "owa",
		pargs .. "owa",
		pargs .. "owa",
		pargs .. "uj"
	}
	gargs.vn = pargs .. "owanie"
	gargs.pp = pargs .. "owany"
	gargs.ap = pargs .. "owawszy"

	local conjinfo = patterns(gargs)
	conjinfo.pastimpers = pargs .. "owano"
	conjinfo.aadv = pargs .. "owawszy"
	return conjinfo
end

patterns = function(pargs)
	if not pargs.a then
		error("aspect not specified")
	end
	
	local pastfinalII = {}
	
	if pargs == "ną" then
		pastfinalII = "nę"
	elseif pargs == "" then
		pastfinalII = nil
	end	
	
	local gargs = {
		pargs .. "nąć",
		pargs .. "nę",
		pargs .. "nie",
		pargs .. "ną",
		pargs .. pargs,
		pargs .. pastfinalII,
		pargs .. pastfinalII,
		pargs .. pargs
	}
	gargs.vn = pargs .. "nięcie"
	gargs.pp = pargs .. "nięty"
	gargs.ap = pargs .. "ąwszy"

	local conjinfo = patterns(gargs)
	conjinfo.pastimpers = pargs .. "nięto"
	conjinfo.aadv = pargs .. "ąwszy"
	return conjinfo
end

patterns = function(pargs)
	if not pargs.a then
		error("aspect not specified")
	end
	
	local stemfinal = {}
	local impfinal = {}
	
	if pargs == "i" then
		if pargs == "" then
			stemfinal = "j"
			impfinal = "j"
		elseif pargs == "b" or pargs == "p" then
			stemfinal = pargs .. "i"
			impfinal = pargs
		elseif pargs == "c" then
			stemfinal = pargs
			impfinal = "ć"
		elseif pargs == "dz" then
			stemfinal = pargs
			impfinal = "dź"
		elseif pargs == "n" then
			stemfinal = pargs
			impfinal = "ń"
		elseif pargs == "s" then
			stemfinal = "sz"
			impfinal = "ś"
		elseif pargs == "śc" then
			stemfinal = "szcz"
			impfinal = "ść"
		elseif pargs == "z" then
			stemfinal = "ż"
			impfinal = "ź"
		elseif pargs == "źdz" then
			stemfinal = "żdż"
			impfinal = "źdź"
		else
			stemfinal = pargs
			impfinal = stemfinal
		end
	else
		stemfinal = pargs
		impfinal = stemfinal
	end
	
	local gargs = {
		pargs .. pargs .. pargs .. "ć",
		pargs .. stemfinal .. "ę",
		pargs .. pargs .. pargs,
		pargs .. stemfinal .. "ą",
		pargs .. pargs .. pargs,
		pargs .. pargs .. pargs,
		pargs .. pargs .. pargs,
		pargs .. impfinal
	}
	gargs.vn = pargs .. stemfinal .. "enie"
	gargs.pp = pargs .. stemfinal .. "ony"
	gargs.ap = pargs .. pargs .. pargs .. "wszy"

	local conjinfo = patterns(gargs)
	conjinfo.pastimpers = pargs .. stemfinal .. "ono"
	conjinfo.aadv = pargs .. pargs .. pargs .. "wszy"
	return conjinfo
end

patterns = function(pargs)
	if not pargs.a then
		error("aspect not specified")
	end
	
	local stemfinal = {}
	local impfinal = {}
	local finalvow = {}
	
	if pargs == "i" then
		if pargs == "b" or pargs == "p" then
			stemfinal = pargs .. "i"
			impfinal = pargs
		elseif pargs == "c" then
			stemfinal = pargs
			impfinal = "ć"
		elseif pargs == "dz" then
			stemfinal = pargs
			impfinal = "dź"
		elseif pargs == "n" then
			stemfinal = pargs
			impfinal = "ń"
		elseif pargs == "s" then
			stemfinal = "sz"
			impfinal = "ś"
		elseif pargs == "śc" then
			stemfinal = "szcz"
			impfinal = "ść"
		elseif pargs == "z" then
			stemfinal = "ż"
			impfinal = "ź"
		elseif pargs == "źdz" then
			stemfinal = "żdż"
			impfinal = "źdź"
		else
			stemfinal = pargs
			impfinal = stemfinal
		end
	else
		stemfinal = pargs
		impfinal = stemfinal
	end
	
	if pargs == "y" then
		finalvow = nil
	else
		finalvow = pargs
	end
	
	local gargs = {
		pargs .. pargs .. finalvow .. "eć",
		pargs .. stemfinal .. "ę",
		pargs .. pargs .. pargs,
		pargs .. stemfinal .. "ą",
		pargs .. pargs .. finalvow .. "a",
		pargs .. pargs .. finalvow .. "a",
		pargs .. pargs .. finalvow .. "e",
		pargs .. impfinal
	}
	gargs.vn = pargs .. stemfinal .. "enie"
	gargs.pp = pargs .. pargs .. finalvow .. "any"
	gargs.ap = pargs .. pargs .. finalvow .. "awszy"

	local conjinfo = patterns(gargs)
	conjinfo.pastimpers = pargs .. pargs .. finalvow .. "ano"
	conjinfo.aadv = pargs .. pargs .. finalvow .. "awszy"
	return conjinfo
end

patterns = function(pargs)
	if not pargs.a then
		error("aspect not specified")
	end
	local gargs = {
		pargs .. pargs .. "wać",
		pargs .. "uję",
		pargs .. "uje",
		pargs .. "ują",
		pargs .. pargs .. "wa",
		pargs .. pargs .. "wa",
		pargs .. pargs .. "wa",
		pargs .. "uj"
	}
	gargs.vn = pargs .. pargs .. "wanie"
	gargs.pp = pargs .. pargs .. "wany"
	gargs.ap = pargs .. pargs .. "wawszy"

	local conjinfo = patterns(gargs)
	conjinfo.pastimpers = pargs .. pargs .. "wano"
	conjinfo.aadv = pargs .. pargs .. "wawszy"
	return conjinfo
end

patterns = function(pargs)
	if not pargs.a then
		error("aspect not specified")
	end
	
	local impfinal = {}
	
	if pargs then
		impfinal = pargs
	else
		impfinal = pargs
	end
	
	local gargs = {
		pargs .. pargs .. "ać",
		pargs .. pargs .. "ę",
		pargs .. pargs .. "e",
		pargs .. pargs .. "ą",
		pargs .. pargs .. "a",
		pargs .. pargs .. "a",
		pargs .. pargs .. "a",
		pargs .. impfinal
	}
	gargs.vn = pargs .. pargs .. "anie"
	gargs.pp = pargs .. pargs .. "any"
	gargs.ap = pargs .. pargs .. "awszy"

	local conjinfo = patterns(gargs)
	conjinfo.pastimpers = pargs .. pargs .. "ano"
	conjinfo.aadv = pargs .. pargs .. "awszy"
	return conjinfo
end

patterns = function(pargs)
	if not pargs.a then
		error("aspect not specified")
	end
	
	local stemvowII = {}
	
	if pargs == "a" then
		stemvowII = "e"
	else
		stemvowII = pargs 
	end
	
	local gargs = {
		pargs .. pargs .. "ć",
		pargs .. stemvowII .. "ję",
		pargs .. stemvowII .. "je",
		pargs .. stemvowII .. "ją",
		pargs .. pargs,
		pargs .. pargs,
		pargs .. pargs,
		pargs .. stemvowII .. "j"
	}
	
	if pargs == "a" then
		gargs.vn = pargs .. "anie"
		gargs.pp = pargs .. "any"
	else
		gargs.vn = pargs .. pargs .. "cie"
		gargs.pp = pargs .. pargs .. "ty"
	end
	
	gargs.ap = pargs .. pargs .. "wszy"

	local conjinfo = patterns(gargs)
	
	if pargs == "a" then
		conjinfo.pastimpers = pargs .. "ano"
	else
		conjinfo.pastimpers = pargs .. pargs .. "to"
	end
	
	conjinfo.aadv = pargs .. pargs .. "wszy"
	return conjinfo
end

-- ‘iść’ verbs
patterns = function(pargs)
	if pargs == "i" then
		pargs.a = "impf"
	else
		pargs.a = "pf"
	end
	
	if pargs == "" then
		pargs = nil
	end
	
	local gargs = {
		pargs .. "ść",
		pargs .. "dę",
		pargs .. "dzie",
		pargs .. "dą",
		pargs .. "szed",
		pargs .. "sz",
		pargs .. "sz",
		pargs .. "dź"
	}
	if pargs == "i" then
		gargs.vn = nil
	else
		gargs.vn = pargs .. "ście"
	end
	gargs.pp = nil
	gargs.ap = pargs .. "szedłszy"

	local conjinfo = patterns(gargs)
	conjinfo.pastimpers = nil
	conjinfo.aadv = pargs .. "szedłszy"
	return conjinfo
end

function export.template_conj(frame)
	local pargs = frame:getParent().args
	if not pargs then
		error("undefined aspect")
	end

	local aspect = "impf"
	if pargs.a == "p" or pargs.a == "pf" then
		aspect = "pf"
	end
	local conjinfo = {}
	local hide = {}
	local pattern = pargs.pattern or "generic"
	if aspect == "impf" then
		hide.aadv = 1
		hide.sfut = 1
	else
		hide.pres = 1
		hide.fut = 1
		hide.aadj = 1
		hide.cadv = 1
	end
	conjinfo = patterns(pargs)
	return export.make_table_markup(conjinfo, hide)
end

function export.test_table()
	local conjinfo = {
		inf = "robić";
		pres1s = "robię";
		pres1p = "robimy";
		pres2s = "robisz";
		pres2p = "robicie";
		pres3s = "robi";
		pres3p = "robią";
		presimpers = "robi się";
		past1m = "robiłem";
		past1f = "robiłam";
		past1p = "robiliśmy";
		past1o = "robiłyśmy";
		past2m = "robiłeś";
		past2f = "robiłaś";
		past2p = "robiliście";
		past2o = "robiłyście";
		past3m = "robił";
		past3f = "robiła";
		past3n = "robiło";
		past3p = "robili";
		past3o = "robiły";
		pastimpers = "robiono";
		fut1m = "będę robił";
		fut1f = "będę robiła";
		fut1p = "będą robili";
		fut1o = "będą robiły";
		fut2m = "będziesz robił";
		fut2f = "będziesz robiła";
		fut2p = "będziecie robili";
		fut2o = "będziecie robiły";
		fut3m = "będzie robił";
		fut3f = "będzie robiła";
		fut3n = "będzie robiło";
		fut3p = "będą robili";
		fut3o = "będą robiły";
		futimpers = "będzie robione";
		cond1m = "robiłbym";
		cond1f = "robiłabym";
		cond1p = "robilibyśmy";
		cond1o = "robiłybyśmy";
		cond2m = "robiłbyś";
		cond2f = "robiłabyś";
		cond2p = "robilibyście";
		cond2o = "robiłybyście";
		cond3m = "robiłby";
		cond3f = "robiłaby";
		cond3n = "robiłoby";
		cond3p = "robiliby";
		cond3o = "robiłyby";
		condimpers = "robiono by";
		--imp1s = "niech robię";
		imp1p = "róbmy";
		imp2s = "rób";
		imp2p = "róbcie";
		imp3s = "niech robi";
		imp3p = "niech robią";
		aadjm = "robiący";
		aadjf = "robiąca";
		aadjn = "robiące";
		aadjp = "robiący";
		aadjo = "robiące";
		padjm = "robiony";
		padjf = "robiona";
		padjn = "robione";
		padjp = "robieni";
		padjo = "robione";
		cadv = "robiąc";
		aadv = "robiwszy";
		vn = "robienie";
	}
	
	return export.make_table_markup(conjinfo, {pres=1})
end

return export