-- TESTES EM ]
-- PRINCIPAL PROBLEMA POR ORA: (PARECE SER PROBLEMA PRINCIPALMENTE PARA VERBOS)
-- PALAVRAS QUE SE ALTERAM PELA METADE,
-- COMO ] e ] (], ] + ]) — NA 1SG, FICAM ] E ]
-- E ] — ]; NA 3SG, ]
-- TO-DO: unpossessable;
-- declinação incerta (para quando Mamiani nada diz);
-- alerta de que se trata de classificação do quipeá;
-- usage notes quando irregularidade (obs.: na 2sg da 1decl, usar ae em vez de e; ver aepadzú no catecismo)
local lang = require("Module:languages").getByCode("kzw")
local export = {}
function export.inflect(frame)
local PAGENAME = mw.title.getCurrentTitle().text
local args = frame:getParent().args
local nome = frame.args
local class = frame.args -- A QUE DECLINAÇÃO PERTENCE (1, 2, 3, 4 OU 5)
local category = frame.args -- SE É noun OU verb (OS MAIS RELEVANTES NESTE CASO, MAS... PREPOSIÇÕES — ALGUMAS)
local gender_equivalent = frame.args -- SE TEM UM EQUIVALENTE DO OUTRO GÊNERO
local type_equivalent = frame.args -- SE POSITIVO ACIMA, ESPECIFICAR A QUE GÊNERO PERTENCE
-- OBS.: PRECISA DE UMA FUNÇÃO PARA A 3.ª PESSOA DO SINGULAR, JÁ QUE NEM SEMPRE É SÓ METER O PREFIXO
-- MANIPULAR O PRIMEIRO ARGUMENTO (EXEMPLO: padzú OU ide:inú OU crara:unú)
parte1 = ""
if nome == "" or nome == "-" then -- PERMITINDO UM HÍFEN PARA EVITAR A ESTRANHEZA DE UM ARGUMENTO VAZIO
elseif nome:find(":") then
parte1, PAGENAME = nome:match("(+):(+)")
else
PAGENAME = nome
end
-- ACABA AQUI
if category == "noun" then
data = {lang = lang, pos_category = "nouns", inflections = {}, categories = {}}
elseif category == "verb" then
data = {lang = lang, pos_category = "verbs", inflections = {}, categories = {}}
end
-- DÁ PRA JUNTAR ISSO AQUI NA OUTRA PARTE!
if class == "1" then
pref = "st"
elseif class == "2" then
pref = "nd"
elseif class == "3" then
pref = "rd"
elseif class == "4" or class == "5" then
pref = "th"
end
-- TERMINA AQUI, MAS SE JUNTAR NA PARTE OUTRA PARTE,
-- ENTÃO A LINHA DE CÓDIGO SEGUINTE VA TER QUE MUDAR PRA OUTRO LUGAR
local decl = class .. pref .. " declension"
local form = ""
if class == "1" then
form = parte1 .. "i" .. PAGENAME
type_decl_Mam = " first-declension "
elseif class == "2" then
form = parte1 .. "s" .. PAGENAME
type_decl_Mam = " second-declension "
elseif class == "3" then
form = parte1 .. "se" .. PAGENAME
type_decl_Mam = " third-declension "
elseif class == "4" then
form = parte1 .. "si" .. PAGENAME
type_decl_Mam = " fourth-declension "
elseif class == "5" then
form = parte1 .. "su" .. PAGENAME
type_decl_Mam = " fifth-declension "
end
-- ADICINAR O PARÊNTESES APÓS O HEADWORD; POR EXEMPLO, “(1DECL, 3SG ipadzú)” NO CASO DO VERBETE ] — VER TAMBÉM ]
table.insert(data.inflections, {label = "<span style='font-style:normal'>" .. decl .. ", 3rd person singular" .. "</span>", form})
-- ADICIONAR “male (ou female) equivalent”; O EQUIVALENTE É O TERCEIRO ARGUMENTO, E SEU GÊNERO, O QUARTO (POR EXEMPLO, “dé|female” em ])
if gender_equivalent then
if type_equivalent == "female" then
table.insert(data.inflections, {label = "<span style='font-style:normal'>" .. "female equivalent" .. "</span>", gender_equivalent})
elseif type_equivalent == "male" then
table.insert(data.inflections, {label = "<span style='font-style:normal'>" .. "male equivalent" .. "</span>", gender_equivalent})
end
end
-- ADICIONAR CATEGORIA REFERENTE À DECLINAÇÃO CONFORME MAMIANI; POR EXEMPLO, ]
table.insert(data.categories, lang:getCanonicalName() .. type_decl_Mam .. data.pos_category)
return require("Module:headword").full_headword(data)
end
return export