Module:mai-conj/sandbox

From Wiktionary, the free dictionary
Jump to navigation Jump to search

local export = {}
local m_translit = require("Module:mai-IPA2")
local m_utilities = require("Module:mai-utilities")

local gsub = mw.ustring.gsub
local sub = mw.ustring.sub
local match = mw.ustring.match
local len = mw.ustring.len

local comb_list = {

}

local function wordify_info(text)


	text = m_utilities.link(text)
	return text
end

local function wordify(text)
	local words, translits = {}, {}

	for word in mw.text.gsplit(text, ",") do
		table.insert(words, mai_format(word))
		table.insert(translits, m_translit.tr(word, "mai", "Deva"))
	end
	text = table.concat(words, ", ") .. "<br>[<small style=\"color:#272727\">" ..
		table.concat(translits, ", ") .. "</small>]"
	return text
end

function mai_format(text)
	text = ('<span lang="mai" class="Deva">[[%s#Maithili|'):format(mw.ustring.gsub(text, "[<>ॱ•‌‍]", "")) .. 
		('%s]]</span>'):format(mw.ustring.gsub(text, "[<>•ॱ‌‍]", ""))
	return text
end

local function inj_2s(stem, neg)
	local inj_2s_rpl = {
		["दि"] = { "दे", "दिएस्" },
		["लि"] = { "ले", "लिएस्" },
		["ग"] = { "जा", "गएस्" },
		["आउ"] = { "आ", "आएस्" },
		["बिर्स"] = { "बिर्सी" },
		["बिग्र"] = { "बिग्री" },
		["रह्"] = { "रही" },
		["हेर््"] = { "हेर्" },
        ["फेर््"] = { "फेर्" },
        ["हो"] = { "भई", "‌भएस्" },
		["दुहु"] = { "दुही", "दुहुएस्" },
		["सह्"] = { "सही", "सहेस्" },
	}
	words = inj_2s_rpl[stem] or { stem, stem .. "एस्", stem .. "ए" }
	if neg then
		return "न‌" .. table.concat(words, ",न‌")
	else
		return table.concat(words, ",")
	end
end

local function inj_2p(stem, class, neg)
	local inj_2p_rpl = {
		["दि"] = { "देऊ", "देओ", "दिए" },
		["लि"] = { "लेऊ", "लेओ", "लिए" },
		["ग"] = { "जाऊ", "जाओ", "गए" },
		["आउ"] = { "आऊ", "आओ", "आए" },
		["बिर्स"] = { "बिर्स" },
		["बिग्र"] = { "बिग्र" },
		["रह्"] = { "रह" },
        ["हेर््"] = { "हेर‍" },
        ["फेर््"] = { "फेर‍" },
        ["हो"] = { "भऊ", "भओ", "‌भए" },
		["दुहु"] = { "दुह", "दुहुओ" },
		["सह्"] = { "सह", "सहे" },
	}
words = inj_2p_rpl[stem] or (class == 1 and { stem .. "अ", stem .. "ए" } or { stem .. "ऊ", stem .. "ओ", stem .. "ए" } )
if neg then
		if stem == "आउ" then
			return "न‌" .. table.concat(words, ",न‌") .. "आइज"
		else
			return "न‌" .. table.concat(words, ",न‌")
		end
	else
		return table.concat(words, ",")
	end
end

local function imp_2s(stem, neg)
	local imp_2s_rpl = {
		["दि"] = { "दे" },
		["लि"] = { "ले" },
		["ग"] = { "जा" },
		["आउ"] = { "आ" },
		["बिर्स"] = { "बिर्सी" },
		["बिग्र"] = { "बिग्री" },
		["रह्"] = { "रही" },
        ["हेर््"] = { "हेर्" },
        ["फेर््"] = { "फेर्" },
        ["हो"] = { "भई" },
        ["दुहु"] = { "दुही" },
		["सह्"] = { "सही" },
	}
	words = imp_2s_rpl[stem] or { stem }
	if neg then
		return "न‌" .. table.concat(words, ",न‌")
	else
		return table.concat(words, ",")
	end
end
local function imp_2p(stem, class, neg)
	local imp_2p_rpl = {
		["दि"] = { "देऊ", "देओ" },
		["लि"] = { "लेऊ", "लेओ" },
		["ग"] = { "जाऊ", "जाओ" },
		["आउ"] = { "आऊ", "आओ" },
		["बिर्स"] = { "बिर्स" },
		["बिग्र"] = { "बिग्र" },
		["रह्"] = { "रह" },
        ["हेर््"] = { "हेर‍" },
        ["फेर््"] = { "फेर‍" },
        ["हो"] = { "भऊ", "भओ" },
        ["दुहु"] = { "दुह", "दुहुओ" },
		["सह्"] = { "सह", "सहे" },
	}
	words = imp_2p_rpl[stem] or (class == 1 and { stem .. "अ" } or { stem .. "a", stem .. "ओ"} )
if neg then
		if stem == "आउ" then
			return "न‌" .. table.concat(words, ",न‌") .. "आइज"
		else
			return "न‌" .. table.concat(words, ",न‌")
		end
	else
		return table.concat(words, ",")
	end
end

