Module:uz-inflection/data/uz-noun-test
- The following documentation is located at Module:uz-inflection/data/uz-noun-test/documentation. [edit] Categories were auto-generated by Module:module categorization. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • testcases • sandbox
Template to send generated word forms to
[edit]{{User:Vitalik/uz-decl-noun-table}}
Section affixes
[edit]Name | Value | Changes |
---|---|---|
genitive
|
"ning" | |
dative
|
"ga" | |
dative_k
|
"ka" | |
dative_q
|
"qa" | |
accusative
|
"ni" | |
locative
|
"da" | |
ablative
|
"dan" | |
pl
|
"lar" | "ar" (#4) |
interfix
|
"i" | "yi" (#9.2, #9.3) "" (#8, #9.1) |
possessive_first_sg
|
"m" | |
possessive_first_pl
|
"miz" | |
possessive_second_sg
|
"ng" | |
possessive_second_pl
|
"ngiz" | |
possessive_third
|
"i" | "si" (#8, #9.1, #9.2, #10) "yi" (#9.3) |
Section conditions
[edit]Arguments received from template
[edit]Name | Possible values |
---|---|
st
|
"1" (#17) |
type
|
"std" (#9.1, #9.4, #12, #13, #14.2) "yiyi" (#9.3, #9.4) "yisi" (#9.2, #9.4) "kq" (#14.1, #14.2) "reduced" (#15.1, #15.2) |
Created variables
[edit]Name | Possible values |
---|---|
base_possessive
|
base .replace(/.(.)$/, "%1") (#15.1)base .replace(/q$/, "gʻ") (#13)base .replace(/k$/, "g") (#12)base (#6, #14.1, #15.2)
|
show_possessive
|
"1" (#16.2) "" (#16.1) |
type_expected
|
"" (#16.2) "1" (#9.4, #14.2) |
Conditions and actions
[edit]№ | Conditions | Actions | |
---|---|---|---|
#1 | do anyway |
add class | |
#2 | IF word ends with: "k" |
add class | |
#3 | IF word ends with: "q" |
add class | |
#4 | 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 word ends with: "ll" |
set | ||
#5 | Section: Possessive forms | ||
#6 | do anyway |
set | |
#7 | Subsection: When last letter is vowel | ||
#8 | IF word ends with: "a" |
set | |
#9 | IF word ends with: "e", "i", "u", "o", "oʻ", "o`", "o'" | ||
#9.1 | IF argument type is equal to "std"
|
set | |
#9.2 | IF argument type is equal to "yisi"
|
set | |
#9.3 | IF argument type is equal to "yiyi"
|
set | |
#9.4 | IF argument type is not equal to "std", "yisi", "yiyi"
|
set | |
#10 | Subsection: When last letters are "iy" | ||
IF word ends with: "iy" |
set | ||
#11 | Subsection: When last letter is "k" or "q" | ||
#12 | IF (apply both conditions)
|
set | |
#13 | IF (apply both conditions)
|
set | |
#14 | IF word ends with: "k", "q" | ||
#14.1 | IF argument type is equal to "kq"
|
set | |
#14.2 | IF argument type is not equal to "std", "kq"
|
set | |
#15 | Subsection: When penultimate letter is vowel and last letter is consonant (except "y") | ||
IF (apply both conditions)
|
|||
#15.1 | IF argument type is equal to "reduced"
|
set | |
#15.2 | IF argument type is not equal to "reduced"
|
set | |
#16 | Subsection: Make decision to show/hide block "Possesive" | ||
#16.1 | IF variable type_expected is equal to "1"
|
set | |
#16.2 | IF variable type_expected is not equal to "1"
|
set | |
#17 | Section: If there are no plural forms | ||
Comment: This rule should be the last one. Otherwise — removing of plural form can be overriden by other classes | |||
IF argument st is equal to "1"
|
add class |
Section classes
[edit]Class common
[edit]Form | Value |
---|---|
nominative_sg
|
base
|
nominative_pl
|
base + pl
|
genitive_sg
|
base + genitive
|
genitive_pl
|
base + pl + genitive
|
dative_sg
|
base + dative
|
dative_pl
|
base + pl + dative
|
accusative_sg
|
base + accusative
|
accusative_pl
|
base + pl + accusative
|
locative_sg
|
base + locative
|
locative_pl
|
base + pl + locative
|
ablative_sg
|
base + ablative
|
ablative_pl
|
base + pl + ablative
|
show_possessive
|
show_possessive
|
type_expected
|
type_expected
|
Class dative_k
[edit]Form | Value |
---|---|
dative_sg
|
base + dative_k
|
Class dative_q
[edit]Form | Value |
---|---|
dative_sg
|
base + dative_q
|
Class possessive_nominative
[edit]Class possessive_other
[edit]Class singularia_tantum
[edit]Notes
[edit]- You can click on such elements as
variable
,argument
, #1,form
and you will go to the element's description or to the first mention about this element in documentation.
return {
template = 'User:Vitalik/uz-decl-noun-table',
affixes = {
genitive = 'ning',
accusative = 'ni',
locative = 'da',
ablative = 'dan',
dative = 'ga',
dative_k = 'ka',
dative_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 = {
{
actions = {{'add_class', 'common'}},
},
{
last = 'k', -- if last letter is 'k'
actions = {{'add_class', 'dative_k'}}
},
{
last = 'q', -- if last letter is 'q'
actions = {{'add_class', 'dative_q'}}
},
{
comment = 'If two last letters are identical to first letter of declension ending — then we need to leave only two letters from three.<br/> For example, metall + lar = metallar',
last = 'll', -- if last letters are 'll'
actions = {{'set', 'pl', 'ar'}}
},
{
section = 'Possessive forms'
},
{
actions = {
{'set', 'base_possessive', '<base>'},
{'add_class', 'possessive_nominative'},
{'add_class', 'possessive_other'},
}
},
{
subsection = 'When last letter is vowel',
},
{
last = 'a',
actions = {
{'set', 'interfix', ''},
{'set', 'possessive_third', 'si'},
}
},
{
last = {'e', 'i', 'u', 'o', 'oʻ', 'o`', "o'"},
sub_conditions = {
{
arg_type = 'std',
actions = {
{'set', 'interfix', ''},
{'set', 'possessive_third', 'si'},
}
},
{
arg_type = 'yisi',
actions = {
{'set', 'interfix', 'yi'},
{'set', 'possessive_third', 'si'},
}
},
{
arg_type = 'yiyi',
actions = {
{'set', 'interfix', 'yi'},
{'set', 'possessive_third', 'yi'},
}
},
{
arg_type_NOT = {'std', 'yisi', 'yiyi'},
actions = {{'set', 'type_expected', '1'}}
},
},
},
{
subsection = 'When last letters are "iy"',
last = 'iy',
actions = {{'set', 'possessive_third', 'si'}}
},
{
subsection = 'When last letter is "k" or "q"',
},
{
last = 'k',
arg_type = 'std',
actions = {{'set', 'base_possessive', {'replace', 'base', 'k$', 'g'}}}
},
{
last = 'q',
arg_type = 'std',
actions = {{'set', 'base_possessive', {'replace', 'base', 'q$', 'gʻ'}}}
},
{
last = {'k', 'q'},
sub_conditions = {
{
arg_type = 'kq',
actions = {{'set', 'base_possessive', '<base>'}}
},
{
arg_type_NOT = {'std', 'kq'},
actions = {{'set', 'type_expected', '1'}}
},
},
},
{
subsection = 'When penultimate letter is vowel and last letter is consonant (except "y")',
pre_last = {'a', 'e', 'i', 'u', 'o', 'oʻ', 'o`', "o'"},
last_NOT = {'a', 'e', 'i', 'u', 'o', 'oʻ', 'o`', "o'", 'y', 'k', 'q'},
sub_conditions = {
{
arg_type = 'reduced',
actions = {{'set', 'base_possessive', {'replace', 'base', '.(.)$', '%1'}}} -- but we don't process case with apostrophe at the end..
},
{
arg_type_NOT = 'reduced',
actions = {{'set', 'base_possessive', '<base>'}}
},
},
},
{
subsection = 'Make decision to show/hide block "Possesive"',
sub_conditions = {
{
var_type_expected = '1',
actions = {{'set', 'show_possessive', ''}}
},
{
var_type_expected_NOT = '1',
actions = {
{'set', 'show_possessive', '1'},
{'set', 'type_expected', ''}, -- just to create empty variable to send to template
}
},
},
},
{
section = 'If there are no plural forms',
comment = 'This rule should be the last one. Otherwise — removing of plural form can be overriden by other classes',
arg_st = '1', -- if we've received argument "st" equals to "1"
actions = {{'add_class', 'singularia_tantum'}}
},
},
classes = {
common = {
nominative_sg = '<base>',
genitive_sg = '<base><genitive>',
accusative_sg = '<base><accusative>',
locative_sg = '<base><locative>',
ablative_sg = '<base><ablative>',
dative_sg = '<base><dative>',
nominative_pl = '<base><pl>',
genitive_pl = '<base><pl><genitive>',
accusative_pl = '<base><pl><accusative>',
locative_pl = '<base><pl><locative>',
ablative_pl = '<base><pl><ablative>',
dative_pl = '<base><pl><dative>',
show_possessive = '<show_possessive>',
type_expected = '<type_expected>',
},
dative_k = {
dative_sg = '<base><dative_k>' -- if -k then -kka
},
dative_q = {
dative_sg = '<base><dative_q>' -- if -q then -qqa
},
possessive_nominative = {
nominative_sg_possessive_1sg = '<base_possessive><interfix><possessive_first_sg>',
nominative_sg_possessive_2sg = '<base_possessive><interfix><possessive_second_sg>',
nominative_sg_possessive_3sg = '<base_possessive><possessive_third>',
nominative_sg_possessive_1pl = '<base_possessive><interfix><possessive_first_pl>',
nominative_sg_possessive_2pl = '<base_possessive><interfix><possessive_second_pl>',
nominative_sg_possessive_3pl = '<base_possessive><possessive_third>',
nominative_pl_possessive_1sg = '<base><pl>i<possessive_first_sg>',
nominative_pl_possessive_2sg = '<base><pl>i<possessive_second_sg>',
nominative_pl_possessive_3sg = '<base><pl>i',
nominative_pl_possessive_1pl = '<base><pl>i<possessive_first_pl>',
nominative_pl_possessive_2pl = '<base><pl>i<possessive_second_pl>',
nominative_pl_possessive_3pl = '<base><pl>i',
},
possessive_other = {
genitive_sg_possessive_1sg = '<nominative_sg_possessive_1sg><genitive>',
genitive_sg_possessive_2sg = '<nominative_sg_possessive_2sg><genitive>',
genitive_sg_possessive_3sg = '<nominative_sg_possessive_3sg><genitive>',
genitive_sg_possessive_1pl = '<nominative_sg_possessive_1pl><genitive>',
genitive_sg_possessive_2pl = '<nominative_sg_possessive_2pl><genitive>',
genitive_sg_possessive_3pl = '<nominative_sg_possessive_3pl><genitive>',
accusative_sg_possessive_1sg = '<nominative_sg_possessive_1sg><accusative>',
accusative_sg_possessive_2sg = '<nominative_sg_possessive_2sg><accusative>',
accusative_sg_possessive_3sg = '<nominative_sg_possessive_3sg><accusative>',
accusative_sg_possessive_1pl = '<nominative_sg_possessive_1pl><accusative>',
accusative_sg_possessive_2pl = '<nominative_sg_possessive_2pl><accusative>',
accusative_sg_possessive_3pl = '<nominative_sg_possessive_3pl><accusative>',
locative_sg_possessive_1sg = '<nominative_sg_possessive_1sg><locative>',
locative_sg_possessive_2sg = '<nominative_sg_possessive_2sg><locative>',
locative_sg_possessive_3sg = '<nominative_sg_possessive_3sg><locative>',
locative_sg_possessive_1pl = '<nominative_sg_possessive_1pl><locative>',
locative_sg_possessive_2pl = '<nominative_sg_possessive_2pl><locative>',
locative_sg_possessive_3pl = '<nominative_sg_possessive_3pl><locative>',
ablative_sg_possessive_1sg = '<nominative_sg_possessive_1sg><ablative>',
ablative_sg_possessive_2sg = '<nominative_sg_possessive_2sg><ablative>',
ablative_sg_possessive_3sg = '<nominative_sg_possessive_3sg><ablative>',
ablative_sg_possessive_1pl = '<nominative_sg_possessive_1pl><ablative>',
ablative_sg_possessive_2pl = '<nominative_sg_possessive_2pl><ablative>',
ablative_sg_possessive_3pl = '<nominative_sg_possessive_3pl><ablative>',
dative_sg_possessive_1sg = '<nominative_sg_possessive_1sg><dative>',
dative_sg_possessive_2sg = '<nominative_sg_possessive_2sg><dative>',
dative_sg_possessive_3sg = '<nominative_sg_possessive_3sg><dative>',
dative_sg_possessive_1pl = '<nominative_sg_possessive_1pl><dative>',
dative_sg_possessive_2pl = '<nominative_sg_possessive_2pl><dative>',
dative_sg_possessive_3pl = '<nominative_sg_possessive_3pl><dative>',
genitive_pl_possessive_1sg = '<nominative_pl_possessive_1sg><genitive>',
genitive_pl_possessive_2sg = '<nominative_pl_possessive_2sg><genitive>',
genitive_pl_possessive_3sg = '<nominative_pl_possessive_3sg><genitive>',
genitive_pl_possessive_1pl = '<nominative_pl_possessive_1pl><genitive>',
genitive_pl_possessive_2pl = '<nominative_pl_possessive_2pl><genitive>',
genitive_pl_possessive_3pl = '<nominative_pl_possessive_3pl><genitive>',
accusative_pl_possessive_1sg = '<nominative_pl_possessive_1sg><accusative>',
accusative_pl_possessive_2sg = '<nominative_pl_possessive_2sg><accusative>',
accusative_pl_possessive_3sg = '<nominative_pl_possessive_3sg><accusative>',
accusative_pl_possessive_1pl = '<nominative_pl_possessive_1pl><accusative>',
accusative_pl_possessive_2pl = '<nominative_pl_possessive_2pl><accusative>',
accusative_pl_possessive_3pl = '<nominative_pl_possessive_3pl><accusative>',
locative_pl_possessive_1sg = '<nominative_pl_possessive_1sg><locative>',
locative_pl_possessive_2sg = '<nominative_pl_possessive_2sg><locative>',
locative_pl_possessive_3sg = '<nominative_pl_possessive_3sg><locative>',
locative_pl_possessive_1pl = '<nominative_pl_possessive_1pl><locative>',
locative_pl_possessive_2pl = '<nominative_pl_possessive_2pl><locative>',
locative_pl_possessive_3pl = '<nominative_pl_possessive_3pl><locative>',
ablative_pl_possessive_1sg = '<nominative_pl_possessive_1sg><ablative>',
ablative_pl_possessive_2sg = '<nominative_pl_possessive_2sg><ablative>',
ablative_pl_possessive_3sg = '<nominative_pl_possessive_3sg><ablative>',
ablative_pl_possessive_1pl = '<nominative_pl_possessive_1pl><ablative>',
ablative_pl_possessive_2pl = '<nominative_pl_possessive_2pl><ablative>',
ablative_pl_possessive_3pl = '<nominative_pl_possessive_3pl><ablative>',
dative_pl_possessive_1sg = '<nominative_pl_possessive_1sg><dative>',
dative_pl_possessive_2sg = '<nominative_pl_possessive_2sg><dative>',
dative_pl_possessive_3sg = '<nominative_pl_possessive_3sg><dative>',
dative_pl_possessive_1pl = '<nominative_pl_possessive_1pl><dative>',
dative_pl_possessive_2pl = '<nominative_pl_possessive_2pl><dative>',
dative_pl_possessive_3pl = '<nominative_pl_possessive_3pl><dative>',
},
singularia_tantum = {
nominative_pl = '—',
genitive_pl = '—',
accusative_pl = '—',
locative_pl = '—',
ablative_pl = '—',
dative_pl = '—',
nominative_pl_possessive_1sg = '—',
nominative_pl_possessive_2sg = '—',
nominative_pl_possessive_3sg = '—',
nominative_pl_possessive_1pl = '—',
nominative_pl_possessive_2pl = '—',
nominative_pl_possessive_3pl = '—',
genitive_pl_possessive_1sg = '—',
genitive_pl_possessive_2sg = '—',
genitive_pl_possessive_3sg = '—',
genitive_pl_possessive_1pl = '—',
genitive_pl_possessive_2pl = '—',
genitive_pl_possessive_3pl = '—',
accusative_pl_possessive_1sg = '—',
accusative_pl_possessive_2sg = '—',
accusative_pl_possessive_3sg = '—',
accusative_pl_possessive_1pl = '—',
accusative_pl_possessive_2pl = '—',
accusative_pl_possessive_3pl = '—',
locative_pl_possessive_1sg = '—',
locative_pl_possessive_2sg = '—',
locative_pl_possessive_3sg = '—',
locative_pl_possessive_1pl = '—',
locative_pl_possessive_2pl = '—',
locative_pl_possessive_3pl = '—',
ablative_pl_possessive_1sg = '—',
ablative_pl_possessive_2sg = '—',
ablative_pl_possessive_3sg = '—',
ablative_pl_possessive_1pl = '—',
ablative_pl_possessive_2pl = '—',
ablative_pl_possessive_3pl = '—',
dative_pl_possessive_1sg = '—',
dative_pl_possessive_2sg = '—',
dative_pl_possessive_3sg = '—',
dative_pl_possessive_1pl = '—',
dative_pl_possessive_2pl = '—',
dative_pl_possessive_3pl = '—',
},
},
}