本模块包含德語的新條目建立規則;有關概述,請參見en:WT:ACCEL,有關創建新規則的資訊,請參見en:Module:accel


return {generate = function (params, entry)
	local template = {
		["alternative"] = "alternative form of",
	}
	
	if params.form == "zu" then
		entry.def = "{{de-zu-infinitive of|" .. params.origin .. "}}"
	elseif template[params.form] then
		entry.def = entry.make_def(template[params.form])
	end
	
	if params.form == "diminutive" then
		entry.head = "{{de-noun|n}}"
		entry.declension = "{{de-ndecl|n}}"
	end
	
	if params.form == "feminine" then
		entry.head = "{{de-noun|f}}"
		entry.def = "{{female equivalent of|de|" .. params.origin .. "}}"
		entry.declension = "{{de-ndecl|f}}"
	end
	
	if params.form == "neuter" then
		entry.pos = "noun"
		entry.head = "{{de-noun|+}}"
		local adj = mw.getContentLanguage():lcfirst(params.target):gsub("es$", "")
		entry.def = "{{nominalization of|de|" .. adj .. "}}"
		entry.declension = "{{de-ndecl|+}}"
	end
	
	local ending = params.form:match("^adj%-form%-(.*)$")
	if ending then
		local auto_ending = require("Module:de-inflections").determine_adj_ending(params.origin, params.target)
		if auto_ending and auto_ending == ending then
			entry.def = "{{de-adj form of|" .. params.origin .. "}}"
		else
			entry.def = "{{de-adj form of|" .. params.origin .. "|" .. ending .. "}}"
		end
	end
end}