Module:number list/data/eu
Appearance
- පහත දැක්වෙන උපදෙස්, Module:documentation මගින් ජනනය කොට ඇත. [සංස්කරණය කරන්න]
- ප්රයෝජනවත් සබැඳි: root page • root page’s subpages • සබැඳි • transclusions • testcases • sandbox
This module contains data on various types of numbers in Basque.
(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",
multiplier = "bakoitz",
distributive = "bana",
}
numbers[2] = {
cardinal = "bi",
ordinal = "bigarren",
multiplier = "bikoitz",
fractional = "erdi",
collective = "bikote",
distributive = "bina",
}
numbers[3] = {
cardinal = "hiru",
ordinal = "hirugarren",
multiplier = "hirukoitz",
fractional = "heren",
collective = "hirukote",
distributive = "hiruna",
}
numbers[4] = {
cardinal = "lau",
ordinal = "laugarren",
multiplier = "laukoitz",
fractional = "laurden",
collective = "laukote",
distributive = "launa",
}
numbers[5] = {
cardinal = "bost",
ordinal = "bosgarren",
multiplier = "boskoitz",
fractional = "bosten",
collective = "boskote",
distributive = "bosna",
}
numbers[6] = {
cardinal = "sei",
ordinal = "seigarren",
multiplier = "seikoitz",
fractional = "seiren",
collective = "seikote",
distributive = "seina",
}
numbers[7] = {
cardinal = "zazpi",
ordinal = "zazpigarren",
multiplier = "zazpikoitz",
fractional = "zazpiren",
collective = "zazpikote",
distributive = "zazpina",
}
numbers[8] = {
cardinal = "zortzi",
ordinal = "zortzigarren",
multiplier = "zortzikoitz",
fractional = "zortziren",
collective = "zortzikote",
distributive = "zortzina",
}
numbers[9] = {
cardinal = "bederatzi",
ordinal = "bederatzigarren",
fractional = "bederatziren",
distributive = "bederatzina",
}
numbers[10] = {
cardinal = "hamar",
ordinal = "hamargarren",
fractional = "hamarren",
distributive = "hamarna",
}
numbers[11] = {
cardinal = "hamaika",
ordinal = "hamaikagarren",
fractional = "hamaikaren",
}
numbers[12] = {
cardinal = "hamabi",
ordinal = "hamabigarren",
fractional = "hamabiren",
}
numbers[13] = {
cardinal = "hamahiru",
ordinal = "hamahirugarren",
fractional = "hamahiruren",
}
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