Module:User:Santi2222/ay-noun

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


local lang = require("Module:languages").getByCode("ay")
local rfind = mw.ustring.find
local rsplit = mw.text.split
local export = {}

local function rsub(term, foo, bar)
	local retval = mw.ustring.gsub(term, foo, bar)
	return retval
end

-- apply rsub() repeatedly until no change
local function rsub_repeatedly(term, foo, bar)
	while true do
		local new_term = rsub(term, foo, bar)
		if new_term == term then
			return term
		end
		term = new_term
	end
end

local function postprocess(args, data)
	data.lemma = data.forms
	
	-- Check if the lemma form matches the page name
	if (lang:makeEntryName(data.lemma)) ~= mw.title.getCurrentTitle().text then
		table.insert(data.categories, lang:getCanonicalName() .. " entries with inflection not matching pagename")
	end
end

-- Table-generating functions
local function make_table(data)
	local function repl(param)
		local no_store = false
		
		if param == "info" then
			return mw.getContentLanguage():ucfirst(data.info or "")
		elseif string.sub(param, 1, 1) == "!" then
			no_store = true
			param = string.sub(param, 2)
		elseif string.sub(param, 1, 1) == "#" then
			param = string.sub(param, 2)
		elseif param == "janiti" or param == "janiwa" or param == "janiya" then
			return require("Module:links").full_link({lang = lang, term = param})
		end
		
		local forms = data.forms
		
		if not forms then
			return "—"
		end
		
		local ret = {}
		
		for key, subform in ipairs(forms) do
			table.insert(ret, require("Module:links").full_link({lang = lang, term = subform}))
		end
		
		return table.concat(ret, "<br/>")
	end
	
	local wikicode = mw.getCurrentFrame():expandTemplate{ 
		title = 'inflection-table-top', 
		args = {
			title = '{{{info}}}',
			tall = 'yes',
			palette = 'green'
		}
	}

	wikicode = wikicode .. [=[
! colspan = "11" class = "outer"|Direct knowledge
|-
! colspan="2" |
! <abbr title="first-person subject second-person object">1→2</abbr>
! <abbr title="first-person subject third-person object">1→3</abbr>
! <abbr title="second-person subject first-person object">2→1</abbr>
! <abbr title="second-person subject third-person object">2→3</abbr>
! <abbr title="third-person subject first-person object">3→1</abbr>
! <abbr title="third-person subject second-person object">3→2</abbr>
! <abbr title="third-person subject third-person object">3→3</abbr>
! <abbr title="third-person subject fourth-person object">3→4</abbr>
! <abbr title="fourth-person subject third-person object">4→3</abbr>
|-
! rowspan="4"|aorist
! class = "secondary" | positive
| {{{aorpos12}}}
| {{{aorpos13}}}
| {{{aorpos21}}}
| {{{aorpos23}}}
| {{{aorpos31}}}
| {{{aorpos32}}}
| {{{aorpos33}}}
| {{{aorpos34}}}
| {{{aorpos43}}}
|-
! class = "secondary" | negative<sup>1</sup>
| {{{aorneg12}}}
| {{{aorneg13}}}
| {{{aorneg21}}}
| {{{aorneg23}}}
| {{{aorneg31}}}
| {{{aorneg32}}}
| {{{aorneg33}}}
| {{{aorneg34}}}
| {{{aorneg43}}}
|-
! class = "secondary" | positive interrogative
| {{{aoripo12}}}
| {{{aoripo13}}}
| {{{aoripo21}}}
| {{{aoripo23}}}
| {{{aoripo31}}}
| {{{aoripo32}}}
| {{{aoripo33}}}
| {{{aoripo34}}}
| {{{aoripo43}}}
|-
! class = "secondary" | negative interrogative<sup>2</sup>
| {{{aorine12}}}
| {{{aorine13}}}
| {{{aorine21}}}
| {{{aorine23}}}
| {{{aorine31}}}
| {{{aorine32}}}
| {{{aorine33}}}
| {{{aorine34}}}
| {{{aorine43}}}
|-
! rowspan="4"|future
! class = "secondary" | positive
| {{{futpos12}}}
| {{{futpos13}}}
| {{{futpos21}}}
| {{{futpos23}}}
| {{{futpos31}}}
| {{{futpos32}}}
| {{{futpos33}}}
| {{{futpos34}}}
| {{{futpos43}}}
|-
! class = "secondary" | negative<sup>1</sup>
| {{{futneg12}}}
| {{{futneg13}}}
| {{{futneg21}}}
| {{{futneg23}}}
| {{{futneg31}}}
| {{{futneg32}}}
| {{{futneg33}}}
| {{{futneg34}}}
| {{{futneg43}}}
|-
! class = "secondary" | positive interrogative
| {{{futipo12}}}
| {{{futipo13}}}
| {{{futipo21}}}
| {{{futipo23}}}
| {{{futipo31}}}
| {{{futipo32}}}
| {{{futipo33}}}
| {{{futipo34}}}
| {{{futipo43}}}
|-
! class = "secondary" | negative interrogative<sup>2</sup>
| {{{futine12}}}
| {{{futine13}}}
| {{{futine21}}}
| {{{futine23}}}
| {{{futine31}}}
| {{{futine32}}}
| {{{futine33}}}
| {{{futine34}}}
| {{{futine43}}}
|-
! rowspan="4"|proximal remote
! class = "secondary" | positive
| {{{prempos12}}}
| {{{prempos13}}}
| {{{prempos21}}}
| {{{prempos23}}}
| {{{prempos31}}}
| {{{prempos32}}}
| {{{prempos33}}}
| {{{prempos34}}}
| {{{prempos43}}}
|-
! class = "secondary" | negative<sup>1</sup>
| {{{premneg12}}}
| {{{premneg13}}}
| {{{premneg21}}}
| {{{premneg23}}}
| {{{premneg31}}}
| {{{premneg32}}}
| {{{premneg33}}}
| {{{premneg34}}}
| {{{premneg43}}}
|-
! class = "secondary" | positive interrogative
| {{{premipo12}}}
| {{{premipo13}}}
| {{{premipo21}}}
| {{{premipo23}}}
| {{{premipo31}}}
| {{{premipo32}}}
| {{{premipo33}}}
| {{{premipo34}}}
| {{{premipo43}}}
|-
! class = "secondary" | negative interrogative<sup>2</sup>
| {{{premine12}}}
| {{{premine13}}}
| {{{premine21}}}
| {{{premine23}}}
| {{{premine31}}}
| {{{premine32}}}
| {{{premine33}}}
| {{{premine34}}}
| {{{premine43}}}
|-
! colspan="11" class="separator" |
|-
! colspan = "11" class = "outer"|Indirect knowledge
|-
! colspan="2" |
! <abbr title="first-person subject second-person object">1→2</abbr>
! <abbr title="first-person subject third-person object">1→3</abbr>
! <abbr title="second-person subject first-person object">2→1</abbr>
! <abbr title="second-person subject third-person object">2→3</abbr>
! <abbr title="third-person subject first-person object">3→1</abbr>
! <abbr title="third-person subject second-person object">3→2</abbr>
! <abbr title="third-person subject third-person object">3→3</abbr>
! <abbr title="third-person subject fourth-person object">3→4</abbr>
! <abbr title="fourth-person subject third-person object">4→3</abbr>
|-
! rowspan="4"|distal remote
! class = "secondary" | positive
| {{{drempos12}}}
| {{{drempos13}}}
| {{{drempos21}}}
| {{{drempos23}}}
| {{{drempos31}}}
| {{{drempos32}}}
| {{{drempos33}}}
| {{{drempos34}}}
| {{{drempos43}}}
|-
! class = "secondary" | negative<sup>1</sup>
| {{{dremneg12}}}
| {{{dremneg13}}}
| {{{dremneg21}}}
| {{{dremneg23}}}
| {{{dremneg31}}}
| {{{dremneg32}}}
| {{{dremneg33}}}
| {{{dremneg34}}}
| {{{dremneg43}}}
|-
! class = "secondary" | positive interrogative
| {{{dremipo12}}}
| {{{dremipo13}}}
| {{{dremipo21}}}
| {{{dremipo23}}}
| {{{dremipo31}}}
| {{{dremipo32}}}
| {{{dremipo33}}}
| {{{dremipo34}}}
| {{{dremipo43}}}
|-
! class = "secondary" | negative interrogative<sup>2</sup>
| {{{dremine12}}}
| {{{dremine13}}}
| {{{dremine21}}}
| {{{dremine23}}}
| {{{dremine31}}}
| {{{dremine32}}}
| {{{dremine33}}}
| {{{dremine34}}}
| {{{dremine43}}}
|-
! rowspan="2"|inferential
! class = "secondary" | positive
| {{{infpos12}}}
| {{{infpos13}}}
| {{{infpos21}}}
| {{{infpos23}}}
| {{{infpos31}}}
| {{{infpos32}}}
| {{{infpos33}}}
| {{{infpos34}}}
| {{{infpos43}}}
|-
! class = "secondary" | negative<sup>1</sup>
| {{{infneg12}}}
| {{{infneg13}}}
| {{{infneg21}}}
| {{{infneg23}}}
| {{{infneg31}}}
| {{{infneg32}}}
| {{{infneg33}}}
| {{{infneg34}}}
| {{{infneg43}}}
|-
! rowspan="2"|hypothetic
! class = "secondary" | positive
| {{{hyppos12}}}
| {{{hyppos13}}}
| {{{hyppos21}}}
| {{{hyppos23}}}
| {{{hyppos31}}}
| {{{hyppos32}}}
| {{{hyppos33}}}
| {{{hyppos34}}}
| {{{hyppos43}}}
|-
! class = "secondary" | negative<sup>1</sup>
| {{{hypneg12}}}
| {{{hypneg13}}}
| {{{hypneg21}}}
| {{{hypneg23}}}
| {{{hypneg31}}}
| {{{hypneg32}}}
| {{{hypneg33}}}
| {{{hypneg34}}}
| {{{hypneg43}}}
|-
! colspan="11" class="separator" |
|-
! colspan = "11" class = "outer"|Irrealis
|-
! colspan="2" |
! <abbr title="first-person subject second-person object">1→2</abbr>
! <abbr title="first-person subject third-person object">1→3</abbr>
! <abbr title="second-person subject first-person object">2→1</abbr>
! <abbr title="second-person subject third-person object">2→3</abbr>
! <abbr title="third-person subject first-person object">3→1</abbr>
! <abbr title="third-person subject second-person object">3→2</abbr>
! <abbr title="third-person subject third-person object">3→3</abbr>
! <abbr title="third-person subject fourth-person object">3→4</abbr>
! <abbr title="fourth-person subject third-person object">4→3</abbr>
|-
! rowspan="2"|imperative
! class = "secondary" | positive
| {{{imppos12}}}
| {{{imppos13}}}
| {{{imppos21}}}
| {{{imppos23}}}
| {{{imppos31}}}
| {{{imppos32}}}
| {{{imppos33}}}
| {{{imppos34}}}
| {{{imppos43}}}
|-
! class = "secondary" | negative<sup>3</sup>
| {{{impneg12}}}
| {{{impneg13}}}
| {{{impneg21}}}
| {{{impneg23}}}
| {{{impneg31}}}
| {{{impneg32}}}
| {{{impneg33}}}
| {{{impneg34}}}
| {{{impneg43}}}
|-
! rowspan="2"|desiderative
! class = "secondary" | positive
| {{{despos12}}}
| {{{despos13}}}
| {{{despos21}}}
| {{{despos23}}}
| {{{despos31}}}
| {{{despos32}}}
| {{{despos33}}}
| {{{despos34}}}
| {{{despos43}}}
|-
! class = "secondary" | negative<sup>1</sup>
| {{{desneg12}}}
| {{{desneg13}}}
| {{{desneg21}}}
| {{{desneg23}}}
| {{{desneg31}}}
| {{{desneg32}}}
| {{{desneg33}}}
| {{{desneg34}}}
| {{{desneg43}}}
]=]

	wikicode = wikicode .. mw.getCurrentFrame():expandTemplate{ title = 'inflection-table-bottom', args = {notes = 
		"<small>1. Preceded by the adverb ''{{{janiwa}}}''.<br/>2. Preceded by the adverb ''{{{janiti}}}''.<br/>3. Preceded by the adverb ''{{{janiya}}}''. <br/>This table is not exhaustive.</small>"} }
	return mw.ustring.gsub(wikicode, "{{{?(+)}}}", repl) .. require("Module:utilities").format_categories(data.categories, lang)
