Jump to content

Module:accel/pl

From Wiktionary, the free dictionary

This module contains new entry creation rules for Polish; see WT:ACCEL for an overview, and Module:accel for information on creating new rules.


return {
	generate = function(params, entry)
		entry.pronunc = "{{pl-pr}}";
		if (params.form == "comparative" or (params.form == "superlative")) and (params.pos == "adjective") then
			entry.declension = "{{pl-adecl}}";
		elseif (params.form == "abstract noun" or (params.form == "verbal noun")) and (params.pos == "verb") then
			entry.etymology = "From {{af|pl|" .. params.origin .. "|-}}."
			entry.pos_header = "Noun";
			entry.head = "{{pl-noun|n}}";
			entry.def = entry.make_def((params.form .. " of"));
			entry.declension = "{{pl-decl-noun-n|tantum=s}}";
		elseif params.form == "anterior adverbial participle" and (params.pos == "verb") then
			entry.pos_header = "Participle";
			entry.head = "{{pl-participle|aadv}}";
			entry.def = entry.make_def("inflection of", "||anterior|adverbial|part");
		elseif params.form == "contemporary adverbial participle" and (params.pos == "verb") then
			entry.pos_header = "Participle";
			entry.head = "{{pl-participle|cadv}}";
			entry.def = entry.make_def("inflection of", "||contemporary|adverbial|part");
		elseif params.form:find("passive adjectival participle$") and (params.pos == "verb") then
			entry.pos_header = "Participle";
			entry.head = "{{pl-participle|pass}}";
			local _, _, form = params.form:find("(.-)|passive adjectival participle$");
			if form == nil or form == "m|s" or form == "s|m" then
				entry.def = entry.make_def("inflection of", "||m|s|pasv|adjectival|part");
				entry.declension = "{{pl-adecl}}";
			else
				entry.def = entry.make_def("inflection of", "||" .. form);
			end
		elseif params.form:find("active adjectival participle$") and (params.pos == "verb") then
			entry.pos_header = "Participle";
			entry.head = "{{pl-participle|act}}";
			local _, _, form = params.form:find("(.-)|active adjectival participle$");
			if form == nil or form == "m|s" or form == "s|m" then
				entry.def = entry.make_def("inflection of", "||actv|adj|part");
				entry.declension = "{{pl-adecl}}";
			else
				entry.def = entry.make_def("inflection of", "||" .. form);
			end
		end
	end
};