Module:ky-headword

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


local export = {}
local pos_functions = {}

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

local force_cat = false

local insert = table.insert

local function otherscript(inflections, args)
	local title = mw.title.getCurrentTitle()
	local sc = lang:findBestScript(title.subpageText)

	local other_sc

	if sc:getCode() == "Cyrl" then
		local title = mw.title.getCurrentTitle()
		local sc = lang:findBestScript(title.subpageText)

		if sc:getCode() == "Cyrl" then
			local inflection = { label = "Arabic spelling" }

			if not tr then
				tr = require("Module:ky-Cyrl-Arab-translit").tr(
					require("Module:links").remove_links(
						mw.title.getCurrentTitle().text), "ky", sc:getCode())
			end

			insert(inflection, { term = tr })
			insert(inflections, inflection)
		end
	end
end

-- 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

	otherscript(data.inflections, args)

	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