Module:siwa-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 158: Line 158:


function export.crux(term, e, w)
function export.crux(term, e, w)
if type(term) == "table" then
pos = term.args["pos"]
term = term[1]
end
term=mw.ustring.lower(term)
term=mw.ustring.lower(term)
term=export.morphemes(term)
term=export.morphemes(term)
local dialect = { }
for _, rule in ipairs(rules) do
for _, rule in ipairs(rules) do
local fordialect = rule[3]
local fordialect = rule[3]
if not fordialect or m_table.contains(fordialect, "w") or m_table.contains(fordialect, "e") then
if (not fordialect) or m_table.contains(fordialect, "w") or m_table.contains(fordialect, "e") then
term = gsub(term, rule[1], rule[2])
term = gsub(term, rule[1], rule[2])
end
end