Mòdul:ca-verb/omplir
La documentació d'ús d'aquest mòdul es pot crear a Mòdul:ca-verb/omplir/ús
-- Formes irregulars del verb omplir i derivats (des-, re-), més obrir i derivats (entre-, pell-, re-).
local export = {}
local function llista_zones(llista, zona)
local zones = {}
for k, v in pairs(llista) do
if zona[v == "or" and "ori" or v == "n-occ" and "nocc" or v] then
table.insert(zones, v)
end
end
return #zones > 3 and "" or table.concat(zones, ", ")
end
function export.make_irregulars(forma, zona)
local radical = forma.inf:gsub("ir$", "")
local radical_no_r = radical:gsub("r$", "")
local radical_accent = radical:gsub("o", "ò")
local radical_u = radical:gsub("o", "u")
forma.part[1]["m-s"] = radical_no_r .. "ert"
forma.part[1]["f-s"] = radical_no_r .. "erta"
forma.part[1]["m-p"] = radical_no_r .. "erts"
forma.part[1]["f-p"] = radical_no_r .. "ertes"
if radical:find("ompl$") and (zona.bal or zona.val) then
forma.part[2] = {}
forma.part[2]["m-s"] = radical .. "it"
forma.part[2]["f-s"] = radical .. "ida"
forma.part[2]["m-p"] = radical .. "its"
forma.part[2]["f-p"] = radical .. "ides"
forma.part[2]["nota"] = llista_zones({"bal", "val"}, zona)
end
forma["pres-ind"][1][2] = radical .. "es"
forma["pres-ind"][1][3] = radical .. "e"
fila = 2
if zona.bal or (zona.alg and radical:find("obr$")) then
forma["pres-ind"][2] = {}
forma["pres-ind"][2][1] = radical
if radical:find("obr$") then
forma["pres-ind"][2]["nota"] = llista_zones({"bal", "alg"}, zona)
else
forma["pres-ind"][2]["nota"] = "bal"
end
fila = fila + 1
end
if zona.sept then
forma["pres-ind"][fila] = {}
forma["pres-ind"][fila][1] = radical .. "i"
forma["pres-ind"][fila]["nota"] = "sept"
fila = fila + 1
end
if zona.val then
forma["pres-ind"][fila] = {}
forma["pres-ind"][fila][1] = radical_accent .. "ic"
forma["pres-ind"][fila]["nota"] = "val"
fila = fila + 1
end
if zona.bal or zona.val or (zona.alg and radical:find("obr$")) then
forma["pres-ind"][fila] = {}
forma["pres-ind"][fila][2] = radical .. "is"
forma["pres-ind"][fila][3] = radical .. "i"
forma["pres-ind"][fila][6] = radical .. "in"
if radical:find("obr$") then
forma["pres-ind"][fila]["nota"] = llista_zones({"bal", "val", "alg"}, zona)
else
forma["pres-ind"][fila]["nota"] = llista_zones({"bal", "val"}, zona)
end
end
if zona.bal or zona.occ then
forma["pres-subj"][2][1] = radical_accent .. "iga"
forma["pres-subj"][2][2] = radical_accent .. "igues"
forma["pres-subj"][2][3] = radical_accent .. "iga"
forma["pres-subj"][2][4] = radical .. "iguem"
forma["pres-subj"][2][5] = radical .. "igueu"
forma["pres-subj"][2][6] = radical_accent .. "iguen"
forma["pres-subj"][2]["nota"] = llista_zones({"occ", "bal"}, zona)
forma["pres-subj"][3] = nil
end
forma["imp"][1][2] = radical .. "e"
if zona.bal or zona.occ then
forma["imp"][2][2] = radical .. "i"
forma["imp"][2][3] = radical_accent .. "iga"
forma["imp"][2][4] = radical .. "iguem"
forma["imp"][2][6] = radical_accent .. "iguen"
forma["imp"][2]["nota"] = llista_zones({"occ", "bal"}, zona)
forma["imp"][3] = nil
end
if zona.alg and radical:find("ompl$") then
forma["no-pres-ind"] = {}
forma["no-pres-ind"][1] = {}
forma["no-pres-ind"][1][1] = radical_u
forma["no-pres-ind"][1][2] = radical_u .. "is"
forma["no-pres-ind"][1][3] = radical_u .. "i"
forma["no-pres-ind"][1][6] = radical_u .. "in"
forma["no-pres-ind"][1]["nota"] = "alg"
end
return forma
end
return export