Module:uz-inflection/data/uz-noun

return { template = 'uz-decl-noun-table',

affixes = { gen = 'ning', acc = 'ni', loc = 'da', abl = 'dan', dat = 'ga', dat_k = 'ka', dat_q = 'qa', pl = 'lar', possessive_first_sg = 'm', possessive_second_sg = 'ng', possessive_first_pl = 'miz', possessive_second_pl = 'ngiz', possessive_third = 'i', interfix = 'i', },

conditions = { {			class = 'common', },		{			_if = {base__endswith = 'k'}, class = 'dat_k', },		{			_if = {base__endswith = 'q'}, class = 'dat_q', },		{			long_comment = 'If two last letters are identical to first letter of declension ending — then we need to leave only two letters from three. For example, metall + lar = metallar',

_if = {base__endswith = 'll'}, pl = 'ar', },

{SECTION = 'Possessive forms'}, {			base_possessive = ' ', possessive_type = ' ', class = {'possessive_nom', 'possessive_other'}, },

{SUBSECTION = 'When last letter is vowel'}, {			_if = {base__endswith = 'a'}, interfix = '', possessive_third = 'si', },		{			_if = {base__endswith = {'[eiuo]', "o[ʻ`']"}}, _then = { {					_if = {possessive_type = 'std'}, interfix = '', possessive_third = 'si', },				{					_if = {possessive_type = 'yisi'}, interfix = 'yi', possessive_third = 'si', },				{					_if = {possessive_type = 'yiyi'}, interfix = 'yi', possessive_third = 'yi', },				{					_if = {possessive_type__not = {'std', 'yisi', 'yiyi'}}, possessive_type_expected = '1', },			},		},

{SUBSECTION = 'When last letters are "iy"'}, {			_if = {base__endswith = 'iy'}, possessive_third = 'si', },

{SUBSECTION = 'When last letter is "k" or "q"'}, {			_if = {possessive_type = 'std'}, _then = { {					_if = {base__endswith = 'k'}, base_possessive = {'var_replace', 'base', 'k$', 'g'}, },				{					_if = {base__endswith = 'q'}, base_possessive = {'var_replace', 'base', 'q$', 'gʻ'}, },			},		},		{			_if = { base__endswith = {'k', 'q'}, possessive_type = 'kq', },			base_possessive = ' ', },		{			_if = { base__endswith = {'k', 'q'}, possessive_type__not = {'std', 'kq'}, },			possessive_type_expected = '1', },

{SUBSECTION = 'When penultimate letter is vowel and last letter is consonant (except "y")'}, {			_if = { base__not_endswith = {'[aeiuo]', "o[ʻ`']", 'y', 'k', 'q'}, base__penultimate = {'[aeiuo]', "o[ʻ`']"}, },			_then = { {					_if = {possessive_type = 'reduced'}, base_possessive = {'var_replace', 'base', '.(.)$', '%1'}, -- but we don't process case with apostrophe at the end.. },				{ -- TODO: add "_else" feature here _if = {possessive_type__not = 'reduced'}, base_possessive = ' ' },			},		},

{SUBSECTION = 'Make decision to show/hide block "Possesive"'}, {			_if = {possessive_type_expected = '1'}, show_possessive = '', },		{ -- TODO: add "_else" feature here _if = {possessive_type_expected__not = '1'}, show_possessive = '1', possessive_type_expected = '', -- just to create empty variable to send to template },

{SECTION = 'If there are no plural forms'}, {			long_comment = 'This rule should be the last one. Otherwise — removing of plural form can be overriden by other classes',

_if = {st = '1'}, -- if we've received argument "st" equals to "1" class = 'singularia_tantum', },	},

classes = { common = { nom_sg = ' ', gen_sg = ' ', acc_sg = ' ', loc_sg = ' ', abl_sg = ' ', dat_sg = ' ', nom_pl = ' ', gen_pl = '  ', acc_pl = '  ', loc_pl = '  ', abl_pl = '  ', dat_pl = '  ', show_possessive = '', possessive_type_expected = '', },		dat_k = { dat_sg = ' ' -- if -k then -kka },		dat_q = { dat_sg = ' ' -- if -q then -qqa },		possessive_nom = { nom_sg_possessive_1sg = ' ', nom_sg_possessive_2sg = ' ', nom_sg_possessive_3sg = '', nom_sg_possessive_1pl = '<base_possessive> <possessive_first_pl>', nom_sg_possessive_2pl = '<base_possessive> <possessive_second_pl>', nom_sg_possessive_3pl = '<base_possessive><possessive_third>', nom_pl_possessive_1sg = ' <pl>i<possessive_first_sg>', nom_pl_possessive_2sg = ' <pl>i<possessive_second_sg>', nom_pl_possessive_3sg = ' <pl>i', nom_pl_possessive_1pl = ' <pl>i<possessive_first_pl>', nom_pl_possessive_2pl = ' <pl>i<possessive_second_pl>', nom_pl_possessive_3pl = ' <pl>i', },		possessive_other = { gen_sg_possessive_1sg = '<nom_sg_possessive_1sg> ', gen_sg_possessive_2sg = '<nom_sg_possessive_2sg> ', gen_sg_possessive_3sg = '<nom_sg_possessive_3sg> ', gen_sg_possessive_1pl = '<nom_sg_possessive_1pl> ', gen_sg_possessive_2pl = '<nom_sg_possessive_2pl> ', gen_sg_possessive_3pl = '<nom_sg_possessive_3pl> ', acc_sg_possessive_1sg = '<nom_sg_possessive_1sg> ', acc_sg_possessive_2sg = '<nom_sg_possessive_2sg> ', acc_sg_possessive_3sg = '<nom_sg_possessive_3sg> ', acc_sg_possessive_1pl = '<nom_sg_possessive_1pl> ', acc_sg_possessive_2pl = '<nom_sg_possessive_2pl> ', acc_sg_possessive_3pl = '<nom_sg_possessive_3pl> ', loc_sg_possessive_1sg = '<nom_sg_possessive_1sg> ', loc_sg_possessive_2sg = '<nom_sg_possessive_2sg> ', loc_sg_possessive_3sg = '<nom_sg_possessive_3sg> ', loc_sg_possessive_1pl = '<nom_sg_possessive_1pl> ', loc_sg_possessive_2pl = '<nom_sg_possessive_2pl> ', loc_sg_possessive_3pl = '<nom_sg_possessive_3pl> ', abl_sg_possessive_1sg = '<nom_sg_possessive_1sg> ', abl_sg_possessive_2sg = '<nom_sg_possessive_2sg> ', abl_sg_possessive_3sg = '<nom_sg_possessive_3sg> ', abl_sg_possessive_1pl = '<nom_sg_possessive_1pl> ', abl_sg_possessive_2pl = '<nom_sg_possessive_2pl> ', abl_sg_possessive_3pl = '<nom_sg_possessive_3pl> ', dat_sg_possessive_1sg = '<nom_sg_possessive_1sg> ', dat_sg_possessive_2sg = '<nom_sg_possessive_2sg> ', dat_sg_possessive_3sg = '<nom_sg_possessive_3sg> ', dat_sg_possessive_1pl = '<nom_sg_possessive_1pl> ', dat_sg_possessive_2pl = '<nom_sg_possessive_2pl> ', dat_sg_possessive_3pl = '<nom_sg_possessive_3pl> ', gen_pl_possessive_1sg = '<nom_pl_possessive_1sg> ', gen_pl_possessive_2sg = '<nom_pl_possessive_2sg> ', gen_pl_possessive_3sg = '<nom_pl_possessive_3sg> ', gen_pl_possessive_1pl = '<nom_pl_possessive_1pl> ', gen_pl_possessive_2pl = '<nom_pl_possessive_2pl> ', gen_pl_possessive_3pl = '<nom_pl_possessive_3pl> ', acc_pl_possessive_1sg = '<nom_pl_possessive_1sg> ', acc_pl_possessive_2sg = '<nom_pl_possessive_2sg> ', acc_pl_possessive_3sg = '<nom_pl_possessive_3sg> ', acc_pl_possessive_1pl = '<nom_pl_possessive_1pl> ', acc_pl_possessive_2pl = '<nom_pl_possessive_2pl> ', acc_pl_possessive_3pl = '<nom_pl_possessive_3pl> ', loc_pl_possessive_1sg = '<nom_pl_possessive_1sg> ', loc_pl_possessive_2sg = '<nom_pl_possessive_2sg> ', loc_pl_possessive_3sg = '<nom_pl_possessive_3sg> ', loc_pl_possessive_1pl = '<nom_pl_possessive_1pl> ', loc_pl_possessive_2pl = '<nom_pl_possessive_2pl> ', loc_pl_possessive_3pl = '<nom_pl_possessive_3pl> ', abl_pl_possessive_1sg = '<nom_pl_possessive_1sg> ', abl_pl_possessive_2sg = '<nom_pl_possessive_2sg> ', abl_pl_possessive_3sg = '<nom_pl_possessive_3sg> ', abl_pl_possessive_1pl = '<nom_pl_possessive_1pl> ', abl_pl_possessive_2pl = '<nom_pl_possessive_2pl> ', abl_pl_possessive_3pl = '<nom_pl_possessive_3pl> ', dat_pl_possessive_1sg = '<nom_pl_possessive_1sg> ', dat_pl_possessive_2sg = '<nom_pl_possessive_2sg> ', dat_pl_possessive_3sg = '<nom_pl_possessive_3sg> ', dat_pl_possessive_1pl = '<nom_pl_possessive_1pl> ', dat_pl_possessive_2pl = '<nom_pl_possessive_2pl> ', dat_pl_possessive_3pl = '<nom_pl_possessive_3pl> ', },		singularia_tantum = { nom_pl = '—', gen_pl = '—', acc_pl = '—', loc_pl = '—', abl_pl = '—', dat_pl = '—', nom_pl_possessive_1sg = '—', nom_pl_possessive_2sg = '—', nom_pl_possessive_3sg = '—', nom_pl_possessive_1pl = '—', nom_pl_possessive_2pl = '—', nom_pl_possessive_3pl = '—', gen_pl_possessive_1sg = '—', gen_pl_possessive_2sg = '—', gen_pl_possessive_3sg = '—', gen_pl_possessive_1pl = '—', gen_pl_possessive_2pl = '—', gen_pl_possessive_3pl = '—', acc_pl_possessive_1sg = '—', acc_pl_possessive_2sg = '—', acc_pl_possessive_3sg = '—', acc_pl_possessive_1pl = '—', acc_pl_possessive_2pl = '—', acc_pl_possessive_3pl = '—', loc_pl_possessive_1sg = '—', loc_pl_possessive_2sg = '—', loc_pl_possessive_3sg = '—', loc_pl_possessive_1pl = '—', loc_pl_possessive_2pl = '—', loc_pl_possessive_3pl = '—', abl_pl_possessive_1sg = '—', abl_pl_possessive_2sg = '—', abl_pl_possessive_3sg = '—', abl_pl_possessive_1pl = '—', abl_pl_possessive_2pl = '—', abl_pl_possessive_3pl = '—', dat_pl_possessive_1sg = '—', dat_pl_possessive_2sg = '—', dat_pl_possessive_3sg = '—', dat_pl_possessive_1pl = '—', dat_pl_possessive_2pl = '—', dat_pl_possessive_3pl = '—', },	}, }