local function fut_indef(stem_1, stem_2, pos, class, alt_neg)
	local fut_indef_rpl = {
		["1sm"] = { "उँला" },
		["1sf"] = { "उँली" },
		["1p"] = { "औंला" },
		["2sm"] = { "लास्" },
		["2sf"] = { "लिस्" },
		["2pm"] = { "औला", "लाउॱ" },
		["2pf"] = { "औली", "लेउॱ" },
		["3sm"] = { "ला" },
		["3sf"] = { "ली" },
		["3pm"] = { "लान्", "नन्" },
		["3pf"] = { "लिन्", "निन्" },
	}
	local fut_indef_rpl_c2 = {
		["1sm"] = { "उँला" },
		["1sf"] = { "उँली" },
		["1p"] = { "औंला" },
		["2sm"] = { "एलास्" },
		["2sf"] = { "एलिस्" },
		["2pm"] = { "औला", "एलाउॱ" },
		["2pf"] = { "औली", "एलेउॱ" },
		["3sm"] = { "एला" },
		["3sf"] = { "एली" },
		["3pm"] = { "एलान्", "एनन्" },
		["3pf"] = { "एलिन्", "एनिन्" },
	}
	local fut_indef_rpl_c3_au = {
		["1sm"] = { stem_2 .. "उँला" },
		["1sf"] = { stem_2 .. "उँली" },
		["1p"] = { stem_2 .. "औंला" },
		["2sm"] = { stem_1 .. "लास्" },
		["2sf"] = { stem_1 .. "लिस्" },
		["2pm"] = { stem_2 .. "औला", stem_1 .. "लाउॱ" },
		["2pf"] = { stem_2 .. "औली", stem_1 .. "लेउॱ" },
		["3sm"] = { stem_1 .. "ला" },
		["3sf"] = { stem_1 .. "ली" },
		["3pm"] = { stem_1 .. "लान्", stem_1 .. "नन्" },
		["3pf"] = { stem_1 .. "लिन्", stem_1 .. "निन्" },
	}
	na = ""
	if alt_neg then
		na = "न‌"
	end
	if class == 1 or match(stem_1, "ा$") then
		return na .. stem_1 .. table.concat(fut_indef_rpl[pos], "," .. na .. stem_1)
	elseif class == 2 then
		if stem_1 == "दि" or stem_1 == "लि" then
			if not match(pos, "^1") then
				stem_1 = gsub(stem_1, "..", { ["दि"] = "दे", ["लि"] = "ले" } )
			end
			return na .. stem_1 .. table.concat(fut_indef_rpl[pos], "," .. na .. stem_1)
		else
			return na .. stem_1 .. table.concat(fut_indef_rpl_c2[pos], "," .. na .. stem_1)
		end
	elseif count_c(stem_1) == 1 and match(stem_1, "ु$") then
		return na .. stem_2 .. table.concat(fut_indef_rpl[pos], "," .. na .. stem_2)
	else
		return na .. table.concat(fut_indef_rpl_c3_au[pos], "," .. na)
	end
end

local function fut_indef_neg(stem_1, stem_2, pos, class)
	local fut_indef_neg_rpl = {
		["1s"] = "ओइॱनँ",
		["1p"] = "ओइॱनौं",
		["2s"] = "ओइॱनस्",
		["2p"] = "ओइॱनौ",
		["3s"] = "ओइॱन‍",
		["3p"] = "ओइॱनन्",
	}
	if class == 1 or match(stem_1, "ा$") or class == 2 then
		return stem_1 .. fut_indef_neg_rpl[pos]
	else
		return stem_2 .. fut_indef_neg_rpl[pos]
	end
end

function count_c(text)
	return len(gsub(text, "[^कखगघङचछझञटठडढतथदधपफभशषसयरलहवणनम]", "")) 
end

