Module:Chak-verbs: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary Tag: Manual revert |
||
(133 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
export = {} | |||
require("Module:Chak-verbs/format") | |||
require("Module:Chak-verbs/new format") | |||
require("Module:Chak-verbs/data") | |||
require("Module:Chak-verbs/new data") | |||
m_params = require("Module:Parameters") | |||
m_vars = require("Module:Variables") | |||
m_cu = require("Module:Chak-utilities") | |||
m_stru = require("Module:String utilities") | |||
local lang = require("Module:Languages").getByCode("chak") | |||
function export.get_forms(root,mod,manual) | |||
mod = mod or '' | |||
local forms = {} | |||
[ | local patterns = {} | ||
[ | |||
[ | local head = "" | ||
local vowel = "" | |||
local vowel2 = "" | |||
[" | local root = m_cu.parse_root(root..mod,true) | ||
[" | |||
[" | local tail = mw.text.split(root[#root],"-") | ||
[" | |||
[ | if #root == 1 then | ||
head = tail[1] | |||
[ | vowel = 'a' | ||
table.remove(tail,1) | |||
if #tail == 1 then | |||
vowel2 = vowel | |||
end | |||
elseif #root == 2 then | |||
vowel2 = root[1] | |||
vowel = m_cu.degeminate_char(root[1]) | |||
else | |||
table.remove(root,#root) | |||
vowel2 = root[#root] | |||
vowel = m_cu.degeminate_char(root[#root]) | |||
table.remove(root,#root) | |||
head = table.concat(root) | |||
end | |||
if #tail == 1 then | |||
patterns = NOMOD_PATTERNS | |||
elseif #tail == 2 then | |||
patterns = ONEMOD_PATTERNS | |||
elseif #tail == 3 then | |||
patterns = TWOMOD_PATTERNS | |||
end | |||
for k,v in pairs(patterns) do | |||
forms[k] = string.gsub(v,"C",head) | |||
forms[k] = string.gsub(forms[k],"V",vowel) | |||
forms[k] = string.gsub(forms[k],"E",vowel2) | |||
forms[k] = string.gsub(forms[k],"1",tail[1]) | |||
forms[k] = string.gsub(forms[k],"2",tail[2] or '') | |||
forms[k] = string.gsub(forms[k],"3",tail[3] or '') | |||
end | |||
for k,v in pairs(forms) do | |||
forms[k] = m_cu.assimilate(v) | |||
[ | forms[k] = m_cu.prothetic(forms[k]) | ||
end | |||
[ | |||
for k,v in pairs(manual) do | |||
forms[k] = v | |||
end | |||
[ | |||
mw.logObject(forms) | |||
return forms | |||
end | |||
function export.get_stems(root_str) | |||
if root_str == nil then | |||
error("Root is required") | |||
end | |||
root_str = string.gsub(root_str,"-","") | |||
local stems = {} | |||
local tail = {} | |||
local vowel = '' | |||
local | local root = m_cu.parse_root(root_str,true) | ||
if | if not root or #root == 0 then | ||
error(" | error ("No root provided.") | ||
elseif #root == 1 and string.find(root[1],"["..VOWELS.."]") then | |||
error ("Invalid root: "..root_str) | |||
elseif #root == 1 and string.find(root[1],"[^"..VOWELS.."]") then | |||
tail = mw.text.split(root[1],"-") | |||
if #tail == 2 then | |||
stems[1] = tail[1].."a"..tail[2] | |||
stems[2] = tail[1].."a"..m_cu.geminate_char(tail[2]) | |||
elseif #tail == 3 then | |||
stems[1] = 'a'..tail[1]..tail[2]..'aa'..tail[3] | |||
stems[2] = tail[1]..'a'..tail[2]..tail[3] | |||
stems[3] = tail[1]..'a'..m_cu.geminate_char(tail[2])..'uu'..tail[3] | |||
stems[4] = tail[1]..'a'..m_cu.geminate_char(tail[2])..'u'..tail[3] | |||
stems[5] = 'a'..tail[1]..tail[2]..'a'..tail[3] | |||
elseif #tail == 4 then | |||
end | |||
else | else | ||
stems[1] = | local tail_str = root[#root] | ||
stems[2] = | tail = mw.text.split(tail_str,"-") | ||
table.remove(root,#root) | |||
vowel = root[#root] | |||
cond_vowel = m_cu.degeminate_char(m_cu.condense_vowels(vowel)) | |||
table.remove(root,#root) | |||
concat_root = table.concat(root) | |||
if #tail == 1 then | |||
stems[1] = concat_root..vowel..tail[1] | |||
stems[2] = concat_root..cond_vowel..m_cu.geminate_char(tail[1]) | |||
elseif #tail == 2 then | |||
stems[1] = concat_root..vowel..tail[1]..'aa'..tail[2] | |||
stems[2] = concat_root..cond_vowel..tail[1]..tail[2] | |||
stems[3] = concat_root..cond_vowel..m_cu.geminate_char(tail[1])..'uu'..tail[2] | |||
stems[4] = concat_root..cond_vowel..m_cu.geminate_char(tail[1])..'u'..tail[2] | |||
stems[5] = concat_root..vowel..tail[1]..'a'..tail[2] | |||
elseif #tail == 3 then | |||
stems[1] = concat_root..vowel..tail[1]..'aa'..tail[2]..'a'..tail[3] | |||
stems[2] = concat_root..cond_vowel..tail[1]..tail[2]..'a'..tail[3] | |||
stems[3] = concat_root..cond_vowel..m_cu.geminate_char(tail[1])..'uu'..tail[2]..'u'..tail[3] | |||
stems[4] = concat_root..cond_vowel..m_cu.geminate_char(tail[1])..'u'..tail[2]..'u'..tail[3] | |||
stems[5] = concat_root..vowel..tail[1]..'a'..tail[2]..'a'..tail[3] | |||
end | |||
if m_cu.is_geminate(root[1]) then | |||
for i in ipairs(stems) do | |||
stems[i] = vowel..stems[i] | |||
end | |||
end | |||
end | end | ||
return stems | return stems | ||
end | |||
end | |||
function | function export.old_get_forms(root,mod,manual_stems,other_manual) | ||
local | local forms = {} | ||
tail = mod or '' | |||
local stems = export.get_stems(root..tail) | |||
--Overwrite stems with any specified | |||
for i=1,5 do | |||
if manual_stems[i] ~= nil then | |||
stems[i] = manual_stems[i] | |||
end | |||
end | |||
local full_form = '' | |||
if | if mod == nil or mod == '' then | ||
for _,form in ipairs(FORMS) do | |||
full_form = 'std.ipfv.'..form[1] | |||
forms[full_form] = stems[1]..UNMOD_SUFFIXES[full_form] | |||
full_form = 'std.pfv.'..form[1] | |||
forms[full_form] = stems[2]..UNMOD_SUFFIXES[full_form] | |||
full_form = 'caus.ipfv.'..form[1] | |||
forms[full_form] = stems[2]..UNMOD_SUFFIXES[full_form] | |||
full_form = 'caus.pfv.'..form[1] | |||
forms[full_form] = stems[2]..UNMOD_SUFFIXES[full_form] | |||
full_form = 'pass.ipfv.'..form[1] | |||
forms[full_form] = stems[1]..UNMOD_SUFFIXES[full_form] | |||
full_form = 'pass.pfv.'..form[1] | |||
forms[full_form] = stems[2]..UNMOD_SUFFIXES[full_form] | |||
end | |||
full_form = "std.imp" | |||
forms[full_form] = stems[1]..UNMOD_SUFFIXES[full_form] | |||
full_form = "caus.imp" | |||
forms[full_form] = stems[2]..UNMOD_SUFFIXES[full_form] | |||
full_form = "pass.imp" | |||
forms[full_form] = stems[1]..UNMOD_SUFFIXES[full_form] | |||
else | else | ||
for _,form in ipairs(FORMS) do | |||
full_form = 'std.ipfv.'..form[1] | |||
forms[full_form] = stems[1]..MOD_SUFFIXES[full_form] | |||
full_form = 'std.pfv.'..form[1] | |||
forms[full_form] = stems[2]..MOD_SUFFIXES[full_form] | |||
full_form = 'caus.ipfv.'..form[1] | |||
forms[full_form] = stems[3]..MOD_SUFFIXES[full_form] | |||
full_form = 'caus.pfv.'..form[1] | |||
forms[full_form] = stems[4]..MOD_SUFFIXES[full_form] | |||
full_form = 'pass.ipfv.'..form[1] | |||
forms[full_form] = stems[1]..MOD_SUFFIXES[full_form] | |||
full_form = 'pass.pfv.'..form[1] | |||
forms[full_form] = stems[2]..MOD_SUFFIXES[full_form] | |||
end | |||
full_form = "std.imp" | |||
forms[full_form] = stems[2]..MOD_SUFFIXES[full_form] | |||
full_form = "caus.imp" | |||
forms[full_form] = stems[4]..MOD_SUFFIXES[full_form] | |||
full_form = "pass.imp" | |||
forms[full_form] = stems[2]..MOD_SUFFIXES[full_form] | |||
-- Overwriting standard and passive infinitives since they don't fit the patter, | |||
-- Bit of a hack I know. | |||
full_form = "std.ipfv.inf" | |||
forms[full_form] = stems[5]..MOD_SUFFIXES[full_form] | |||
full_form = "pass.ipfv.inf" | |||
forms[full_form] = stems[5]..MOD_SUFFIXES[full_form] | |||
end | end | ||
for k,v in pairs(forms) do | |||
forms[k] = m_cu.assimilate(v) | |||
end | |||
for k,v in pairs(other_manual) do | |||
if UNMOD_SUFFIXES[k] ~= nil then | |||
forms[k] = v | |||
end | |||
end | |||
return forms | |||
end | end | ||
function | function export.get_infinitives(root,mod,manual_stems,other_manual) | ||
local | --local stems = get_stems(root,mod) | ||
tail = mod or '' | |||
local stems = export.get_stems(root..tail) | |||
for i=1,5 do | |||
if manual_stems[i] ~= nil then | |||
stems[i] = manual_stems[i] | |||
end | |||
end | |||
local | local infinitives={} | ||
if mod == nil then | |||
infinitives["std.ipfv.inf"] = stems[1]..UNMOD_SUFFIXES["std.ipfv.inf"] | |||
infinitives["std.pfv.inf"] = stems[2]..UNMOD_SUFFIXES["std.pfv.inf"] | |||
infinitives["caus.ipfv.inf"] = stems[2]..UNMOD_SUFFIXES["caus.ipfv.inf"] | |||
infinitives["caus.pfv.inf"] = stems[2]..UNMOD_SUFFIXES["caus.pfv.inf"] | |||
infinitives["pass.ipfv.inf"] = stems[1]..UNMOD_SUFFIXES["pass.ipfv.inf"] | |||
infinitives["pass.pfv.inf"] = stems[2]..UNMOD_SUFFIXES["pass.pfv.inf"] | |||
else | |||
infinitives["std.ipfv.inf"] = stems[5]..MOD_SUFFIXES["std.ipfv.inf"] | |||
infinitives["std.pfv.inf"] = stems[2]..MOD_SUFFIXES["std.pfv.inf"] | |||
infinitives["caus.ipfv.inf"] = stems[3]..MOD_SUFFIXES["caus.ipfv.inf"] | |||
infinitives["caus.pfv.inf"] = stems[4]..MOD_SUFFIXES["caus.pfv.inf"] | |||
infinitives["pass.ipfv.inf"] = stems[5]..MOD_SUFFIXES["pass.ipfv.inf"] | |||
infinitives["pass.pfv.inf"] = stems[2]..MOD_SUFFIXES["pass.pfv.inf"] | |||
end | |||
for k,v in pairs(infinitives) do | |||
infinitives[k] = m_cu.assimilate(v) | |||
end | |||
for k,v in pairs(other_manual) do | |||
if UNMOD_SUFFIXES[k] ~= nil then | |||
infinitives[k] = v | |||
end | |||
end | end | ||
return infinitives | |||
end | |||
function link(word) | |||
local data = { | |||
["term"] = word, | |||
["lang"] = lang | |||
} | |||
return require("Module:Links").full_link(data,nil,false) | |||
return | end | ||
function export.show_conjugations(root,mod,others) | |||
local forms = {} | |||
forms = export.get_forms(root,mod,others) | |||
return m_stru.format(new_conj_table,forms) | |||
end | end | ||
function | function export.conjugations(frame) | ||
return | |||
local params = { | |||
[1] = {alias_of = "root"}, | |||
[2] = {alias_of = "mod"}, | |||
["root"] = { default = m_vars.var('chak-root') }, | |||
["mod"] = { default = m_vars.var('chak-mod') }, | |||
["stem"] = {list = true, require_index = true, allow_holes = true}, | |||
} | |||
local frame_args = frame:getParent().args | |||
local args,others = m_params.process(frame_args,params,true) | |||
local stems = {} | |||
for i=1,5 do | |||
stems[i] = args["stem"][i] | |||
end | |||
return export.show_conjugations(args["root"],args["mod"],others) | |||
end | end | ||
function | function export.headword(frame) | ||
local params = { | |||
[1] = {alias_of = "root"}, | |||
[2] = {alias_of = "mod"}, | |||
["root"] = { default = m_vars.var('chak-root') }, | |||
["mod"] = { default = m_vars.var('chak-mod') }, | |||
} | |||
local frame_args = frame:getParent().args | |||
local args,others = m_params.process(frame_args,params,true) | |||
if args["mod"] == '' then | |||
args["mod"] = nil | |||
end | |||
infinitives = export.get_infinitives(args["root"],args["mod"],{},others) | |||
local output = "" | |||
output = output.."''(perfect infinitive'' "..link(infinitives["std.pfv.inf"]) | |||
output = output..", ''causative infinitives'' "..link(infinitives["caus.ipfv.inf"]).." / "..link(infinitives["caus.pfv.inf"]) | |||
output = output..", ''passive infinitives'' "..link(infinitives["pass.ipfv.inf"]).." / "..link(infinitives["pass.pfv.inf"]) | |||
output = output.."'')''" | |||
return output | |||
end | end | ||
return export | |||
return |
Latest revision as of 14:48, 21 July 2024
- The following documentation is located at Module:Chak-verbs/documentation. [edit]
- Useful links: subpage list • transclusions • testcases • sandbox
Implements {{chak-verb}}
and {{chak-conj}}
Note: Formatting for tables is defined in Module:Chak-verbs/format.
export = {}
require("Module:Chak-verbs/format")
require("Module:Chak-verbs/new format")
require("Module:Chak-verbs/data")
require("Module:Chak-verbs/new data")
m_params = require("Module:Parameters")
m_vars = require("Module:Variables")
m_cu = require("Module:Chak-utilities")
m_stru = require("Module:String utilities")
local lang = require("Module:Languages").getByCode("chak")
function export.get_forms(root,mod,manual)
mod = mod or ''
local forms = {}
local patterns = {}
local head = ""
local vowel = ""
local vowel2 = ""
local root = m_cu.parse_root(root..mod,true)
local tail = mw.text.split(root[#root],"-")
if #root == 1 then
head = tail[1]
vowel = 'a'
table.remove(tail,1)
if #tail == 1 then
vowel2 = vowel
end
elseif #root == 2 then
vowel2 = root[1]
vowel = m_cu.degeminate_char(root[1])
else
table.remove(root,#root)
vowel2 = root[#root]
vowel = m_cu.degeminate_char(root[#root])
table.remove(root,#root)
head = table.concat(root)
end
if #tail == 1 then
patterns = NOMOD_PATTERNS
elseif #tail == 2 then
patterns = ONEMOD_PATTERNS
elseif #tail == 3 then
patterns = TWOMOD_PATTERNS
end
for k,v in pairs(patterns) do
forms[k] = string.gsub(v,"C",head)
forms[k] = string.gsub(forms[k],"V",vowel)
forms[k] = string.gsub(forms[k],"E",vowel2)
forms[k] = string.gsub(forms[k],"1",tail[1])
forms[k] = string.gsub(forms[k],"2",tail[2] or '')
forms[k] = string.gsub(forms[k],"3",tail[3] or '')
end
for k,v in pairs(forms) do
forms[k] = m_cu.assimilate(v)
forms[k] = m_cu.prothetic(forms[k])
end
for k,v in pairs(manual) do
forms[k] = v
end
mw.logObject(forms)
return forms
end
function export.get_stems(root_str)
if root_str == nil then
error("Root is required")
end
root_str = string.gsub(root_str,"-","")
local stems = {}
local tail = {}
local vowel = ''
local root = m_cu.parse_root(root_str,true)
if not root or #root == 0 then
error ("No root provided.")
elseif #root == 1 and string.find(root[1],"["..VOWELS.."]") then
error ("Invalid root: "..root_str)
elseif #root == 1 and string.find(root[1],"[^"..VOWELS.."]") then
tail = mw.text.split(root[1],"-")
if #tail == 2 then
stems[1] = tail[1].."a"..tail[2]
stems[2] = tail[1].."a"..m_cu.geminate_char(tail[2])
elseif #tail == 3 then
stems[1] = 'a'..tail[1]..tail[2]..'aa'..tail[3]
stems[2] = tail[1]..'a'..tail[2]..tail[3]
stems[3] = tail[1]..'a'..m_cu.geminate_char(tail[2])..'uu'..tail[3]
stems[4] = tail[1]..'a'..m_cu.geminate_char(tail[2])..'u'..tail[3]
stems[5] = 'a'..tail[1]..tail[2]..'a'..tail[3]
elseif #tail == 4 then
end
else
local tail_str = root[#root]
tail = mw.text.split(tail_str,"-")
table.remove(root,#root)
vowel = root[#root]
cond_vowel = m_cu.degeminate_char(m_cu.condense_vowels(vowel))
table.remove(root,#root)
concat_root = table.concat(root)
if #tail == 1 then
stems[1] = concat_root..vowel..tail[1]
stems[2] = concat_root..cond_vowel..m_cu.geminate_char(tail[1])
elseif #tail == 2 then
stems[1] = concat_root..vowel..tail[1]..'aa'..tail[2]
stems[2] = concat_root..cond_vowel..tail[1]..tail[2]
stems[3] = concat_root..cond_vowel..m_cu.geminate_char(tail[1])..'uu'..tail[2]
stems[4] = concat_root..cond_vowel..m_cu.geminate_char(tail[1])..'u'..tail[2]
stems[5] = concat_root..vowel..tail[1]..'a'..tail[2]
elseif #tail == 3 then
stems[1] = concat_root..vowel..tail[1]..'aa'..tail[2]..'a'..tail[3]
stems[2] = concat_root..cond_vowel..tail[1]..tail[2]..'a'..tail[3]
stems[3] = concat_root..cond_vowel..m_cu.geminate_char(tail[1])..'uu'..tail[2]..'u'..tail[3]
stems[4] = concat_root..cond_vowel..m_cu.geminate_char(tail[1])..'u'..tail[2]..'u'..tail[3]
stems[5] = concat_root..vowel..tail[1]..'a'..tail[2]..'a'..tail[3]
end
if m_cu.is_geminate(root[1]) then
for i in ipairs(stems) do
stems[i] = vowel..stems[i]
end
end
end
return stems
end
function export.old_get_forms(root,mod,manual_stems,other_manual)
local forms = {}
tail = mod or ''
local stems = export.get_stems(root..tail)
--Overwrite stems with any specified
for i=1,5 do
if manual_stems[i] ~= nil then
stems[i] = manual_stems[i]
end
end
local full_form = ''
if mod == nil or mod == '' then
for _,form in ipairs(FORMS) do
full_form = 'std.ipfv.'..form[1]
forms[full_form] = stems[1]..UNMOD_SUFFIXES[full_form]
full_form = 'std.pfv.'..form[1]
forms[full_form] = stems[2]..UNMOD_SUFFIXES[full_form]
full_form = 'caus.ipfv.'..form[1]
forms[full_form] = stems[2]..UNMOD_SUFFIXES[full_form]
full_form = 'caus.pfv.'..form[1]
forms[full_form] = stems[2]..UNMOD_SUFFIXES[full_form]
full_form = 'pass.ipfv.'..form[1]
forms[full_form] = stems[1]..UNMOD_SUFFIXES[full_form]
full_form = 'pass.pfv.'..form[1]
forms[full_form] = stems[2]..UNMOD_SUFFIXES[full_form]
end
full_form = "std.imp"
forms[full_form] = stems[1]..UNMOD_SUFFIXES[full_form]
full_form = "caus.imp"
forms[full_form] = stems[2]..UNMOD_SUFFIXES[full_form]
full_form = "pass.imp"
forms[full_form] = stems[1]..UNMOD_SUFFIXES[full_form]
else
for _,form in ipairs(FORMS) do
full_form = 'std.ipfv.'..form[1]
forms[full_form] = stems[1]..MOD_SUFFIXES[full_form]
full_form = 'std.pfv.'..form[1]
forms[full_form] = stems[2]..MOD_SUFFIXES[full_form]
full_form = 'caus.ipfv.'..form[1]
forms[full_form] = stems[3]..MOD_SUFFIXES[full_form]
full_form = 'caus.pfv.'..form[1]
forms[full_form] = stems[4]..MOD_SUFFIXES[full_form]
full_form = 'pass.ipfv.'..form[1]
forms[full_form] = stems[1]..MOD_SUFFIXES[full_form]
full_form = 'pass.pfv.'..form[1]
forms[full_form] = stems[2]..MOD_SUFFIXES[full_form]
end
full_form = "std.imp"
forms[full_form] = stems[2]..MOD_SUFFIXES[full_form]
full_form = "caus.imp"
forms[full_form] = stems[4]..MOD_SUFFIXES[full_form]
full_form = "pass.imp"
forms[full_form] = stems[2]..MOD_SUFFIXES[full_form]
-- Overwriting standard and passive infinitives since they don't fit the patter,
-- Bit of a hack I know.
full_form = "std.ipfv.inf"
forms[full_form] = stems[5]..MOD_SUFFIXES[full_form]
full_form = "pass.ipfv.inf"
forms[full_form] = stems[5]..MOD_SUFFIXES[full_form]
end
for k,v in pairs(forms) do
forms[k] = m_cu.assimilate(v)
end
for k,v in pairs(other_manual) do
if UNMOD_SUFFIXES[k] ~= nil then
forms[k] = v
end
end
return forms
end
function export.get_infinitives(root,mod,manual_stems,other_manual)
--local stems = get_stems(root,mod)
tail = mod or ''
local stems = export.get_stems(root..tail)
for i=1,5 do
if manual_stems[i] ~= nil then
stems[i] = manual_stems[i]
end
end
local infinitives={}
if mod == nil then
infinitives["std.ipfv.inf"] = stems[1]..UNMOD_SUFFIXES["std.ipfv.inf"]
infinitives["std.pfv.inf"] = stems[2]..UNMOD_SUFFIXES["std.pfv.inf"]
infinitives["caus.ipfv.inf"] = stems[2]..UNMOD_SUFFIXES["caus.ipfv.inf"]
infinitives["caus.pfv.inf"] = stems[2]..UNMOD_SUFFIXES["caus.pfv.inf"]
infinitives["pass.ipfv.inf"] = stems[1]..UNMOD_SUFFIXES["pass.ipfv.inf"]
infinitives["pass.pfv.inf"] = stems[2]..UNMOD_SUFFIXES["pass.pfv.inf"]
else
infinitives["std.ipfv.inf"] = stems[5]..MOD_SUFFIXES["std.ipfv.inf"]
infinitives["std.pfv.inf"] = stems[2]..MOD_SUFFIXES["std.pfv.inf"]
infinitives["caus.ipfv.inf"] = stems[3]..MOD_SUFFIXES["caus.ipfv.inf"]
infinitives["caus.pfv.inf"] = stems[4]..MOD_SUFFIXES["caus.pfv.inf"]
infinitives["pass.ipfv.inf"] = stems[5]..MOD_SUFFIXES["pass.ipfv.inf"]
infinitives["pass.pfv.inf"] = stems[2]..MOD_SUFFIXES["pass.pfv.inf"]
end
for k,v in pairs(infinitives) do
infinitives[k] = m_cu.assimilate(v)
end
for k,v in pairs(other_manual) do
if UNMOD_SUFFIXES[k] ~= nil then
infinitives[k] = v
end
end
return infinitives
end
function link(word)
local data = {
["term"] = word,
["lang"] = lang
}
return require("Module:Links").full_link(data,nil,false)
end
function export.show_conjugations(root,mod,others)
local forms = {}
forms = export.get_forms(root,mod,others)
return m_stru.format(new_conj_table,forms)
end
function export.conjugations(frame)
local params = {
[1] = {alias_of = "root"},
[2] = {alias_of = "mod"},
["root"] = { default = m_vars.var('chak-root') },
["mod"] = { default = m_vars.var('chak-mod') },
["stem"] = {list = true, require_index = true, allow_holes = true},
}
local frame_args = frame:getParent().args
local args,others = m_params.process(frame_args,params,true)
local stems = {}
for i=1,5 do
stems[i] = args["stem"][i]
end
return export.show_conjugations(args["root"],args["mod"],others)
end
function export.headword(frame)
local params = {
[1] = {alias_of = "root"},
[2] = {alias_of = "mod"},
["root"] = { default = m_vars.var('chak-root') },
["mod"] = { default = m_vars.var('chak-mod') },
}
local frame_args = frame:getParent().args
local args,others = m_params.process(frame_args,params,true)
if args["mod"] == '' then
args["mod"] = nil
end
infinitives = export.get_infinitives(args["root"],args["mod"],{},others)
local output = ""
output = output.."''(perfect infinitive'' "..link(infinitives["std.pfv.inf"])
output = output..", ''causative infinitives'' "..link(infinitives["caus.ipfv.inf"]).." / "..link(infinitives["caus.pfv.inf"])
output = output..", ''passive infinitives'' "..link(infinitives["pass.ipfv.inf"]).." / "..link(infinitives["pass.pfv.inf"])
output = output.."'')''"
return output
end
return export