Module:siwa-noun: Difference between revisions

No edit summary
No edit summary
Line 105: Line 105:
m_data[decl_type](args, data)
m_data[decl_type](args, data)
end
end
 
local cag = {"u", "m", "ine", "ill", "ela", "ade", "all", "abl", "u_sg", "m_sg", "u_pl", "m_pl"}
for _, infl in ipairs(cag) do
data.forms[infl] = args[infl] or data.forms[infl]
end
-- Make the table
-- Make the table
return make_table(data, parent_args)
return make_table(data)
end
end


function make_table(data, args)
function make_table(data)


local function show_form(form)
local function show_form(form)
Line 119: Line 125:
local ret = {}
local ret = {}
for key, subform in pairs(form) do
for _, subform in ipairs(form) do
table.insert(ret, subform)
table.insert(ret, subform)
end
end
Line 151: Line 157:
end
end


function export.make_cases(data, args, animacy)
function export.make_cases(data, animacy)
local cases = {"inessive", "illative", "elative", "adessive", "allative", "ablative"}
local cases = {"inessive", "illative", "elative", "adessive", "allative", "ablative"}
local all = {"u", "m"}
local all = {"u", "m"}
Line 164: Line 170:
table.insert(ret, "|-\n")
table.insert(ret, "|-\n")
for _, single in ipairs(all) do
for _, single in ipairs(all) do
table.insert(ret, "| " .. link(show_form(args[single] or data.forms[single])) .. "\n")
table.insert(ret, "| " .. link(show_form(data.forms[single])) .. "\n")
end
end
Line 183: Line 189:
! rowspan=2 | Unmarked<br>''agentive/dative'' !! rowspan=2 | Marked<br>''patientive/genitive'' !! colspan="6" | Locative
! rowspan=2 | Unmarked<br>''agentive/dative'' !! rowspan=2 | Marked<br>''patientive/genitive'' !! colspan="6" | Locative
|-
|-
]=] .. export.make_cases(data, args) .. [=[
]=] .. export.make_cases(data) .. [=[
|}</div></div>]=]
|}</div></div>]=]


Line 191: Line 197:
! Unmarked<br>''agentive/dative'' !! Marked<br>''patientive/genitive''
! Unmarked<br>''agentive/dative'' !! Marked<br>''patientive/genitive''
|-
|-
]=] .. export.make_cases(data, args) .. [=[
]=] .. export.make_cases(data) .. [=[
|}</div></div>]=]
|}</div></div>]=]