local export = {numbers = {}}
local numbers = export.numbers
numbers = {
cardinal = "cero",
}
-- Delete any number types that don't apply.
numbers = {
cardinal = "un",
ordinal = "primeiro",
-- adverbial = "",
-- multiplier = "",
-- distributive = "",
-- collective = "",
-- fractional = "",
}
numbers = {
cardinal = "dous",
ordinal = "segundo",
}
numbers = {
cardinal = "tres",
ordinal = "terceiro",
}
numbers = {
cardinal = "catro",
ordinal = "cuarto",
}
numbers = {
cardinal = "cinco",
ordinal = "quinto",
}
numbers = {
cardinal = "seis",
ordinal = "sexto",
}
numbers = {
cardinal = "sete",
ordinal = "sétimo",
}
numbers = {
cardinal = "oito",
ordinal = "oitavo",
}
numbers = {
cardinal = "nove",
ordinal = "noveno",
}
numbers = {
cardinal = "dez",
ordinal = "décimo",
}
numbers = {
cardinal = "once",
ordinal = { "undécimo", "décimo primeiro" },
}
numbers = {
cardinal = "doce",
ordinal = { "duodécimo", "décimo segundo" },
}
numbers = {
cardinal = "trece",
}
numbers = {
cardinal = "catorce",
}
numbers = {
cardinal = "quince",
}
for ones = 6, 9 do
numbers = {
cardinal = "deza" .. numbers.cardinal,
}
end
for ones = 3, 9 do
numbers.ordinal = numbers.ordinal .. " " .. numbers.ordinal
end
local function unpack_ipairs(t)
local i = 0
return function()
i = i + 1
if t then
return i, unpack(t)
end
end
end
for i, tens_cardinal, tens_ordinal in unpack_ipairs {
{ "vinte", "vixésimo" },
{ "trinta", "trixésimo" },
{ "corenta", "cuadraxésimo" },
{ "cincuenta", "quincuaxésimo" },
{ "sesenta", "sesaxésimo" },
{ "setenta", "septuaxésimo" },
{ "oitenta", "octoxésimo" },
{ "noventa", "nonaxésimo" },
} do
local tens = (i + 1) * 10
numbers = {
cardinal = tens_cardinal,
ordinal = tens_ordinal,
}
for ones = 1, 9 do
numbers = {
cardinal = tens_cardinal .. " e " .. numbers.cardinal,
ordinal = tens_ordinal .. " " .. numbers.ordinal,
}
end
end
numbers = {
cardinal = "cen",
ordinal = "centésimo",
}
return export