This module contains data on various types of numbers in Dutch.
local export = {numbers = {}}
local numbers = export.numbers
numbers = {
cardinal = "nul",
}
-- other number types:
-- adverbial, multiplier, distributive, collective, fractional
for number, cardinal, ordinal in (function (t)
local i = 0
return function()
i = i + 1
local v = t
if type(v) == "table" then
return i, unpack(v)
elseif v then
return i, v
end
end
end) {
{ "een", "eerste" }, "twee", { "drie", "derde" }, "vier", "vijf", "zes",
"zeven", { "acht", "achtste" }, "negen", "tien", "elf", "twaalf",
} do
numbers = {
cardinal = cardinal,
ordinal = ordinal or cardinal .. "de",
}
end
for i, stem in ipairs {
"der", "veer", "vijf", "zes", "zeven", "acht", "negen",
} do
local number = i + 12
local cardinal = stem .. "tien"
numbers = {
cardinal = cardinal,
ordinal = cardinal .. "de",
}
end
local function make_ordinal(cardinal)
return cardinal .. "ste"
end
local acute = require("Module:string utilities").char(0x0301)
local function remove_acute(word)
return (word:gsub("é", "e"))
end
for i, stem in ipairs {
"twin", "der", "veer", "vijf", "zes", "zeven", "tach", "negen",
} do
local tens = (i + 1) * 10
local tens_cardinal = stem .. "tig"
numbers = {
cardinal = tens_cardinal,
ordinal = make_ordinal(tens_cardinal),
}
for ones = 1, 9 do
local ones_cardinal = remove_acute(numbers.cardinal)
local cardinal = ones_cardinal
.. (ones_cardinal:find("e$") and "ën" or "en")
.. tens_cardinal
numbers = {
cardinal = cardinal,
ordinal = make_ordinal(cardinal),
}
end
end
for number, cardinal in pairs {
= "honderd", = "duizend", = "tienduizend",
= "honderdduizend", = "miljoen", = "miljard",
= "biljoen", = "biljard", = "triljoen",
= "triljard",
} do
numbers = {
cardinal = cardinal,
ordinal = make_ordinal(cardinal),
}
end
numbers = {
cardinal = "tweehonderd",
ordinal = "tweehonderdste"
}
numbers = {
cardinal = "driehonderd",
ordinal = "driehonderdste"
}
numbers = {
cardinal = "vierhonderd",
ordinal = "vierhonderdste"
}
numbers = {
cardinal = "vijfhonderd",
ordinal = "vijfhonderdste"
}
numbers = {
cardinal = "zeshonderd",
ordinal = "zeshonderdste"
}
numbers = {
cardinal = "zevenhonderd",
ordinal = "zevenhonderdste"
}
numbers = {
cardinal = "achthonderd",
ordinal = "achthonderdste"
}
numbers = {
cardinal = "negenhonderd",
ordinal = "negenhonderdste"
}
numbers = {
cardinal = "duizend",
ordinal = "duizendste"
}
return export