本模块包含有關巴斯克語中各種類型數字的数据。

Number 基數詞 序數詞 乘數 分數
0 zero, huts zerogarren
1 bat lehen
2 bi bigarren bikoitz erdi
3 hiru hirugarren hirukoitz heren
4 lau laugarren laukoitz laurden
5 bost bosgarren boskoitz bosten
6 sei seigarren seikoitz seiren
7 zazpi zazpigarren zazpikoitz zazpiren
8 zortzi zortzigarren zortzikoitz zortziren
9 bederatzi bederatzigarren bederatziren
10 hamar hamargarren hamarren
11 hamaika hamaikagarren hamaikaren
12 hamabi hamabigarren hamabiren
13 hamairu hamairugarren hamairuren
14 hamalau hamalaugarren hamalauren
15 hamabost hamabosgarren hamabosten
16 hamasei hamaseigarren hamaseiren
17 hamazazpi hamazazpigarren hamazazpiren
18 hemezortzi hemezortzigarren hemezortziren
19 hemeretzi hemeretzigarren hemeretziren
20 hogei hogeigarren hogeiren
21 hogeita bat hogeita batgarren hogeita baten
22 hogeita bi hogeita bigarren hogeita biren
23 hogeita hiru hogeita hirugarren hogeita hiruren
24 hogeita lau hogeita laugarren hogeita lauren
25 hogeita bost hogeita bosgarren hogeita bosten
26 hogeita sei hogeita seigarren hogeita seiren
27 hogeita zazpi hogeita zazpigarren hogeita zazpiren
28 hogeita zortzi hogeita zortzigarren hogeita zortziren
29 hogeita bederatzi hogeita bederatzigarren hogeita bederatziren
30 hogeita hamar hogeita hamargarren hogeita hamarren
31 hogeita hamaika hogeita hamaikagarren hogeita hamaikaren
32 hogeita hamabi hogeita hamabigarren hogeita hamabiren
33 hogeita hamairu hogeita hamairugarren hogeita hamairuren
34 hogeita hamalau hogeita hamalaugarren hogeita hamalauren
35 hogeita hamabost hogeita hamabosgarren hogeita hamabosten
36 hogeita hamasei hogeita hamaseigarren hogeita hamaseiren
37 hogeita hamazazpi hogeita hamazazpigarren hogeita hamazazpiren
38 hogeita hemezortzi hogeita hemezortzigarren hogeita hemezortziren
39 hogeita hemeretzi hogeita hemeretzigarren hogeita hemeretziren
40 berrogei berrogeigarren berrogeiren
41 berrogeita bat berrogeita batgarren berrogeita baten
42 berrogeita bi berrogeita bigarren berrogeita biren
43 berrogeita hiru berrogeita hirugarren berrogeita hiruren
44 berrogeita lau berrogeita laugarren berrogeita lauren
45 berrogeita bost berrogeita bosgarren berrogeita bosten
46 berrogeita sei berrogeita seigarren berrogeita seiren
47 berrogeita zazpi berrogeita zazpigarren berrogeita zazpiren
48 berrogeita zortzi berrogeita zortzigarren berrogeita zortziren
49 berrogeita bederatzi berrogeita bederatzigarren berrogeita bederatziren
50 berrogeita hamar berrogeita hamargarren berrogeita hamarren
51 berrogeita hamaika berrogeita hamaikagarren berrogeita hamaikaren
52 berrogeita hamabi berrogeita hamabigarren berrogeita hamabiren
53 berrogeita hamairu berrogeita hamairugarren berrogeita hamairuren
54 berrogeita hamalau berrogeita hamalaugarren berrogeita hamalauren
55 berrogeita hamabost berrogeita hamabosgarren berrogeita hamabosten
56 berrogeita hamasei berrogeita hamaseigarren berrogeita hamaseiren
57 berrogeita hamazazpi berrogeita hamazazpigarren berrogeita hamazazpiren
58 berrogeita hemezortzi berrogeita hemezortzigarren berrogeita hemezortziren
59 berrogeita hemeretzi berrogeita hemeretzigarren berrogeita hemeretziren
60 hirurogei hirurogeigarren hirurogeiren
61 hirurogeita bat hirurogeita batgarren hirurogeita baten
62 hirurogeita bi hirurogeita bigarren hirurogeita biren
63 hirurogeita hiru hirurogeita hirugarren hirurogeita hiruren
64 hirurogeita lau hirurogeita laugarren hirurogeita lauren
65 hirurogeita bost hirurogeita bosgarren hirurogeita bosten
66 hirurogeita sei hirurogeita seigarren hirurogeita seiren
67 hirurogeita zazpi hirurogeita zazpigarren hirurogeita zazpiren
68 hirurogeita zortzi hirurogeita zortzigarren hirurogeita zortziren
69 hirurogeita bederatzi hirurogeita bederatzigarren hirurogeita bederatziren
70 hirurogeita hamar hirurogeita hamargarren hirurogeita hamarren
71 hirurogeita hamaika hirurogeita hamaikagarren hirurogeita hamaikaren
72 hirurogeita hamabi hirurogeita hamabigarren hirurogeita hamabiren
73 hirurogeita hamairu hirurogeita hamairugarren hirurogeita hamairuren
74 hirurogeita hamalau hirurogeita hamalaugarren hirurogeita hamalauren
75 hirurogeita hamabost hirurogeita hamabosgarren hirurogeita hamabosten
76 hirurogeita hamasei hirurogeita hamaseigarren hirurogeita hamaseiren
77 hirurogeita hamazazpi hirurogeita hamazazpigarren hirurogeita hamazazpiren
78 hirurogeita hemezortzi hirurogeita hemezortzigarren hirurogeita hemezortziren
79 hirurogeita hemeretzi hirurogeita hemeretzigarren hirurogeita hemeretziren
80 laurogei laurogeigarren laurogeiren
81 laurogeita bat laurogeita batgarren laurogeita baten
82 laurogeita bi laurogeita bigarren laurogeita biren
83 laurogeita hiru laurogeita hirugarren laurogeita hiruren
84 laurogeita lau laurogeita laugarren laurogeita lauren
85 laurogeita bost laurogeita bosgarren laurogeita bosten
86 laurogeita sei laurogeita seigarren laurogeita seiren
87 laurogeita zazpi laurogeita zazpigarren laurogeita zazpiren
88 laurogeita zortzi laurogeita zortzigarren laurogeita zortziren
89 laurogeita bederatzi laurogeita bederatzigarren laurogeita bederatziren
90 laurogeita hamar laurogeita hamargarren laurogeita hamarren
91 laurogeita hamaika laurogeita hamaikagarren laurogeita hamaikaren
92 laurogeita hamabi laurogeita hamabigarren laurogeita hamabiren
93 laurogeita hamairu laurogeita hamairugarren laurogeita hamairuren
94 laurogeita hamalau laurogeita hamalaugarren laurogeita hamalauren
95 laurogeita hamabost laurogeita hamabosgarren laurogeita hamabosten
96 laurogeita hamasei laurogeita hamaseigarren laurogeita hamaseiren
97 laurogeita hamazazpi laurogeita hamazazpigarren laurogeita hamazazpiren
98 laurogeita hemezortzi laurogeita hemezortzigarren laurogeita hemezortziren
99 laurogeita hemeretzi laurogeita hemeretzigarren laurogeita hemeretziren
100 ehun ehungarren ehunen
200 berrehun berrehungarren berrehunen
300 hirurehun hirureungarren hirureunen
400 laurehun laurehungarren laurehunen
500 bostehun bostehungarren bostehunen
600 seiehun seiehungarren seiehunen
700 zazpiehun zazpiehungarren zazpiehunen
800 zortziehun zortziehungarren zortziehunen
900 bederatziehun bederatziehungarren bederatziehunen
1,000 mila milagarren milaren

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