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


return {generate = function (params, entry)
	
	-- an attempt to add dialect labels, [[WT:Beer parlour/2023/September#Labels_in_inflections_of_labeled_terms]]
	local dialect = mw.ustring.match(params.form, "%|[LMV|]+$")
	local form = dialect and mw.ustring.gsub(params.form, dialect, "") or params.form
	
	-- special handling for female equivalents
	if params.pos == "noun" and form == "f" then
		entry.head = "{{fax-noun|f}}"
	elseif params.pos == "past participle" then
		entry.pos_head = "Participle"
		if form == "m|sg" then entry.head = "{{fax-past participle}}" end
		entry.def = "{{infl of|fax|" .. params.origin .. "||" .. form .. "}}"
	end
	
	if dialect then entry.def = "{{lb|fax" .. dialect .. "}} " .. entry.def end
end}