Module:User:Tom 144/sandbox

local p = {}

function p.table_(input_) local out = { [1] = '{| class="inflection-table vsSwitcher autocollapsed" data-toggle-category="inflection" style="background:#FF; text-align:center; border: 0.5px solid #CCC;"\n|- style="background: #C9F4F4"\n! class="vsToggleElement" style="text-align: center; width:20em" colspan="5" |', [3] = '\n|- class="vsHide"\n! style="background-color:#C9F4F4; min-width: 5em" colspan="1" |', [5] = '\n! style="background-color:#C9F4F4; min-width: 12em" |singular\n! style="background-color:#C9F4F4; min-width: 12em" |dual\n! style="background-color:#C9F4F4; min-width: 12em" |plural\n|- class="vsHide"\n! style="background-color:#EBF8F8; min-width: 5em" rowspan="2" | nominative\n| style="background-color:#ffffff; font-size: 100%;" |', [7] = '\n| style="background-color:#ffffff; font-size: 100%;" |', [9] = '\n| style="background-color:#ffffff; font-size: 100%;" |', [11] = '\n|- class="vsHide"\n| style="background-color:#ffffff; font-size: 95%; color:gray;" |', [13] = '\n| style="background-color:#ffffff; font-size: 95%; color:gray;" |', [15] = '\n| style="background-color:#ffffff; font-size: 95%; color:gray;" |', [17] = '\n|- class="vsHide"\n! style="background-color:#EBF8F8; min-width: 5em" rowspan="2" | genitive\n| style="background-color:#ffffff; font-size: 100%;" |', [19] = '\n| style="background-color:#ffffff; font-size: 100%;" |', [21] = '\n| style="background-color:#ffffff; font-size: 100%;" |', [23] = '\n|- class="vsHide"\n| style="background-color:#ffffff; font-size: 95%; color:gray;" |', [25] = '\n| style="background-color:#ffffff; font-size: 95%; color:gray;" |', [27] = '\n| style="background-color:#ffffff; font-size: 95%; color:gray;" |', [29] = '\n|- class="vsHide"\n! style="background-color:#EBF8F8; min-width: 5em" rowspan="2" | accusative\n| style="background-color:#ffffff; font-size: 100%;"|', [31] = '\n| style="background-color:#ffffff; font-size: 100%;"|', [33] = '\n| style="background-color:#ffffff; font-size: 100%;"|', [35] = '\n|- class="vsHide"\n| style="background-color:#ffffff; font-size: 95%; color:gray;" |', [37] = '\n| style="background-color:#ffffff; font-size: 95%; color:gray;" |', [39] = '\n| style="background-color:#ffffff; font-size: 95%; color:gray;" |', [41] = '\n|- class="vsHide"\n! style="background-color:#EBF8F8; min-width: 5em" rowspan="2" | Bound form\n| style="background-color:#ffffff; font-size: 100%;" |', [43] = '\n|- class="vsHide"\n| style="background-color:#ffffff; font-size: 95%; color:gray;" |', [45] = '\n|- class="vsHide"\n| style="font-size:85%; text-align:center; background-color:#ffffff" colspan="4" | This table gives Old Babylonian inflection. For declension in other dialects, see Appendix:Akkadian dialectal declension.\n|}', }	for i = 2,44,2 do		local j = i/2 out[i] = input_[j] end return table.concat(out, '') end

function p.noun_inflection(frame) -- 1. gender: 'm' or 'f'   -- 2. weakness: '' or 'a' or 'i' or 'ā' -- 3. sg: 'true' or 'false' -- 3. du: 'true' or 'false' -- 3. pl: 'true' or 'false' if frame.args[1] == 'm' then local stem = frame.args[2] local test = {'Transcription', 'masculine', stem..'um', stem..'ān', stem..'ū', , , '', 			stem..'im', stem..'īn', stem..'ī', , , '',			stem..'am', stem..'īn', stem..'ī', , , '', '20', '21'}		return p.table_(test) else if frame.args[1] == 'f' then local stem = frame.args[2]

end

end

return p

end