Module:User:Oyunqi/ug-headword2

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


local export = {}
local m_com = require("Module:User:Oyunqi/ug-common2")

local pos_functions = {}

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

local PAGENAME = mw.title.getCurrentTitle().subpageText

function export.make_plural_noun(singular, vv, change)
	local base, v, c = m_com.getLast(singular)
	if change == "yes" then
		if vv ~= nil and vv ~= "" then
			v = vv
		else
			if c == "" and (v == "ا" or v == "ە") then
				v = "ى"
			end
		end
	end
	local term = base .. v .. c
	local tongue = m_com.checkTongue(singular)
	if tongue == "front" then
		return term .. "لەر"
	elseif tongue == "back" then
		return term .. "لار"
	end
	return nil
end

function export.noun(frame)
	local params = {
		 = {}, -- Vowel, if there is a change
		 = {}, --plural override
		 = {},
		 = {}, -- yes or (else:no)
	}
	
	local args = require("Module:parameters").process(frame:getParent().args, params)

	local data = {
		lang = lang,
		pos_category = "nouns",
		categories = {},
		heads = {args},
		inflections = {enable_auto_translit = true}
	}
	local pl = args or nil
	local change = args or "yes"
	if pl == "-" then
		table.insert(data.inflections, {label = "]"})
		table.insert(data.categories, "Uyghur uncountable nouns")
	else
		if not pl then
			local plural = export.make_plural_noun(PAGENAME, args, change)
			if plural then
				pl = plural
			else
				table.insert(data.categories, "Uyghur nouns with unpredictable plurals")
			end
		end
		if pl then
			local infl = {label = 'plural', {term=pl}}
			table.insert(data.inflections, infl)
		-- else
		--	table.insert(data.categories, "Uyghur nouns needing plural inflection")
		end
	end
	
	if pl and not mw.title.new(pl).exists then
		table.insert(data.categories, "Missing Uyghur noun forms")
	end

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

return export