Module:kk-headword

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

This module needs documentation.
Please document this module by describing its purpose and usage on the documentation page.

local export = {}
local pos_functions = {}

local lang = require("Module:languages").getByCode("kk")

local force_cat = false

local insert = table.insert

-- The main entry point.
function export.show(frame)
	local poscat = frame.args or
		error("Part of speech has not been specified. Please pass parameter 1 to the module invocation.")

	local parargs = frame:getParent().args

	local params = {
		 = { list = true, disallow_holes = true },
		 = { list = true, allow_holes = true },
		 = {},
		 = { type = "boolean" },
		 = { type = "boolean" },
		 = {}, -- for testing
	}

	if pos_functions then
		for key, val in pairs(pos_functions.params) do
			params = val
		end
	end

	local args = require("Module:parameters").process(parargs, params)

	local pagename = args.pagename or mw.loadData("Module:headword/data").pagename

	local data = {
		lang = lang,
		pos_category = poscat,
		categories = {},
		heads = {},
		genders = {},
		inflections = { enable_auto_translit = false },
		pagename = pagename,
		id = args.id,
		sort_key = args.sort,
		force_cat_output = force_cat,
	}

	local heads = args.head
	for i = 1, #heads do
		insert(data.heads, {
			term = heads,
			tr = args.tr,
		})
	end

	if pos_functions then
		pos_functions.func(args, data)
	end

	if args.json then
		return require("Module:JSON").toJSON(data)
	end

	return require("Module:headword").full_headword(data)
end

return export