Module:fi-headword

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

A module used to power some Finnish headword templates, currently only {{fi-adj}}.


local export = {}
local lang = require("Module:languages").getByCode("fi")
local m_utilities = require("Module:utilities")
local unpack = unpack or table.unpack -- Lua 5.2 compatibility

export.adj = function(frame)
	local title = mw.title.getCurrentTitle().text
	local args = frame:getParent().args
	local data = {lang = lang, pos_category = "adjectives"}
	local categories = {}
	
	if args then
		data.heads = {args}
	end
	
	if args and not args then
		args = "-"
	end
		
	if not args then
		table.insert(categories, "fi-adj with no 1 or 2")
	elseif args == "-" then
		data.inflections = {{ label = "]" }}
		table.insert(categories, "Finnish uncomparable adjectives")
	elseif not args then
		table.insert(categories, "fi-adj with no 1 or 2")
	else
		local stem = args
		local comp = {{term = stem .. args, accel = {form = "comparative"}}}
		local sup = {}
		
		for i = 3, 10 do
			if not args then break end
			table.insert(sup, {term = stem .. args, accel = {form = "superlative"}})
		end
		
		if args then
			table.insert(comp, {term = args, accel = {form = "comparative"}})
		elseif args then
			table.insert(comp, {term = args, accel = {form = "comparative"}})
		end
		
		if args then
			table.insert(comp, {term = args, accel = {form = "comparative"}})
		elseif args then
			table.insert(comp, {term = args, accel = {form = "comparative"}})
		end
		
		if args then
			table.insert(sup, {term = args, accel = {form = "superlative"}})
		elseif args then
			table.insert(sup, {term = args, accel = {form = "superlative"}})
		end
		
		data.inflections = {{label = "comparative", unpack(comp)}, {label = "superlative", unpack(sup)}}
	end
	
	if args then
		table.insert(data.inflections, {label = "]"})
		table.insert(data.inflections, {label = "only used ]"})
		table.insert(categories, "Finnish indeclinable adjectives")
	end
	
	data.categories = categories
	return require("Module:headword").full_headword(data)
end

return export