10,731
edits
TheNightAvl (talk | contribs) No edit summary |
TheNightAvl (talk | contribs) No edit summary |
||
Line 326: | Line 326: | ||
if adj_base then | if adj_base then | ||
--adjust definite article -- | --adjust definite article -- | ||
-- detect vocative | |||
if case == "voc" or case == "vocdu" or case == "vocpl" then | |||
definite = false | |||
adj_base = mw.ustring.gsub(adj_base, "^( ?)ag? ", "%1") | |||
adj_base = mw.ustring.gsub(adj_base, " ag? ", "") | |||
adj_base = mw.ustring.gsub(adj_base, "^( ?)[aiu] ", "%1") | |||
adj_base = mw.ustring.gsub(adj_base, " [aiu] ", "") | |||
-- detect inanimate -- | -- detect inanimate -- | ||
elseif mw.ustring.match(mw.ustring.lower(adj_base), "^( ?a [" .. C .. "])") or mw.ustring.match(adj_base, "^( ?ag )") or mw.ustring.match(mw.ustring.lower(adj_base), "( a [" .. C .. "])") or mw.ustring.match(adj_base, "( ag )") then | |||
definite = true | definite = true | ||
if oblique_pl[case] then | if oblique_pl[case] then | ||
Line 368: | Line 375: | ||
local i_initial = mw.ustring.match(mw.ustring.lower(base), "^([iíỉ])") | local i_initial = mw.ustring.match(mw.ustring.lower(base), "^([iíỉ])") | ||
local u_initial = mw.ustring.match(mw.ustring.lower(base), "^([uúủ])") | local u_initial = mw.ustring.match(mw.ustring.lower(base), "^([uúủ])") | ||
if gender == "in" then | if case == "voc" or case == "vocdu" or case == "vocpl" then | ||
definite = false | |||
elseif gender == "in" then | |||
if oblique_pl[case] then | if oblique_pl[case] then | ||
if i_initial then | if i_initial then | ||
Line 411: | Line 420: | ||
end | end | ||
end | end | ||
if case == "vocdu" then case = "nomdu" end | |||
if case == "vocpl" then case = "nompl" end | |||
if post then base = base .. post end | if post then base = base .. post end | ||
if args['alt' .. case] then | if args['alt' .. case] then | ||
Line 479: | Line 490: | ||
local nompl = get_forms("nompl", stems.nompl, adj_broken_e) | local nompl = get_forms("nompl", stems.nompl, adj_broken_e) | ||
local nompl_cite = get_forms("nompl", stems.nompl, adj_broken_e, "", true) | local nompl_cite = get_forms("nompl", stems.nompl, adj_broken_e, "", true) | ||
local vocpl = get_forms("vocpl", stems.nompl, adj_broken_e) | |||
local genpl = get_forms("genpl", stems.genpl .. "ris", adj, "eris") | local genpl = get_forms("genpl", stems.genpl .. "ris", adj, "eris") | ||
local genpl_short = get_forms("genpl_short", stems.genpl_short, adj, "es") | local genpl_short = get_forms("genpl_short", stems.genpl_short, adj, "es") | ||
Line 487: | Line 499: | ||
local nomdu = get_forms("nomdu", stems.dat .. "te", adj_broken_e) | local nomdu = get_forms("nomdu", stems.dat .. "te", adj_broken_e) | ||
local nomdu_cite = get_forms("nomdu", stems.dat .. "te", adj_broken_e, "", true) | local nomdu_cite = get_forms("nomdu", stems.dat .. "te", adj_broken_e, "", true) | ||
local vocdu = get_forms("vocdu", stems.dat .. "te", adj_broken_e) | |||
local gendu = get_forms("gendu", stems.dat .. "tis", adj, "eris") | local gendu = get_forms("gendu", stems.dat .. "tis", adj, "eris") | ||
local gendu_short = get_forms("gendu_short", stems.dat .. "ts", adj, "es") | local gendu_short = get_forms("gendu_short", stems.dat .. "ts", adj, "es") | ||
Line 556: | Line 569: | ||
else | else | ||
td(nom) | td(nom) | ||
td(nompl, 2) | if nompl == vocpl then td(nompl, 2) else td(nompl) end | ||
end | end | ||
_tr() | _tr() | ||
th("vocative", 1, 2) | th("vocative", 1, 2) | ||
if nom ~= nompl and nom ~= voc and table_type ~= "adj" then td(voc) end | if nom ~= nompl and nom ~= voc and table_type ~= "adj" then td(voc) end | ||
if nompl ~= vocpl then td(vocpl) end | |||
_tr() | _tr() | ||
th("genitive", 2, 1) | th("genitive", 2, 1) | ||
Line 592: | Line 606: | ||
if table_type == "adj" then td(anim_ins) end | if table_type == "adj" then td(anim_ins) end | ||
td(inspl) | td(inspl) | ||
tr_() | tr_() | ||
elseif table_type == "sg" then | elseif table_type == "sg" then | ||
Line 652: | Line 638: | ||
_tr() | _tr() | ||
th("nominative", 1, 2) | th("nominative", 1, 2) | ||
td(nompl, 2) | if nompl == vocpl then td(nompl, 2) else td(nompl) end | ||
_tr() | _tr() | ||
th("vocative", 1, 2) | th("vocative", 1, 2) | ||
if nompl ~= vocpl then td(vocpl) end | |||
_tr() | _tr() | ||
th("genitive", 2, 1) | th("genitive", 2, 1) | ||
Line 684: | Line 671: | ||
th("nominative", 1, 2) | th("nominative", 1, 2) | ||
if nom == voc then td(nom, 2) else td(nom) end | if nom == voc then td(nom, 2) else td(nom) end | ||
td(nomdu, 2) | if nomdu == vocdu then td(nomdu, 2) else td(nomdu) end | ||
td(nompl, 2) | if nompl == vocpl then td(nompl, 2) else td(nompl) end | ||
_tr() | _tr() | ||
th("vocative", 1, 2) | th("vocative", 1, 2) | ||
if nom ~= voc then td(voc) end | if nom ~= voc then td(voc) end | ||
if nomdu ~= vocdu then td(vocdu) end | |||
if nompl ~= vocpl then td(vocpl) end | |||
_tr() | _tr() | ||
th("genitive", 2, 1) | th("genitive", 2, 1) | ||
Line 722: | Line 711: | ||
_tr() | _tr() | ||
th("nominative", 1, 2) | th("nominative", 1, 2) | ||
td(nomdu, 2) | if nomdu == vocdu then td(nomdu, 2) else td(nomdu) end | ||
_tr() | _tr() | ||
th("vocative", 1, 2) | th("vocative", 1, 2) | ||
if nomdu ~= vocdu then td(vocdu) end | |||
_tr() | _tr() | ||
th("genitive", 2, 1) | th("genitive", 2, 1) |