模組:Number list/data/eu
- 下列說明文檔由Module:documentation/functions/number list所生成。[編輯]
- 相關連結:根頁面 • 根頁面的子頁面 • 本頁面的子頁面 • 链入 • 嵌入包含 • 測試用例 • 沙盒
本模块包含有關巴斯克語中各種類型數字的数据。
(edit)
local export = {numbers = {}}
local numbers = export.numbers
-- Delete any number types that don't apply.
numbers[0] = {
cardinal = { "zero", "huts" },
ordinal = "zerogarren",
}
numbers[1] = {
cardinal = "bat",
ordinal = "lehen",
}
numbers[2] = {
cardinal = "bi",
ordinal = "bigarren",
multiplier = "bikoitz",
fractional = "erdi",
}
numbers[3] = {
cardinal = "hiru",
ordinal = "hirugarren",
multiplier = "hirukoitz",
fractional = "heren",
}
numbers[4] = {
cardinal = "lau",
ordinal = "laugarren",
multiplier = "laukoitz",
fractional = "laurden",
}
numbers[5] = {
cardinal = "bost",
ordinal = "bosgarren",
multiplier = "boskoitz",
fractional = "bosten",
}
numbers[6] = {
cardinal = "sei",
ordinal = "seigarren",
multiplier = "seikoitz",
fractional = { "seiren" },
}
numbers[7] = {
cardinal = "zazpi",
ordinal = "zazpigarren",
multiplier = "zazpikoitz",
fractional = "zazpiren",
}
numbers[8] = {
cardinal = "zortzi",
ordinal = "zortzigarren",
multiplier = "zortzikoitz",
fractional = "zortziren",
}
numbers[9] = {
cardinal = "bederatzi",
ordinal = "bederatzigarren",
fractional = "bederatziren",
}
numbers[10] = {
cardinal = "hamar",
ordinal = "hamargarren",
fractional = "hamarren",
}
numbers[11] = {
cardinal = "hamaika",
ordinal = "hamaikagarren",
fractional = "hamaikaren",
}
numbers[12] = {
cardinal = "hamabi",
ordinal = "hamabigarren",
fractional = "hamabiren",
}
numbers[13] = {
cardinal = "hamairu",
ordinal = "hamairugarren",
fractional = "hamairuren",
}
numbers[14] = {
cardinal = "hamalau",
ordinal = "hamalaugarren",
fractional = "hamalauren",
}
numbers[15] = {
cardinal = "hamabost",
ordinal = "hamabosgarren",
fractional = "hamabosten",
}
numbers[16] = {
cardinal = "hamasei",
ordinal = "hamaseigarren",
fractional = "hamaseiren",
}
numbers[17] = {
cardinal = "hamazazpi",
ordinal = "hamazazpigarren",
fractional = "hamazazpiren",
}
numbers[18] = {
cardinal = "hemezortzi",
ordinal = "hemezortzigarren",
fractional = "hemezortziren",
}
numbers[19] = {
cardinal = "hemeretzi",
ordinal = "hemeretzigarren",
fractional = "hemeretziren",
}
numbers[20] = {
cardinal = "hogei",
ordinal = "hogeigarren",
fractional = "hogeiren",
}
numbers[30] = {
cardinal = "hogeita hamar",
ordinal = "hogeita hamargarren",
fractional = "hogeita hamarren",
}
numbers[40] = {
cardinal = "berrogei",
ordinal = "berrogeigarren",
fractional = "berrogeiren",
}
numbers[50] = {
cardinal = "berrogeita hamar",
ordinal = "berrogeita hamargarren",
fractional = "berrogeita hamarren",
}
numbers[60] = {
cardinal = "hirurogei",
ordinal = "hirurogeigarren",
fractional = "hirurogeiren",
}
numbers[70] = {
cardinal = "hirurogeita hamar",
ordinal = "hirurogeita hamargarren",
fractional = "hirurogeita hamarren",
}
numbers[80] = {
cardinal = "laurogei",
ordinal = "laurogeigarren",
fractional = "laurogeiren",
}
numbers[90] = {
cardinal = "laurogeita hamar",
ordinal = "laurogeita hamargarren",
fractional = "laurogeita hamarren",
}
local function first_element_if_table(t)
if type(t) == "table" then
return t[1]
else
return t
end
end
local function add_subtable(t, key)
local subtable = t[key]
if not subtable then
subtable = {}
t[key] = subtable
end
return subtable
end
-- Insert val into subtable indexed by key, creating subtable if necessary.
local function insert_into_subtable(t, key, val)
local subtable = add_subtable(t, key)
table.insert(subtable, val)
end
-- Generate the vigesimal numerals for 31-39, 51-59, 71-79 and 91-99
-- by adding "teens" numerals for these "twenties".
local twenties_numerals = {
[20] = "hogei",
[40] = "berrogei",
[60] = "hirurogei",
[80] = "laurogei",
}
for twenties, twenties_cardinal in pairs(twenties_numerals) do
for teens = 11, 19 do
local teens_numeral = numbers[teens]
local number = add_subtable(numbers, twenties + teens)
insert_into_subtable(number, "cardinal", twenties_cardinal .. "ta " .. teens_numeral.cardinal)
insert_into_subtable(number, "ordinal", twenties_cardinal .. "ta " .. teens_numeral.ordinal)
insert_into_subtable(number, "fractional", twenties_cardinal .. "ta " .. teens_numeral.fractional)
end
end
local function tableify(val)
if type(val) ~= "table" then
return {val}
else
return val
end
end
-- Add the decimal numerals for 21-29, 41-49, 61-69 and 81-89,
-- inserting them after the vigesimal numerals if those are present.
for tens = 20, 90, 10 do
for _, tens_cardinal in ipairs(tableify(numbers[tens].cardinal)) do
if not tens_cardinal:find "%hamar$" then
for ones = 1, 9 do
local number = add_subtable(numbers, tens + ones)
if ones == 5 then
insert_into_subtable(number, "cardinal", tens_cardinal .. "ta bost")
insert_into_subtable(number, "ordinal", tens_cardinal .. "ta bosgarren")
insert_into_subtable(number, "fractional", tens_cardinal .. "ta bosten")
elseif ones == 1 then
insert_into_subtable(number, "cardinal", tens_cardinal .. "ta bat")
insert_into_subtable(number, "ordinal", tens_cardinal .. "ta batgarren")
insert_into_subtable(number, "fractional", tens_cardinal .. "ta baten")
else
local ones_numerals = numbers[ones]
insert_into_subtable(number, "cardinal", tens_cardinal .. "ta " .. ones_numerals.cardinal)
insert_into_subtable(number, "ordinal", tens_cardinal .. "ta " .. ones_numerals.cardinal .. "garren")
insert_into_subtable(number, "fractional", tens_cardinal .. "ta " .. ones_numerals.cardinal .. "ren")
end
end
end
end
end
numbers[100] = {
cardinal = "ehun",
ordinal = "ehungarren",
fractional = "ehunen",
}
numbers[200] = {
cardinal = "berrehun",
ordinal = "berrehungarren",
fractional = "berrehunen",
}
numbers[300] = {
cardinal = "hirurehun",
ordinal = "hirureungarren",
fractional = "hirureunen",
}
numbers[400] = {
cardinal = "laurehun",
ordinal = "laurehungarren",
fractional = "laurehunen",
}
numbers[500] = {
cardinal = "bostehun",
ordinal = "bostehungarren",
fractional = "bostehunen",
}
numbers[600] = {
cardinal = "seiehun",
ordinal = "seiehungarren",
fractional = "seiehunen",
}
numbers[700] = {
cardinal = "zazpiehun",
ordinal = "zazpiehungarren",
fractional = "zazpiehunen",
}
numbers[800] = {
cardinal = "zortziehun",
ordinal = "zortziehungarren",
fractional = "zortziehunen",
}
numbers[900] = {
cardinal = "bederatziehun",
ordinal = "bederatziehungarren",
fractional = "bederatziehunen",
}
numbers[1000] = {
cardinal = "mila",
ordinal = "milagarren",
fractional = "milaren",
}
return export