end --normal table

-- Inflection functions (common nouns)
function export.show(frame)
	local args = frame:getParent().args
	local data = {
		forms = {},
		categories = {},
		 = {},
	}
	local ending_text = 0
	
	-- add the lemma form
	local base = args.pagename or mw.title.getCurrentTitle().text

	--find the root
	local root
	if rfind(base, "ña$") then
		root = rsub(base, "ña$", "")
	end
	if not root then error("Verbs must end in -aña, -iña, -uña") end
	
	--data
	local persons = {"12", "13", "21", "23", "31", "32", "33", "34", "43"}
	local suffixes = {
		aor  = { = "CsmaV",    = "CtaC",    = "CistaV",     = "CtaV",    = "CituV",    = "CtamC",    = "CiV",      = "CistuV",     = "CtanC"},
		fut  = { = "V:maV",    = "V:V",     = "CitätaV",    = "V:taV",   = "CitaniV",  = "V:tamC",   = "VniV",     = "CistaniV",   = "VñaniV"},
		prem = { = "VyäsmaV",  = "VyätaC",  = "CistästaV",  = "VyätaV",  = "CitanaV",  = "VyätamC",  = "V:naC",    = "CistanaV",   = "VyätanC"},
		drem = { = "VtäsmaV",  = "VtätaC",  = "CistästaV",  = "VtätaV",  = "CitütuV",  = "VtätamC",  = "VtaynaV",  = "CistüstuV",  = "VtätanC"},
		inf  = { = "CpachasmaV",  = "CpachataC",  = "CpachistaV",  = "CpachataV",  = "CpachituV",  = "CpachatanC",  = "CpachaV",  = "CpachistuV",  = "CpachatanC"},
		hyp  = { = "CssmaV",   = "CstaC",   = "CchistaV",   = "CstaV",   = "CchituV",  = "CstamC",   = "CchiV",    = "CchistuV",   = "CstanC"},
		imp  = { = "V:maV",    = "V:V",     = "CitaV",    = "VmC",   = "CitpaV",  = "V:tamC",   = "CpaV",     = "CistpaV",   = "VñaniV"},
		des  = { = "CirismaV",    = "CiristaC",     = "CitasmaV",    = "VsmaC",   = "CitaspaV",  = "CiristamC",   = "CspaV",     = "CistaspaV",   = "CsnaV"},
	}
	local pre = { pos = "", neg = "Cka", ipo = "", ine = "Cka"}
	local aft = { pos = "", neg = "ti", ipo = "ti", ine = ""}
	
	--form generating function
	local function generate_form(t, f, p)
		pr = pre
		af = aft
		if t == "imp" then pr = "" end
		--attach all morphemes and simplify hyphens. remove final C, V as they are not needed
		form = root .. "-" .. pr .. "-" .. suffixes .. "-" .. af
		form = rsub_repeatedly(form, "%-%-", "-")
		form = rsub_repeatedly(form, "$", "")
		--dominance of /u/
		form = rsub_repeatedly(form, "(?)%-(?)i", "u%1-%2u")
		--remove morpheme-final vowels if needed
		form = rsub_repeatedly(form, "()V%-", "%1-")
		form = rsub_repeatedly(form, "?C%-", "-")
		--remove vowels before morphemes that only follow consonants
		form = rsub_repeatedly(form, "%-C", "-")
		form = rsub_repeatedly(form, "%-C", "-")
		form = rsub_repeatedly(form, "()%-V", "%1-")
		--Remove hyphens and fix long vowels
		form = rsub_repeatedly(form, "%-", "")
		form = rsub(form, "(:)", { = "ä",  = "ï",  = "ü"})
		form = rsub(form, "():", "%1")
		--handle the irregular verb saña. If the regular form would result in an initial cluster, add si-
		if base == "saña" and rfind(form, "^") then
			form = "si" .. form
		end
		return form
	end
	
	--add the forms
	local tenses = {"aor", "fut", "prem", "drem", "inf", "hyp", "imp", "des"}
	local val = {"pos", "neg", "ipo", "ine"}
	for _, t in ipairs(tenses) do
		for _, f in ipairs(val) do
			for _, p in ipairs(persons) do
				data.forms = {generate_form(t, f, p)}
			end
		end
	end
	data.info = "Conjugation of " .. require("Module:links").full_link({lang = lang, alt = base}, "term")

	return make_table(data)
end

return export