মডিউল:number list/data/zlw-ocs
অবয়ব
এই মডিউলের জন্য মডিউল:number list/data/zlw-ocs/নথি-এ নথিপত্র তৈরি করা হয়ে থাকতে পারে
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[num] = 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[11] = {
cardinal = n[1].cardinal .. "nádste",
ordinal = {"prvýnádste", "prvnínádste", n[1].cardinal .. "nádstý"}
}
export.numbers[12] = {
cardinal = n[2].cardinal .. "nádste",
ordinal = {n[2].ordinal.. "nádste", n[2].cardinal .. "nádstý"}
}
export.numbers[13] = {
cardinal = n[3].cardinal .. "nádste",
ordinal = {n[3].ordinal .. "nádste", n[3].cardinal .. "nádstý"}
}
export.numbers[14] = {
cardinal = "čtrnádste",
ordinal = {n[4].ordinal .. "nádste", "čtrnádstý"}
}
export.numbers[15] = {
cardinal = "patnádste",
ordinal = {n[5].ordinal .. "nádste", "patnádstý"}
}
export.numbers[16] = {
cardinal = n[6].cardinal .. "nádste",
ordinal = {n[6].ordinal .. "nádste", n[6].cardinal .. "nádstý"}
}
export.numbers[17] = {
cardinal = n[7].cardinal .. "nádste",
ordinal = {n[7].ordinal.. "nádste", n[7].cardinal .. "nádstý"}
}
export.numbers[18] = {
cardinal = n[8].cardinal .. "nádste",
ordinal = {n[8].ordinal .. "nádste", n[8].cardinal .. "nádstý"}
}
export.numbers[19] = {
cardinal = "devatnádste",
ordinal = {n[9].ordinal .. "nádste", "devatnádstý"}
}
export.numbers[20] = {
cardinal = n[2].cardinal .. "dsěti",
ordinal = n[2].cardinal .. "dsátý",
}
export.numbers[30] = {
cardinal = "třidsěti",
ordinal = "třidsátý",
}
export.numbers[40] = {
cardinal = "čtyřidsěti",
ordinal = "čtyďidsátý",
}
export.numbers[50] = {
cardinal = "patdesát",
ordinal = "patdesátý",
}
export.numbers[60] = {
cardinal = "šestdesát",
ordinal = "šestdesátý",
}
export.numbers[70] = {
cardinal = "sedmdesát",
ordinal = "sedmdesátý",
}
export.numbers[80] = {
cardinal = "osmdesát",
ordinal = "osmdesátý",
}
export.numbers[90] = {
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[ones].cardinal .. " a "
ones_suffix = " " .. numbers[ones].cardinal
make_number(num, {
cardinal = {ones_prefix .. numbers[tens].cardinal, numbers[tens].cardinal .. ones_suffix, numbers[ones].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[ones].cardinal .. " a "
ones_suffix = " " .. numbers[ones].cardinal
make_number(num, {
cardinal = {ones_prefix .. numbers[tens].cardinal, numbers[tens].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[100] = {
cardinal = "sto",
ordinal = "stý",
}
export.numbers[200] = {
cardinal = "dvě stě",
ordinal = "dvústý",
}
export.numbers[300] = {
cardinal = "tři sta",
ordinal = "třístý",
}
export.numbers[400] = {
cardinal = "čtyři sta",
ordinal = "čtyřstý",
}
export.numbers[500] = {
cardinal = n[5].cardinal .. " set",
ordinal = "pětistý",
}
export.numbers[600] = {
cardinal = n[6].cardinal .. " set",
ordinal = "šestistý",
}
export.numbers[700] = {
cardinal = n[7].cardinal .. " set",
ordinal = "sedmistý",
}
export.numbers[800] = {
cardinal = n[8].cardinal .. " set",
ordinal = "osmistý",
}
export.numbers[900] = {
cardinal = "devat set",
}
--============// ... //============--
export.numbers[1000] = {
cardinal = "tisúc",
ordinal = "tisúcí",
}
export.numbers[2000] = {
cardinal = "dva tisúcě",
}
export.numbers[5000] = {
cardinal = "pět tisúc",
}
export.numbers[1000000] = {
cardinal = "milion",
}
return export