function export.show(frame)
	local args = frame:getParent().args
	local word = args[1] or mw.title.getCurrentTitle().text
	local irreg = args["irreg"] or false
	local stem_2 = args["stem_2"] or false
	local i_stem = args["i"] or false
	local a_stem = args["a"] or false
	local passive = args["p"] or false
	local causative = args["c"] or false
	local class = 1
	local stem_1, stem_1_n = "", ""

	if match(word, "‍") then
		error("It contains the invisible character (zero-width joiner: 0x200D).")
	end
	
	if not match(word, "ब$") then
		error("Please ensure inputted word is a verb in its ''ab''-infinitive form.")
	end
	
	denu = sub(word, 1, -2)
	denu_translit = m_translit.tr(denu, "mai", "Deva")
	
	-- aau-: (1) aau-, (2) aa-, (3) aauṁ-
	if match(denu_translit, "([āäi])u$") then
		class = 3
		stem_1 = denu
		stem_2 = sub(denu, 1, -2)
		stem_1_n = denu .. "ँ"
	elseif match(denu_translit, "[^aäʌāiīuūeo]u$") then
		class = 3

		-- dhu-: (1) dhu-, (2) dho-, (3) dhun-
		if count_c(denu) == 1 then
			stem_1 = denu
			stem_2 = sub(denu, 1, -2) .. "ो"
			stem_1_n = denu .. "न्"
		
		-- duhu-: (1) duhu-, (2) duh-, (3) duh-
		else
			stem_1 = denu
			stem_2 = sub(denu, 1, -2) .. "ो"
			stem_1_n = denu
		end
	
	-- birsa-: (1) birsa-, (2) birs-, (3) birsan-
	elseif match(denu_translit, "[^aäʌāiīuūeo]a$") then
		class = 3
		stem_1 = denu
		stem_2 = denu .. "्"
		stem_1_n = denu .. "न्"
	
	-- jaa-: (1) jaa-, (2) ga-, (3) jaan-
	elseif denu_translit == "jā" or irreg then
		class = 3
		stem_1 = denu
		stem_2 = stem_2 or gsub(denu, "जा", "ग")
		stem_1_n = denu .. "न्"
	
	-- khaa-: (1) khaa-, (2) khaa-, (3) khaan-
	elseif match(denu_translit, "[aäʌāiīuūeoptkbdgfvhrwhmnzxslcʑɾ]$") then
		class = 2
		stem_1 = denu
		stem_2 = stem_1
		stem_1_n = denu .. "न्"
	
	-- gar-: (1) gar-, (2) gar-, (3) gar-
	else
		stem_1 = denu
		stem_2 = stem_1
		stem_1_n = denu .. "न्"
		
	end
	
	stem_1_n_2 = gsub(stem_1_n, "न्$", "ँ")
	
	info = [=[


<div class="NavHead" style="background:#DEDEDE;width:100% >'''basic conjugation of {{PAGENAME'''</div>
{| border="1" color="#bcbcbc" style="border-collapse:collapse; border:1px solid #555555; background:#fdfdfd; width:100%; text-align:center" class="inflection-table"
|- style="height:3em"
! colspan="2"   style="background:#bcbcbc" | Subject
! rowspan="2" style="background:#bcbcbc" |Present
! rowspan="2" style="background:#bcbcbc" | Past
! rowspan="2" style="background:#bcbcbc" | Future  
! rowspan="2" style="background:#bcbcbc" | Imperative
|-
! colspan="2" rowspan="3" style="background:#bcbcbc" | First
|-
| rowspan="2" |  .. wordify(stem_1 .. "ी") .. [=[  [=[
|  .. wordify(stem_1 .. "ली") .. [=[  [=[
| rowspan="2" |  .. wordify(stem_1 .. "ब") .. [=[  [=[
| rowspan="2" |  .. wordify(stem_1 .. "ू") .. [=[  [=[
|-
|  .. wordify(stem_1 .. "लहुँ") .. [=[  [=[
|-
! rowspan="4" style="background:#bcbcbc" | Second
! rowspan="2" style="background:#cdcdcd" |HON
| rowspan="2" |  .. wordify(stem_1 .. "ी") .. [=[  [=[
|  .. wordify(stem_1 .. "ली") .. [=[  [=[| rowspan="2" |  .. wordify(stem_1 .. "ब") .. [=[  [=[
| rowspan="2" |  .. wordify(stem_1 .. "ू") .. [=[  [=[
|-
|   .. wordify(stem_1 .. "लहुँ
|-
! style="background:#cdcdcd" |Equal
|| ]=] .. wordify(stem_1 .. "ह") .. [=[  [=[[=[
|  .. wordify(stem_1 .. "लह") .. [=[  [=[
|  .. wordify(stem_1 .. "बह") .. [=[  [=[
|  .. wordify(stem_1 .. "ह") .. [=[  [=[
|-
! style="background:#cdcdcd" |NonHON
|  .. wordify(stem_1 .. "ें") .. [=[  [=[
|  .. wordify(stem_1 .. "लें") .. [=[  [=[|  .. wordify(stem_1 .. "बें") .. [=[  [=[
|  .. wordify(stem_1 .. "
|-
! rowspan="3" style="background:#bcbcbc" | Third
! rowspan="2" style="background:#cdcdcd" |HON
| rowspan="2" |  .. wordify(stem_1 .. "‍थि") .. [=[  [=[
|  .. wordify(stem_1 .. "लाह") .. [=[  [=[
|  .. wordify(stem_1 .. "ताह") .. [=[  [=[
| rowspan="2" |  .. wordify(stem_1 .. "‍थु") .. [=[  [=[
|-
| style="background:#f7f7ab " |  .. wordify(stem_1 .. "लीह") .. [=[  [=[
| style="background:#f7f7ab " |  .. wordify(stem_1 .. "तीह") .. [=[  [=[
|-
! style="background:#cdcdcd" |NonHON
|  .. wordify(stem_1 .. "ए") .. [=[  [=[
|  .. wordify(stem_1 .. "ल") .. [=[  [=[
|  .. wordify(stem_1 .. "त") .. [=[  [=[
|  .. wordify(stem_1 .. "ऒ") .. [=[  [=[
|}
<div class="NavFrame" style="background-color:#e3f3ff">
<div class="NavHead" style="width:100%" >Conjugation of ]=] .. m_utilities.link(word) .. [=[</div>
<div class="NavContent">

{| align=left style="margin-left:0.5em; margin-bottom:0.5em; border:1px solid #AAAAAA; width:50em; border-collapse:collapse; text-align:center" cellpadding="5" rules="all"
|-
!colspan=5 style="background-color:#C0C0C0"|Information
|-]=]

	if class == 3 then
		info = info .. [=[

! colspan="3" style="background-color:#E2E4C0"|''Primary stem''
|colspan="2" style="background-color:#F0F0F0"|]=] .. m_utilities.link(stem_1 .. "-") .. [=[

|-
! colspan="3" style="background-color:#E2E4C0"|''Secondary stem''
|colspan="2" style="background-color:#F0F0F0"|]=] .. m_utilities.link(stem_2 .. "-") .. [=[

|-
! colspan="3" style="background-color:#E2E4C0"|''Conjugation type''
|colspan="2" style="background-color:#F0F0F0"|3<sup>rd</sup> conjugation: vowel-ending stem, irregular.]=]

	elseif class == 2 then
		info = info .. [=[

! colspan="3" style="background-color:#E2E4C0"|''Stem''
|colspan="2" style="background-color:#F0F0F0"|]=] .. m_utilities.link(denu .. "-") .. [=[

|-
! colspan="3" style="background-color:#E2E4C0"|''Conjugation type''
|colspan="2" style="background-color:#F0F0F0"|2<sup>nd</sup> conjugation: vowel-ending stem, regular.]=]

	else
		info = info .. [=[

! colspan="3" style="background-color:#E2E4C0"|''Stem''
|colspan="2" style="background-color:#F0F0F0"|]=] .. m_utilities.link(denu .. "-") .. [=[

|-
! colspan="3" style="background-color:#E2E4C0"|''Conjugation type''
|colspan="2" style="background-color:#F0F0F0"|1<sup>st</sup> conjugation: consonant-ending stem, regular.]=]

	end
	
	if i_stem or a_stem or passive or causative then
		info = info .. [=[
		
|-
!colspan=5 style="background-color:#C0C0C0"|Derivatives]=]

		if i_stem then
			info = info .. [=[

|-
! colspan="3" style="background-color:#E2E4C0"|''I-stem''<br><small>(Passive)</small>
|colspan="2" style="background-color:#F0F0F0"|]=] .. wordify_info(stem_2  .. "इनु")
	
		end
		if a_stem then
			info = info .. [=[

|-
! colspan="3" style="background-color:#E2E4C0"|''A-stem''<br><small>(Causative/Denominative)</small>
|colspan="2" style="background-color:#F0F0F0"|]=] .. wordify_info(stem_2  .. "आउॱनु")
	
		end
		if passive then
			info = info .. [=[

|-
! colspan="3" style="background-color:#E2E4C0"|''Passive''
|colspan="2" style="background-color:#F0F0F0"|]=] .. wordify_info(passive)
	
		end
		if causative then
			info = info .. [=[

|-
! colspan="3" style="background-color:#E2E4C0"|''Causative''
|colspan="2" style="background-color:#F0F0F0"|]=] .. wordify_info(causative)
	
		end
	end
		

	info = info .. [=[

|-
! colspan=5 style="background-color:#C0C0C0"|Non-finite forms
|-
! colspan="3" style="background-color:#E2E4C0"| ''Infinitives''
| colspan="2" style="background-color:#F0F0F0"| ]=] .. wordify_info(stem_1 .. "नु") .. "<br>" .. wordify_info(stem_1 .. "न‍") .. [=[

|- style="height:2em"
!rowspan="14" style="background-color:#E2E4C0"| ''Participles''
!colspan="2" style="background-color:#E2E4C0"| 
|style="background-color:#E2E4C0" | '''''Affirmative''''' (+)
|style="background-color:#E2E4C0"| '''''Negative''''' (–)
|-
!colspan="2" style="background-color:#E2E4C0"| ''Conjunctive''
|style="background-color:#F0F0F0"| ]=] .. wordify_info(stem_2 .. "एर") .. "<br>" .. wordify_info(stem_2 .. "ई") .. "<br>" .. wordify_info(stem_2 .. "ई<कन‍>") .. [=[
||style="background-color:#F0F0F0"| ]=] .. wordify_info("न‌" .. stem_2 .. "एर‍") .. "<br>" .. wordify_info("न‌" .. stem_2 .. "ई") .. "<br>" .. wordify_info("न‌" .. stem_2 .. "ई<कन‍>") .. [=[

|-
!rowspan="4" style="background-color:#E2E4C0"| ''1<sup>st</sup> Perfect''
!style="background-color:#E2E4C0"| ''m. sing.''
|style="background-color:#F0F0F0"| ]=] .. wordify_info(stem_2 .. "एको") .. [=[
||style="background-color:#F0F0F0"| ]=] .. wordify_info("न‌" .. stem_2 .. "एको") .. [=[

|-
!style="background-color:#E2E4C0"| ''f. sing.''
|style="background-color:#F0F0F0"| ]=] .. wordify_info(stem_2 .. "एकी") .. [=[
||style="background-color:#F0F0F0"| ]=] .. wordify_info("न‌" .. stem_2 .. "एकी") .. [=[

|-
!style="background-color:#E2E4C0"| ''pl.''
|style="background-color:#F0F0F0"| ]=] .. wordify_info(stem_2 .. "एका") .. [=[
||style="background-color:#F0F0F0"| ]=] .. wordify_info("न‌" .. stem_2 .. "एका") .. [=[

|-
!style="background-color:#E2E4C0"| ''high-resp.''
|style="background-color:#F0F0F0"| ]=] .. wordify_info(denu .. "नु‌भएको") .. [=[
||style="background-color:#F0F0F0"| ]=] .. wordify_info("न‌" .. denu .. "नु‌भएको") .. [=[

|-
!rowspan="2" style="background-color:#E2E4C0"| ''2<sup>nd</sup> Perfect''
!style="background-color:#E2E4C0"| ''normal''
|style="background-color:#F0F0F0"| ]=] .. wordify_info(stem_2 .. "ए") .. [=[
||style="background-color:#F0F0F0"| ]=] .. wordify_info("न‌" .. stem_2 .. "ए") .. [=[

|-
!style="background-color:#E2E4C0"| ''high-resp.''
|style="background-color:#F0F0F0"| ]=] .. wordify_info(denu .. "नु‌भए") .. [=[
||style="background-color:#F0F0F0"| ]=] .. wordify_info("न‌" .. denu .. "नु‌भए") .. [=[

|-
!rowspan="2" style="background-color:#E2E4C0"| ''Imperfect''
!style="background-color:#E2E4C0"| ''normal''
|style="background-color:#F0F0F0"| ]=] .. wordify_info(stem_1 .. "दा") .. "<br>" .. wordify_info(stem_1 .. "दै") .. "<br>" .. wordify_info(stem_1 .. "दो") .. [=[
||style="background-color:#F0F0F0"| ]=] .. wordify_info("न‌" .. stem_1 .. "दा") .. "<br>" .. wordify_info("न‌" .. stem_1 .. "दै") .. "<br>" .. wordify_info("न‌" .. stem_1 .. "दो") .. [=[

|-
!style="background-color:#E2E4C0"| ''high-resp.''
|style="background-color:#F0F0F0"| ]=] .. wordify_info(denu .. "नुहुँदा") .. "<br>" .. wordify_info(denu .. "नुहुँदै") .. "<br>" .. wordify_info(denu .. "नुहुँदो") .. [=[
||style="background-color:#F0F0F0"| ]=] .. wordify_info("न‌" .. denu .. "नुहुँदा") .. "<br>" .. wordify_info("न‌" .. denu .. "नुहुँदै") .. "<br>" .. wordify_info("न‌" .. denu .. "नुहुँदो") .. [=[

|-
!rowspan="2" style="background-color:#E2E4C0"| ''Infinitival''
!style="background-color:#E2E4C0"| ''normal''
|style="background-color:#F0F0F0"| ]=] .. wordify_info(stem_1 .. "ने") .. [=[
||style="background-color:#F0F0F0"| ]=] .. wordify_info("न‌" .. stem_1 .. "ने") .. [=[

|-
!style="background-color:#E2E4C0"| ''high-resp.''
|style="background-color:#F0F0F0"| ]=] .. wordify_info(denu .. "नुहुने") .. [=[
||style="background-color:#F0F0F0"| ]=] .. wordify_info("न‌" .. denu .. "नुहुने") .. [=[

|-
!colspan="2" style="background-color:#E2E4C0"| ''Absolutive''
|colspan="2" style="background-color:#F0F0F0"| ]=] .. (stem_1 == "जा" and wordify_info(stem_1 .. "इ") .. "<br>" or "") .. wordify_info(stem_2 .. "इ") .. [=[

|}]=]

	form = info .. [=[

{| border="1" color="#cdcdcd" style="border-collapse:collapse; border:1px solid #555555; background:#fdfdfd; width:100%; text-align:center" class="inflection-table"
|- style="height:3em"
! colspan="16" style="background:#C0C0C0" | Finite forms of ]=] .. wordify_info(word) .. [=[

|-
! colspan="3" style="background:#cdcdcd" | Person
! colspan="4" style="background:#cdcdcd; height:3em" | 1<sup>st</sup>
! colspan="4" style="background:#cdcdcd" | 2<sup>nd</sup>
! colspan="4" style="background:#cdcdcd" | 3<sup>rd</sup>
! style="background:#cdcdcd" | 2<sup>nd</sup> & 3<sup>rd</sup>
|-
! rowspan="2" colspan="3" style="background:#cdcdcd" | Pronoun
! colspan="2" style="background:#cdcdcd" | ]=] .. mai_format("म") .. [=[<br><small><span style="font-family:Times New Roman">SING.</span></small>
!! colspan="2" style="background:#cdcdcd" | ]=] .. mai_format("हामी") .. [=[<br><small><span style="font-family:Times New Roman">PL.</span></small>
!! colspan="2" style="background:#cdcdcd" | ]=] .. mai_format("तँ") .. [=[<br><small><span style="font-family:Times New Roman">LOW-RESP.<br>SING.</span></small>
!! colspan="2" style="background:#cdcdcd" | ]=] .. mai_format("तिमी") .. [=[<br><small><span style="font-family:Times New Roman">MID-RESP.</span></small>
!! colspan="2" style="background:#cdcdcd" | ]=] .. mai_format("ऊ") .. [=[<br><small><span style="font-family:Times New Roman">LOW-RESP.<br>SING.</span></small>
!! colspan="2" style="background:#cdcdcd" | ]=] .. mai_format("उनी") .. [=[<br><small><span style="font-family:Times New Roman">MID-RESP.</span></small>
!! rowspan="2" style="background:#cdcdcd" | ]=] .. mai_format("तपाईं") .. " / " .. mai_format("ऊहाँ") .. [=[<br><small><span style="font-family:Times New Roman">HIGH-RESP.</span></small>

|-
! style="background:#cdcdcd" | ''m''
! style="background:#cdcdcd" | ''f''
! style="background:#cdcdcd" | ''m''
! style="background:#cdcdcd" | ''f''
! style="background:#cdcdcd" | ''m''
! style="background:#cdcdcd" | ''f''
! style="background:#cdcdcd" | ''m''
! style="background:#cdcdcd" | ''f''
! style="background:#cdcdcd" | ''m''
! style="background:#cdcdcd" | ''f''
! style="background:#cdcdcd" | ''m''
! style="background:#cdcdcd" | ''f''
|-
! colspan="2" rowspan="]=] .. (class == 1 and "2" or "3") .. [=[" style="background:#cdcdcd" | Present
! style="height:7em; width:1.5em; background:#cdcdcd" | +
| colspan="2" | ]=] .. wordify(stem_1_n .. "छु") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1_n .. "छौं") .. [=[
|| ]=] .. wordify(stem_1_n .. "छस्") .. [=[
|| ]=] .. wordify(stem_1_n .. "छेस्") .. [=[
|| ]=] .. wordify(stem_1_n .. "छौ") .. [=[
|| ]=] .. wordify(stem_1_n .. "छ्यौ") .. [=[
|| ]=] .. wordify(stem_1_n .. "छ‍") .. [=[
|| ]=] .. wordify(stem_1_n .. "छे") .. [=[
|| ]=] .. wordify(stem_1_n .. "छन्") .. [=[
|| ]=] .. wordify(stem_1_n .. "छिन्") .. [=[
|| ]=] .. wordify(denu .. "नुहुन्छ") .. (class == 1 and ([=[

|-
! style="height:7em; background:#cdcdcd" | –
| colspan="2" | ]=] .. wordify(stem_1 .. "दिनँ") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1 .. "दैनौं") .. [=[
|| ]=] .. wordify(stem_1 .. "दैनस्") .. [=[
|| ]=] .. wordify(stem_1 .. "दिनेस्") .. [=[
|| ]=] .. wordify(stem_1 .. "दैनौ") .. [=[
|| ]=] .. wordify(stem_1 .. "दिनौ") .. [=[
|| ]=] .. wordify(stem_1 .. "दैन‍") .. [=[
|| ]=] .. wordify(stem_1 .. "दिने") .. [=[
|| ]=] .. wordify(stem_1 .. "दैनन्") .. [=[
|| ]=] .. wordify(stem_1 .. "दिनन्") .. [=[
|| ]=] .. wordify(denu .. "नुहुँदैन‍")) or ([=[

|-
! rowspan="2" style="background:#cdcdcd" | –
| style="height:7em" colspan="2" | ]=] .. wordify(stem_1_n_2 .. "दिनँ") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1_n_2 .. "दैनौं") .. [=[
|| ]=] .. wordify(stem_1_n_2 .. "दैनस्") .. [=[
|| ]=] .. wordify(stem_1_n_2 .. "दिनेस्") .. [=[
|| ]=] .. wordify(stem_1_n_2 .. "दैनौ") .. [=[
|| ]=] .. wordify(stem_1_n_2 .. "दिनौ") .. [=[
|| ]=] .. wordify(stem_1_n_2 .. "दैन‍") .. [=[
|| ]=] .. wordify(stem_1_n_2 .. "दिने") .. [=[
|| ]=] .. wordify(stem_1_n_2 .. "दैनन्") .. [=[
|| ]=] .. wordify(stem_1_n_2 .. "दिनन्") .. [=[
|| ]=] .. wordify(denu .. "नुहुँदैन‍") .. [=[

|-
| style="height:7em" colspan="2" | ]=] .. wordify(stem_1 .. "न्नँ") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1 .. "न्नौं") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1 .. "न्नस्") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1 .. "न्नौ") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1 .. "न्न") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1 .. "न्नन्") .. [=[
|| ]=] .. wordify(denu .. "नुहुन्न"))) .. [=[

|-
! rowspan="]=] .. (class == 1 and 6 or 7) .. [=[" style="background:#cdcdcd" | Past
! rowspan="2" style="background:#c0cfe4" | Simple
! style="height:7em; background:#c0cfe4" | +
| colspan="2" | ]=] .. wordify(stem_2 .. "एं") .. [=[
|| colspan="2" | ]=] .. wordify(stem_2 .. "यौं") .. [=[
|| colspan="2" | ]=] .. wordify(stem_2 .. "इस्") .. [=[
|| colspan="2" | ]=] .. wordify(stem_2 .. "यौ") .. [=[
|| ]=] .. wordify(stem_2 .. "यो") .. [=[
|| ]=] .. wordify(stem_2 .. "ई") .. [=[
|| ]=] .. wordify(stem_2 .. "ए") .. [=[
|| ]=] .. wordify(stem_2 .. "इन्") .. [=[
|| ]=] .. wordify(denu .. "नु‌भयो") .. [=[

|-
! style="height:7em; background:#c0cfe4" | –
| colspan="2" | ]=] .. wordify(stem_2 .. "इनँ") .. [=[
|| colspan="2" | ]=] .. wordify(stem_2 .. "एनौं") .. [=[
|| ]=] .. wordify(stem_2 .. "एनस्") .. [=[
|| ]=] .. wordify(stem_2 .. "इनेस्") .. [=[
|| colspan="2" | ]=] .. wordify(stem_2 .. "एनौ") .. [=[
|| ]=] .. wordify(stem_2 .. "एन‍") .. [=[
|| ]=] .. wordify(stem_2 .. "इने") .. [=[
|| ]=] .. wordify(stem_2 .. "एनन्") .. [=[
|| ]=] .. wordify(stem_2 .. "इनन्") .. [=[
|| ]=] .. wordify(denu .. "नु‌भएन‍") .. [=[

|-
! rowspan="]=] .. (class == 1 and 2 or 3) .. [=[" style="background:#c0cfe4" | Habitual
! style="height:7em; background:#c0cfe4" | +
| colspan="2" | ]=] .. wordify(stem_1_n .. "थें") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1_n .. "थ्यौं") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1_n .. "थिस्") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1_n .. "थ्यौ") .. [=[
|| ]=] .. wordify(stem_1_n .. "थ्यो") .. [=[
|| ]=] .. wordify(stem_1_n .. "थी") .. [=[
|| ]=] .. wordify(stem_1_n .. "थे") .. [=[
|| ]=] .. wordify(stem_1_n .. "थिन्") .. [=[
|| ]=] .. wordify(denu .. "नुहुन्थ्यो") .. [=[

|-
! rowspan="]=] .. (class == 1 and 1 or 2) .. [=[" style="height:7em; background:#c0cfe4" | –
| colspan="2" | ]=] .. wordify(stem_1_n_2 .. "दिनथें") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1_n_2 .. "दैनथ्यौं") .. [=[
|| ]=] .. wordify(stem_1_n_2 .. "दैनथिस्") .. [=[
|| ]=] .. wordify(stem_1_n_2 .. "दिनथिस्") .. [=[
|| ]=] .. wordify(stem_1_n_2 .. "दैनथ्यौ") .. [=[
|| ]=] .. wordify(stem_1_n_2 .. "दिनथ्यौ") .. [=[
|| ]=] .. wordify(stem_1_n_2 .. "दैनथ्यो") .. [=[
|| ]=] .. wordify(stem_1_n_2 .. "दैनथी") .. [=[
|| ]=] .. wordify(stem_1_n_2 .. "दैनथे") .. [=[
|| ]=] .. wordify(stem_1_n_2 .. "दिनथिन्") .. [=[
|| ]=] .. wordify(denu .. "नुहुँदैनथ्यो") .. (class ~= 1 and [=[

|-
| colspan="2" | ]=] .. wordify(stem_1 .. "न्नथें") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1 .. "न्नथ्यौं") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1 .. "न्नथिस्") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1 .. "न्नथ्यौ") .. [=[
|| ]=] .. wordify(stem_1 .. "न्नथ्यो") .. [=[
|| ]=] .. wordify(stem_1 .. "न्नथी") .. [=[
|| ]=] .. wordify(stem_1 .. "न्नथे") .. [=[
|| ]=] .. wordify(stem_1 .. "न्नथिन्") .. [=[
|| ]=] .. wordify(denu .. "नुहुन्नथ्यो") or "") .. [=[

|-
! rowspan="2" style="background:#c0cfe4" | Unknown
! style="height:7em; background:#c0cfe4" | +
|| ]=] .. wordify(stem_2 .. "एछु") .. [=[
|| ]=] .. wordify(stem_2 .. "इछु") .. [=[
|| colspan="2" | ]=] .. wordify(stem_2 .. "एछौं") .. [=[
|| ]=] .. wordify(stem_2 .. "एछस्") .. [=[
|| ]=] .. wordify(stem_2 .. "इछेस्") .. [=[
|| colspan="2" | ]=] .. wordify(stem_2 .. "एछौ") .. [=[
|| ]=] .. wordify(stem_2 .. "एछ") .. [=[
|| ]=] .. wordify(stem_2 .. "इछे") .. [=[
|| ]=] .. wordify(stem_2 .. "एछन्") .. [=[
|| ]=] .. wordify(stem_2 .. "इछिन्") .. [=[
|| ]=] .. wordify(denu .. "नु‌भएछ‍") .. [=[

|-
! style="height:7em; background:#c0cfe4" | –
|| ]=] .. wordify(stem_2 .. "एनछु") .. [=[
|| ]=] .. wordify(stem_2 .. "इनछु") .. [=[
|| colspan="2" | ]=] .. wordify(stem_2 .. "एनछौं") .. [=[
|| ]=] .. wordify(stem_2 .. "एनछस्") .. [=[
|| ]=] .. wordify(stem_2 .. "इनछेस्") .. [=[
|| colspan="2" | ]=] .. wordify(stem_2 .. "एनछौ") .. [=[
|| ]=] .. wordify(stem_2 .. "एनछ") .. [=[
|| ]=] .. wordify(stem_2 .. "इनछे") .. [=[
|| ]=] .. wordify(stem_2 .. "एनछन्") .. [=[
|| ]=] .. wordify(stem_2 .. "इनछिन्") .. [=[
|| ]=] .. wordify(denu .. "नु‌भएनछ‍") .. [=[

|-
! rowspan="5" style="background:#cdcdcd" | Future
! rowspan="2" style="background:#c0cfe4" | Definite
! style="height:7em; background:#c0cfe4" | +
| colspan="2" | ]=] .. wordify(stem_1 .. "नेछु") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1 .. "नेछौं") .. [=[
|| ]=] .. wordify(stem_1 .. "नेछस्") .. [=[
|| ]=] .. wordify(stem_1 .. "नेछेस्") .. [=[
|| ]=] .. wordify(stem_1 .. "नेछौ") .. [=[
|| ]=] .. wordify(stem_1 .. "नेछ्यौ") .. [=[
|| ]=] .. wordify(stem_1 .. "नेछ‍") .. [=[
|| ]=] .. wordify(stem_1 .. "नेछे") .. [=[
|| ]=] .. wordify(stem_1 .. "नेछन्") .. [=[
|| ]=] .. wordify(stem_1 .. "नेछिन्") .. [=[
|| ]=] .. wordify(denu .. "नुहुनेछ‍")

	form = form .. [=[

|-
! style="height:7em; background:#c0cfe4" | –
| colspan="2" | ]=] .. wordify(stem_1 .. "नेछैनँ") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1 .. "नेछैनौं") .. [=[
|| ]=] .. wordify(stem_1 .. "नेछैनस्") .. [=[
|| ]=] .. wordify(stem_1 .. "नेछैनेस्") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1 .. "नेछैनौ") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1 .. "नेछैन‍") .. [=[
|| colspan="2" | ]=] .. wordify(stem_1 .. "नेछैनन्") .. [=[
|| ]=] .. wordify(denu .. "नुहुनेछैन‍") .. [=[

|-
! rowspan="3" style="background:#c0cfe4" | Indefinite
! style="height:7em; background:#c0cfe4" | +
| ]=] .. wordify(fut_indef(stem_1, stem_2, "1sm", class)) .. [=[
|| ]=] .. wordify(fut_indef(stem_1, stem_2, "1sf", class)) .. [=[
|| colspan="2" | ]=] .. wordify(fut_indef(stem_1, stem_2, "1p", class)) .. [=[
|| ]=] .. wordify(fut_indef(stem_1, stem_2, "2sm", class)) .. [=[
|| ]=] .. wordify(fut_indef(stem_1, stem_2, "2sf", class)) .. [=[
|| ]=] .. wordify(fut_indef(stem_1, stem_2, "2pm", class)) .. [=[
|| ]=] .. wordify(fut_indef(stem_1, stem_2, "2pf", class)) .. [=[
|| ]=] .. wordify(fut_indef(stem_1, stem_2, "3sm", class)) .. [=[
|| ]=] .. wordify(fut_indef(stem_1, stem_2, "3sf", class)) .. [=[
|| ]=] .. wordify(fut_indef(stem_1, stem_2, "3pm", class)) .. [=[
|| ]=] .. wordify(fut_indef(stem_1, stem_2, "3pf", class)) .. [=[
|| ]=] .. wordify(denu .. "नुहोला") .. [=[

|-
! rowspan="2" style="height:7em; background:#c0cfe4" | –
| colspan="2" | ]=] .. wordify(fut_indef_neg(stem_1, stem_2, "1s", class)) .. [=[
|| colspan="2" | ]=] .. wordify(fut_indef_neg(stem_1, stem_2, "1p", class)) .. [=[
|| colspan="2" | ]=] .. wordify(fut_indef_neg(stem_1, stem_2, "2s", class)) .. [=[
|| colspan="2" | ]=] .. wordify(fut_indef_neg(stem_1, stem_2, "2p", class)) .. [=[
|| colspan="2" | ]=] .. wordify(fut_indef_neg(stem_1, stem_2, "3s", class)) .. [=[
|| colspan="2" | ]=] .. wordify(fut_indef_neg(stem_1, stem_2, "3p", class)) .. [=[
|| ]=] .. wordify(denu .. "नुहोओइॱन‍") .. [=[

|-
| ]=] .. wordify(fut_indef(stem_1, stem_2, "1sm", class, true)) .. [=[
|| ]=] .. wordify(fut_indef(stem_1, stem_2, "1sf", class, true)) .. [=[
|| colspan="2" | ]=] .. wordify(fut_indef(stem_1, stem_2, "1p", class, true)) .. [=[
|| ]=] .. wordify(fut_indef(stem_1, stem_2, "2sm", class, true)) .. [=[
|| ]=] .. wordify(fut_indef(stem_1, stem_2, "2sf", class, true)) .. [=[
|| ]=] .. wordify(fut_indef(stem_1, stem_2, "2pm", class, true)) .. [=[
|| ]=] .. wordify(fut_indef(stem_1, stem_2, "2pf", class, true)) .. [=[
|| ]=] .. wordify(fut_indef(stem_1, stem_2, "3sm", class, true)) .. [=[
|| ]=] .. wordify(fut_indef(stem_1, stem_2, "3sf", class, true)) .. [=[
|| ]=] .. wordify(fut_indef(stem_1, stem_2, "3pm", class, true)) .. [=[
|| ]=] .. wordify(fut_indef(stem_1, stem_2, "3pf", class, true)) .. [=[
|| ]=] .. wordify("न‌" .. denu .. "नुहोला") .. [=[

|-
! rowspan="2" colspan="2" style="background:#cdcdcd" | Injunctive
! style="height:7em; background:#cdcdcd" | +
| colspan="2" | ]=] .. wordify(stem_2 .. "ऊँ") .. [=[
|| colspan="2" | ]=] .. wordify(stem_2 .. "औं," .. stem_2 .. "ऊँ") .. [=[
|| colspan="2" | ]=] .. wordify(inj_2s(stem_2)) .. [=[
|| colspan="2" | ]=] .. wordify(inj_2p(stem_2, class)) .. [=[
|| colspan="2" | ]=] .. wordify(stem_2 .. "ओस्") .. [=[
|| colspan="2" | ]=] .. wordify(stem_2 .. "ऊन्") .. [=[
|| ]=] .. wordify(denu .. "नुहोओस्") .. [=[

|-
! style="height:7em; background:#cdcdcd" | –
| colspan="2" | ]=] .. wordify("न‌" .. stem_2 .. "ऊँ") .. [=[
|| colspan="2" | ]=] .. wordify("न‌" .. stem_2 .. "औं,न‌" .. stem_2 .. "ऊँ") .. [=[
|| colspan="2" | ]=] .. wordify(inj_2s(stem_2, true)) .. [=[
|| colspan="2" | ]=] .. wordify(inj_2p(stem_2, class, true)) .. [=[
|| colspan="2" | ]=] .. wordify("न‌" .. stem_2 .. "ओस्") .. [=[
|| colspan="2" | ]=] .. wordify("न‌" .. stem_2 .. "ऊन्") .. [=[
|| ]=] .. wordify("न‌" .. denu .. "नुहोओस्") .. [=[

|-
! rowspan="2" colspan="2" style="background:#cdcdcd" | Imperative
! style="height:7em; background:#cdcdcd" | +
| colspan="2" | —
| colspan="2" | —
| colspan="2" | ]=] .. wordify(imp_2s(stem_2)) .. [=[
|| colspan="2" | ]=] .. wordify(imp_2p(stem_2, class)) .. [=[
|| colspan="2" | —
| colspan="2" | —
|| ]=] .. wordify(denu .. "नुहोस्," .. denu .. "नोस्") .. [=[

|-
! style="height:7em; background:#cdcdcd" | –
| colspan="2" | —
| colspan="2" | —
| colspan="2" | ]=] .. wordify(imp_2s(stem_2, true)) .. [=[
|| colspan="2" | ]=] .. wordify(imp_2p(stem_2, class, true)) .. [=[
|| colspan="2" | —
| colspan="2" | —
|| ]=] .. wordify("न" .. denu .. "नुहोस्,न" .. denu .. "नोस्") .. [=[

|}</div></div>]=]

	return form
end

return export