Module:number list/data/pqm

local export = {numbers = {}}

local numbers = export.numbers

export.additional_number_types = { {key = "adnominal"}, }

numbers[1] = { cardinal = {"pesq", "neqt"}, ordinal = "amsqahsewey", adverbial = "neqt", adnominal = {"pesq", "pesqon"}, initial_root = {"'qoc-", "'qot-"} }

numbers[2] = { cardinal = {"nis", "tapu"}, ordinal = "nisewey", adverbial = "nisokehs", adnominal = {"nisuwok", "nisonul"}, initial_root = "nis-" }

numbers[3] = { cardinal = {"nihi", "'sis"}, ordinal = "nuhuwewey", adverbial = "nihikehs", adnominal = {"nuhuwok", "nohonul"}, initial_root = "'s-" }

numbers[4] = { cardinal = "new", ordinal = "newewey", adverbial = "newokehs", adnominal = {"newwok", "newonul"}, initial_root = "new-" }

numbers[5] = { cardinal = "nan", ordinal = "nanewey", adverbial = "nanokehs", adnominal = {"nanuwok", "nanonul"}, initial_root = "nan-" }

generativeNumList = { [6] = "kamahcin", [7] = "oluwikonok", [8] = "oqomolcin", [9] = "esqonatek", [10] = "'qotinsk", [11] = "'qotanku", [12] = "nisanku", [13] = "'sanku", [14] = "newanku", [15] = "nananku", [100] = "'qotatq", [1000] = "'qotamqahk", [1000000] = "'qotalokamqahk", }

-- Automate the generation of numbers 16-19, which are simply [name of number in ones place] + "kehsanku" for n = 16, 19 do generativeNumList[n] = generativeNumList[n - 10] .. " kehsanku" end

-- Automate the generation of multiples of 10 from 20-50, using this constructor: "[initial root of number in tens place]insk" for n = 20, 50, 10 do	local rootPrefix = numbers[n / 10].initial_root:sub(1, -2) generativeNumList[n] = rootPrefix .. "insk" end

-- Automate the generation of multiples of 10 from 60-90, which follow this rule: [mame of number in tens place] + "kehsinsk" for n = 60, 90, 10 do generativeNumList[n] = generativeNumList[n / 10] .. " kehsinsk" end

-- Automate the generation of all other numbers from 21-99, which use "cel" as a connector for n = 21, 99 do -- If not a multiple of 10, i.e. not 30, 40, etc.	local ones = n % 10 if ones ~= 0 then local base = generativeNumList[math.floor(n / 10) * 10] .. " cel " -- 21, 22 and 23, and 31, 32, 33, etc. have alternative forms. if ones <= 3 then local form1 = base .. numbers[n % 10].cardinal[1] local form2 = base .. numbers[n % 10].cardinal[2] generativeNumList[n] = {form1, form2, base} -- Pull data from the numbers table elseif ones <= 5 then local form = base .. numbers[n % 10].cardinal generativeNumList[n] = {form, base} -- Pull data from the generativeNumList table else local form = base .. generativeNumList[n % 10] generativeNumList[n] = {form, base} end end end

-- Automate the generation of multiples of 100 from 200-500, using this constructor: "[initial root of number in hundreds place]atq" for n = 200, 500, 100 do	local rootPrefix = numbers[n / 100].initial_root:sub(1, -2) generativeNumList[n] = rootPrefix .. "atq" end

-- Automate the generation of multiples of 100 from 600-900, which follow this rule: [mame of number in hundreds place] + "kehsatq" for n = 600, 900, 100 do generativeNumList[n] = generativeNumList[n / 100] .. " kehsatq" end

-- Automate the generation of multiples of 1000 from 2000-5000, using this constructor: "[initial root of number in thousands place]amqahk" for n = 2000, 5000, 1000 do	local rootPrefix = numbers[n / 1000].initial_root:sub(1, -2) generativeNumList[n] = rootPrefix .. "amqahk" end

-- Automate the generation of multiples of 1000 from 6000-9000, which follow this rule: [mame of number in thousands place] + "kehsamqahk" for n = 6000, 9000, 1000 do generativeNumList[n] = generativeNumList[n / 1000] .. " kehsamqahk" end

-- Automate the generation of multiples of a million from 2000000-5000000, using this constructor: "[initial root of number in thousands place]alokamqahk" for n = 2000000, 5000000, 1000000 do	local rootPrefix = numbers[n / 1000000].initial_root:sub(1, -2) generativeNumList[n] = rootPrefix .. "alokamqahk" end

-- Automate the generation of multiples of a million from 6000000-9000000, which follow this rule: [mame of number in thousands place] + "kehsalokamqahk" for n = 6000000, 9000000, 1000000 do generativeNumList[n] = generativeNumList[n / 1000000] .. " kehsalokamqahk" end

for n, word in pairs(generativeNumList) do -- 21, 22 and 23, and 31, 32, 33, etc. have alternative forms. if n > 20 and n < 100 and n % 10 ~= 0 and n % 10 <= 3 then numbers[n] = { cardinal = {"" .. word[1] .. "", "" .. word[2] .. ""}, ordinal = {"" .. word[1] .. " kehsewey", "" .. word[2] .. " kehsewey"}, adverbial = "" .. word[3] .. numbers[n % 10].adverbial .. "", adnominal = {"" .. word[1] .. "", "" .. word[2] .. ""} }	-- Pull data from the numbers table elseif n > 20 and n < 100 and n % 10 ~= 0 and n % 10 <= 5 then numbers[n] = { cardinal = "" .. word[1] .. "", ordinal = "" .. word[1] .. " kehsewey", adverbial = "" .. word[2] .. numbers[n % 10].adverbial .. "", adnominal = "" .. word[1] .. "" }	-- Pull data from the generativeNumList table elseif n > 20 and n < 100 and n % 10 ~= 0 then numbers[n] = { cardinal = "" .. word[1] .. "", ordinal = "" .. word[1] .. " kehsewey", adverbial = "" .. word[2] .. generativeNumList[n % 10] .. " kehs", adnominal = "" .. word[1] .. "", }	-- All other numbers else numbers[n] = { cardinal = "" .. word .. "", ordinal = "" .. word .. " kehsewey", adverbial = "" .. word .. " kehs", adnominal = {"" .. word .. " kehsuwok", "" .. word .. " kehsonul"} }		-- Overrides adnominal form for numbers greater than 9. The cardinal and adnominal forms are the same for these numbers. if n > 9 then numbers[n].adnominal = "" .. word .. "" end end end

return export