This module contains data on various types of numbers in Old Czech.
local export = {numbers = {}}
local n = export.numbers
local m_numutils = require("Module:number list/utils")
local map = m_numutils.map
local power_of = m_numutils.power_of
local rmatch = mw.ustring.match
local usub = mw.ustring.sub
local numbers = export.numbers
export.additional_number_types = {
{key = "neuter_collective", after = "collective"},
{key = "repetition_adjective", after = "adverbial"},
}
local function add_ordinal_suffix(num, term)
return term .. "ý"
end
local function make_number(num, props, card_base)
local numstr = m_numutils.format_fixed(num)
card_base = card_base or props.cardinal
props.ordinal = props.ordinal or map(function(card) return add_ordinal_suffix(num, card) end, card_base)
-- FIXME
-- props.ordinal_abbr = map(function(ord) return numstr .. "-" .. usub(ord, #ord - 1) end, props.ordinal)
if props.adverbial == true then
props.adverbial = map(function(card) return card .. "krát" end, card_base)
end
if props.repetition_adjective == true then
props.repetition_adjective = map(function(card) return card .. "inásobný" end, card_base)
end
if props.fractional == true then
props.fractional = map(function(card) return card .. "ina" end, card_base)
end
numbers = props
end
make_number(1, {
cardinal = "jeden",
ordinal = {"prvý", "první"},
adverbial = "jednú",
})
make_number(2, {
cardinal = "dva",
ordinal = "druhý",
adverbial = {"dvakrát", "dvénásob"},
multiplier = "dvojitý",
collective = "dvój",
fractional = {"pól", "polovicě"},
})
make_number(3, {
cardinal = "tři",
ordinal = "třetí",
adverbial = {"třikrát", "trénásob"},
multiplier = "trojitý",
collective = "trój",
fractional = "třetina",
})
make_number(4, {
cardinal = "čtyři",
ordinal = "čtvrtý",
adverbial = {"čtyřkrát", "čtyřnásob"},
collective = "čtvеr",
fractional = {"čtvrt", "čtvrticě"},
})
make_number(5, {
cardinal = "pět",
ordinal = "pátý",
adverbial = "pětkrát",
collective = "pater",
})
make_number(6, {
cardinal = "šest",
ordinal = "šestý",
adverbial = "šestkrát",
collective = "šester",
fractional = "šestina",
})
make_number(7, {
cardinal = "sedm",
ordinal = "sedmý",
adverbial = "sedmkrát",
collective = "sedmer",
})
make_number(8, {
cardinal = "osm",
ordinal = "osmý",
adverbial = "osmkrát",
collective = "osmer",
})
make_number(9, {
cardinal = "devět",
ordinal = "devátý",
adverbial = "devětkrát",
collective = "devater",
})
make_number(10, {
cardinal = "desět",
ordinal = "desátý",
adverbial = "desětkrát",
collective = "desater",
fractional = {"desětina", "desátek"},
})
export.numbers = {
cardinal = n.cardinal .. "nádste",
ordinal = {"prvýnádste", "prvnínádste", n.cardinal .. "nádstý"}
}
export.numbers = {
cardinal = n.cardinal .. "nádste",
ordinal = {n.ordinal.. "nádste", n.cardinal .. "nádstý"}
}
export.numbers = {
cardinal = n.cardinal .. "nádste",
ordinal = {n.ordinal .. "nádste", n.cardinal .. "nádstý"}
}
export.numbers = {
cardinal = "čtrnádste",
ordinal = {n.ordinal .. "nádste", "čtrnádstý"}
}
export.numbers = {
cardinal = "patnádste",
ordinal = {n.ordinal .. "nádste", "patnádstý"}
}
export.numbers = {
cardinal = n.cardinal .. "nádste",
ordinal = {n.ordinal .. "nádste", n.cardinal .. "nádstý"}
}
export.numbers = {
cardinal = n.cardinal .. "nádste",
ordinal = {n.ordinal.. "nádste", n.cardinal .. "nádstý"}
}
export.numbers = {
cardinal = n.cardinal .. "nádste",
ordinal = {n.ordinal .. "nádste", n.cardinal .. "nádstý"}
}
export.numbers = {
cardinal = "devatnádste",
ordinal = {n.ordinal .. "nádste", "devatnádstý"}
}
export.numbers = {
cardinal = n.cardinal .. "dsěti",
ordinal = n.cardinal .. "dsátý",
}
export.numbers = {
cardinal = "třidsěti",
ordinal = "třidsátý",
}
export.numbers = {
cardinal = "čtyřidsěti",
ordinal = "čtyďidsátý",
}
export.numbers = {
cardinal = "patdesát",
ordinal = "patdesátý",
}
export.numbers = {
cardinal = "šestdesát",
ordinal = "šestdesátý",
}
export.numbers = {
cardinal = "sedmdesát",
ordinal = "sedmdesátý",
}
export.numbers = {
cardinal = "osmdesát",
ordinal = "osmdesátý",
}
export.numbers = {
cardinal = "devatdesát",
ordinal = "devatdesátý",
}
-- Do numbers 21 through 29, 31 through 39, ..., 91 through 99.
for tens = 20, 20 do
for ones = 1, 9 do
local num = tens + ones
local ones_prefix, ones_suffix
ones_prefix = numbers.cardinal .. " a "
ones_suffix = " " .. numbers.cardinal
make_number(num, {
cardinal = {ones_prefix .. numbers.cardinal, numbers.cardinal .. ones_suffix, numbers.cardinal .. "mezidsietma"},
})
end
end
for tens = 30, 90, 10 do
for ones = 1, 9 do
local num = tens + ones
local ones_prefix, ones_suffix
ones_prefix = numbers.cardinal .. " a "
ones_suffix = " " .. numbers.cardinal
make_number(num, {
cardinal = {ones_prefix .. numbers.cardinal, numbers.cardinal .. ones_suffix},
})
end
end
make_number(3, {
cardinal = "třie",
ordinal = "třetí",
adverbial = {"třikrát", "trénásob"},
multiplier = "trojitý",
collective = "trój",
fractional = "třetina",
})
make_number(4, {
cardinal = "čtyřie",
ordinal = "čtvrtý",
adverbial = {"čtyřkrát", "čtyřnásob"},
collective = "čtvеr",
fractional = {"čtvrt", "čtvrticě"},
})
export.numbers = {
cardinal = "sto",
ordinal = "stý",
}
export.numbers = {
cardinal = "dvě stě",
ordinal = "dvústý",
}
export.numbers = {
cardinal = "tři sta",
ordinal = "třístý",
}
export.numbers = {
cardinal = "čtyři sta",
ordinal = "čtyřstý",
}
export.numbers = {
cardinal = n.cardinal .. " set",
ordinal = "pětistý",
}
export.numbers = {
cardinal = n.cardinal .. " set",
ordinal = "šestistý",
}
export.numbers = {
cardinal = n.cardinal .. " set",
ordinal = "sedmistý",
}
export.numbers = {
cardinal = n.cardinal .. " set",
ordinal = "osmistý",
}
export.numbers = {
cardinal = "devat set",
}
--============// ... //============--
export.numbers = {
cardinal = "tisúc",
ordinal = "tisúcí",
}
export.numbers = {
cardinal = "dva tisúcě",
}
export.numbers = {
cardinal = "pět tisúc",
}
export.numbers = {
cardinal = "milion",
}
return export