Jump to content

Module:la-adj/data

From Wiktionary, the free dictionary

This module needs documentation.
Please document this module by describing its purpose and usage on the documentation page.

local decl = {}

local lang = require("Module:languages").getByCode("la")
local m_links = require("Module:links")
local m_utilities = require("Module:utilities")

local rmatch = mw.ustring.match

local function glossary_link(anchor, text)
	text = text or anchor
	return "[[Appendix:Glossary#" .. anchor .. "|" .. text .. "]]"
end

local function decl_link(english_declension, decl_text)
	decl_text = decl_text or english_declension .. "-declension"
	return "[[Appendix:Latin " .. english_declension .. " declension|" .. decl_text .. "]]"
end

local function singularize(plural)
	-- THIS IS A HACK. We may be passed the word "suffix", where we need to remove
	-- the -es. We also include words ending in -ch or -sh for good measure.
	-- In most other cases we need to remove only the -s.
	if plural:find("xes$") or plural:find("[cs]hes$") then
		return plural:gsub("es$", "")
	else
		return plural:gsub("s$", "")
	end
end

decl["0"] = function(data, args)
	data.title = glossary_link("indeclinable") .. " " .. singularize(data.pos)

	local stem = args[1]

	data.forms["nom_sg_m"] = stem
	data.forms["nom_pl_m"] = stem

	data.forms["gen_sg_m"] = stem
	data.forms["gen_pl_m"] = stem

	data.forms["dat_sg_m"] = stem
	data.forms["dat_pl_m"] = stem

	data.forms["acc_sg_m"] = stem
	data.forms["acc_pl_m"] = stem

	data.forms["abl_sg_m"] = stem
	data.forms["abl_pl_m"] = stem

	data.forms["loc_sg_m"] = stem
	data.forms["loc_pl_m"] = stem

	data.forms["voc_sg_m"] = stem
	data.forms["voc_pl_m"] = stem

	table.insert(data.categories, "Latin indeclinable " .. data.pos)
end

decl["1&2"] = function(data, args)
	local singpos = singularize(data.pos)
	if data.gender == "F" then
		data.title = decl_link("first") .. " " .. singpos
	elseif data.gender then
		data.title = decl_link("second") .. " " .. singpos
	else
		data.title = decl_link("first", "first") .. "/" .. decl_link("second") .. " " .. singpos
	end

	local stem = args[1]
	local original = nil

	if data.types.er then
		if mw.ustring.match(stem, "er$") then
			table.insert(data.subtitles, "nominative masculine singular in ''-er''")
			table.insert(data.categories, "Latin first and second declension "
				.. data.pos .. " with nominative masculine singular in -er")
		elseif mw.ustring.match(stem, "ur$") then
			table.insert(data.subtitles, "nominative masculine singular in ''-ur''")
			table.insert(data.categories, "Latin first and second declension "
				.. data.pos .. " with nominative masculine singular in -ur")
		else
			error("Unrecognized ''-r'' stem (doesn't end in ''-er'' or ''-ur''): " .. stem)
		end
		original = stem
		stem = args[2]
	end

	local us = "us"
	local a_sf = "a"
	local um = "um"
	local ae_gsf = "ae"
	local am = "am"
	local a_macron = "ā"

	if data.types.greekA or data.types.greekE then
		table.insert(data.subtitles, "Greek-type")
		table.insert(data.categories, "Latin first and second declension " ..
			data.pos .. " with Greek declension")
		if data.types.greekA then
			us = "os"
			um = "on"
			am = "ān"
		else
			us = "os"
			a_sf = "ē"
			um = "on"
			ae_gsf = "ēs"
			am = "ēn"
			a_macron = "ē"
		end
	end

	data.forms["nom_sg_m"] = original or (stem .. us)
	data.forms["nom_sg_f"] = stem .. a_sf
	data.forms["nom_sg_n"] = stem .. um
	data.forms["nom_pl_m"] = stem .. "ī"
	data.forms["nom_pl_f"] = stem .. "ae"
	data.forms["nom_pl_n"] = stem .. "a"

	data.forms["gen_sg_m"] = stem .. "ī"
	data.forms["gen_sg_f"] = stem .. ae_gsf
	data.forms["gen_sg_n"] = stem .. "ī"
	data.forms["gen_pl_m"] = stem .. "ōrum"
	data.forms["gen_pl_f"] = stem .. "ārum"
	data.forms["gen_pl_n"] = stem .. "ōrum"

	data.forms["dat_sg_m"] = stem .. "ō"
	data.forms["dat_sg_f"] = stem .. "ae"
	data.forms["dat_sg_n"] = stem .. "ō"
	data.forms["dat_pl_m"] = stem .. "īs"
	data.forms["dat_pl_f"] = stem .. "īs"
	data.forms["dat_pl_n"] = stem .. "īs"

	data.forms["acc_sg_m"] = stem .. um
	data.forms["acc_sg_f"] = stem .. am
	data.forms["acc_sg_n"] = stem .. um
	data.forms["acc_pl_m"] = stem .. "ōs"
	data.forms["acc_pl_f"] = stem .. "ās"
	data.forms["acc_pl_n"] = stem .. "a"

	data.forms["abl_sg_m"] = stem .. "ō"
	data.forms["abl_sg_f"] = stem .. a_macron
	data.forms["abl_sg_n"] = stem .. "ō"
	data.forms["abl_pl_m"] = stem .. "īs"
	data.forms["abl_pl_f"] = stem .. "īs"
	data.forms["abl_pl_n"] = stem .. "īs"

	data.forms["voc_sg_m"] = original or (stem .. "e")
	data.forms["voc_sg_f"] = stem .. a_sf
	data.forms["voc_sg_n"] = stem .. um
	data.forms["voc_pl_m"] = stem .. "ī"
	data.forms["voc_pl_f"] = stem .. "ae"
	data.forms["voc_pl_n"] = stem .. "a"

	data.forms["loc_sg_m"] = stem .. "ī"
	data.forms["loc_sg_f"] = stem .. "ae"
	data.forms["loc_sg_n"] = stem .. "ī"
	data.forms["loc_pl_m"] = stem .. "īs"
	data.forms["loc_pl_f"] = stem .. "īs"
	data.forms["loc_pl_n"] = stem .. "īs"

	if data.types.ius then
		table.insert(data.subtitles, "pronominal")
		--table.insert(data.subtitles, "with genitive singular in ''-ī̆us'' and dative singular in ''-ī''")
		table.insert(data.categories, "Latin first and second declension " ..
			data.pos .. " with genitive singular in -ī̆us")
		data.forms["gen_sg_m"] = stem .. "ī̆us"
		data.forms["gen_sg_f"] = stem .. "ī̆us"
		data.forms["gen_sg_n"] = stem .. "ī̆us"
		data.forms["dat_sg_m"] = stem .. "ī"
		data.forms["dat_sg_f"] = stem .. "ī"
		data.forms["dat_sg_n"] = stem .. "ī"
	elseif data.types.not_ius then
		table.insert(data.subtitles, "non-pronominal")
		--table.insert(data.subtitles, "with normal genitive and dative singular")
	end
	if stem == "me" then
		data.forms["voc_sg_m"] = "mī"
	end
	if data.types.ic then
		table.insert(data.subtitles, "''hic''-type")
		--table.insert(data.subtitles, "with genitive singular ending in ''-ius'' and dative singular ending in ''-ic''")

		local oc = "oc"
		local oc_macron = "ōc"
		if stem == "ill" then
			oc = "uc"
			oc_macron = "ūc"
		end

		data.forms["nom_sg_m"] = stem .. "ic"
		data.forms["nom_sg_f"] = stem .. "aec"
		data.forms["nom_sg_n"] = stem .. oc
		data.forms["nom_pl_n"] = stem .. "aec"

		data.forms["gen_sg_m"] = stem .. "uius"
		data.forms["gen_sg_f"] = stem .. "uius"
		data.forms["gen_sg_n"] = stem .. "uius"

		data.forms["dat_sg_m"] = stem .. "uic"
		data.forms["dat_sg_f"] = stem .. "uic"
		data.forms["dat_sg_n"] = stem .. "uic"

		data.forms["acc_sg_m"] = stem .. "unc"
		data.forms["acc_sg_f"] = stem .. "anc"
		data.forms["acc_sg_n"] = stem .. oc
		data.forms["acc_pl_n"] = stem .. "aec"

		data.forms["abl_sg_m"] = stem .. "ōc"
		data.forms["abl_sg_f"] = stem .. "āc"
		data.forms["abl_sg_n"] = stem .. oc_macron

		data.voc = false
	end

	if data.types.distr then
		if mw.ustring.match(stem, "n$") then
			table.insert(data.subtitles, "distributive, normally plural-only; short genitive plurals in ''-num'' preferred")
			data.forms["gen_pl_m"] = {stem .. "um", stem .. "ōrum"}
			data.forms["gen_pl_f"] = {stem .. "um", stem .. "ārum"}
			data.forms["gen_pl_n"] = {stem .. "um", stem .. "ōrum"}
		else
			error("Unrecognized distributive numeral stem (doesn't end in ''n''): " .. stem)
		end
		original = stem
		stem = args[2]
	end
	
	table.insert(data.categories, "Latin first and second declension " ..
		data.pos)
end

decl["1-1"] = function(data, args)
	data.title = decl_link("first") .. " " .. singularize(data.pos)
	table.insert(data.subtitles, "masculine and neuter forms identical to feminine forms")

	local stem = args[1]

	data.forms["nom_sg_m"] = stem .. "a"
	data.forms["nom_pl_m"] = stem .. "ae"
	data.forms["nom_pl_n"] = stem .. "a"

	data.forms["gen_sg_m"] = stem .. "ae"
	data.forms["gen_pl_m"] = stem .. "ārum"

	data.forms["dat_sg_m"] = stem .. "ae"
	data.forms["dat_pl_m"] = stem .. "īs"

	data.forms["acc_sg_m"] = stem .. "am"
	data.forms["acc_sg_n"] = stem .. "a"
	data.forms["acc_pl_m"] = stem .. "ās"
	data.forms["acc_pl_n"] = stem .. "a"

	data.forms["abl_sg_m"] = stem .. "ā"
	data.forms["abl_pl_m"] = stem .. "īs"

	data.forms["loc_sg_m"] = stem .. "ae"
	data.forms["loc_pl_m"] = stem .. "īs"

	data.forms["voc_sg_m"] = stem .. "a"
	data.forms["voc_pl_m"] = stem .. "ae"
	data.forms["voc_pl_n"] = stem .. "a"

	table.insert(data.categories, "Latin first declension " .. data.pos)
end

decl["2-2"] = function(data, args)
	data.title = decl_link("second") .. " " .. singularize(data.pos)
	table.insert(data.subtitles, "feminine forms identical to masculine forms")

	local stem = args[1]

	local us = "us"
	local um = "um"
	local i_pl = "ī"

	if data.types.greek then
		table.insert(data.subtitles, "Greek-type")
		table.insert(data.categories, "Latin second declension " .. data.pos ..
			" with Greek declension")
		us = "os"
		um = "on"
		i_pl = "oe"
	end

	data.forms["nom_sg_m"] = stem .. us
	data.forms["nom_sg_n"] = stem .. um
	data.forms["nom_pl_m"] = stem .. i_pl
	data.forms["nom_pl_n"] = stem .. "a"

	data.forms["gen_sg_m"] = stem .. "ī"
	data.forms["gen_sg_n"] = stem .. "ī"
	data.forms["gen_pl_m"] = stem .. "ōrum"
	data.forms["gen_pl_n"] = stem .. "ōrum"

	data.forms["dat_sg_m"] = stem .. "ō"
	data.forms["dat_sg_n"] = stem .. "ō"
	data.forms["dat_pl_m"] = stem .. "īs"
	data.forms["dat_pl_n"] = stem .. "īs"

	data.forms["acc_sg_m"] = stem .. um
	data.forms["acc_sg_n"] = stem .. um
	data.forms["acc_pl_m"] = stem .. "ōs"
	data.forms["acc_pl_n"] = stem .. "a"

	data.forms["abl_sg_m"] = stem .. "ō"
	data.forms["abl_sg_n"] = stem .. "ō"
	data.forms["abl_pl_m"] = stem .. "īs"
	data.forms["abl_pl_n"] = stem .. "īs"

	data.forms["loc_sg_m"] = stem .. "ī"
	data.forms["loc_sg_n"] = stem .. "ī"
	data.forms["loc_pl_m"] = stem .. "īs"
	data.forms["loc_pl_n"] = stem .. "īs"

	data.forms["voc_sg_m"] = stem .. "e"
	data.forms["voc_sg_n"] = stem .. um
	data.forms["voc_pl_m"] = stem .. i_pl
	data.forms["voc_pl_n"] = stem .. "a"

	table.insert(data.categories, "Latin second declension " .. data.pos)
end

decl["3-1"] = function(data, args)
	local singpos = singularize(data.pos)
	if data.gender then
		data.title = decl_link("third") .. " " .. singpos
	else
		data.title = decl_link("third") .. " one-termination " .. singpos
	end

	local stem1 = args[1]
	local stem2 = args[2]

	data.forms["nom_sg_m"] = stem1
	data.forms["nom_sg_n"] = stem1
	data.forms["nom_pl_m"] = stem2 .. "ēs"
	data.forms["nom_pl_n"] = stem2 .. "ia"

	data.forms["gen_sg_m"] = stem2 .. "is"
	data.forms["gen_sg_n"] = stem2 .. "is"
	data.forms["gen_pl_m"] = stem2 .. "ium"
	data.forms["gen_pl_n"] = stem2 .. "ium"

	data.forms["dat_sg_m"] = stem2 .. "ī"
	data.forms["dat_sg_n"] = stem2 .. "ī"
	data.forms["dat_pl_m"] = stem2 .. "ibus"
	data.forms["dat_pl_n"] = stem2 .. "ibus"

	data.forms["acc_sg_m"] = stem2 .. "em"
	data.forms["acc_sg_n"] = stem1
	data.forms["acc_pl_m"] = stem2 .. "ēs"
	data.forms["acc_pl_n"] = stem2 .. "ia"

	data.forms["abl_sg_m"] = stem2 .. "ī"
	data.forms["abl_sg_n"] = stem2 .. "ī"
	data.forms["abl_pl_m"] = stem2 .. "ibus"
	data.forms["abl_pl_n"] = stem2 .. "ibus"

	data.forms["loc_sg_m"] = stem2 .. "ī"
	data.forms["loc_sg_n"] = stem2 .. "ī"
	data.forms["loc_pl_m"] = stem2 .. "ibus"
	data.forms["loc_pl_n"] = stem2 .. "ibus"

	data.forms["voc_sg_m"] = stem1
	data.forms["voc_sg_n"] = stem1
	data.forms["voc_pl_m"] = stem2 .. "ēs"
	data.forms["voc_pl_n"] = stem2 .. "ia"

	if data.types.par then
		table.insert(data.subtitles, "non-i-stem")
		data.forms["nom_pl_n"] = stem2 .. "a"
		data.forms["gen_pl_m"] = stem2 .. "um"
		data.forms["gen_pl_n"] = stem2 .. "um"
		data.forms["abl_sg_m"] = stem2 .. "e"
		data.forms["abl_sg_n"] = stem2 .. "e"
		data.forms["loc_sg_m"] = {stem2 .. "ī", stem2 .. "e"}
		data.forms["loc_sg_n"] = {stem2 .. "ī", stem2 .. "e"}
		data.forms["acc_pl_n"] = stem2 .. "a"
		data.forms["voc_pl_n"] = stem2 .. "a"
	elseif data.types.not_par then
		table.insert(data.subtitles, "i-stem")
	end

	if data.types.trix then
		table.insert(data.subtitles, "feminine-only in the singular, feminine- and neuter-only in the plural")
		data.forms["nom_sg_m"] = ""
		data.forms["gen_sg_m"] = ""
		data.forms["dat_sg_m"] = ""
		data.forms["acc_sg_m"] = ""
		data.forms["abl_sg_m"] = ""
		data.forms["voc_sg_m"] = ""
		data.forms["nom_sg_f"] = stem1
		data.forms["gen_sg_f"] = stem2 .. "is"
		data.forms["dat_sg_f"] = stem2 .. "ī"
		data.forms["acc_sg_f"] = stem2 .. "em"
		data.forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"}
		data.forms["voc_sg_f"] = stem1
		data.forms["nom_sg_n"] = ""
		data.forms["gen_sg_n"] = ""
		data.forms["dat_sg_n"] = ""
		data.forms["acc_sg_n"] = ""
		data.forms["abl_sg_n"] = ""
		data.forms["voc_sg_n"] = ""
		data.forms["nom_pl_m"] = ""
		data.forms["gen_pl_m"] = ""
		data.forms["dat_pl_m"] = ""
		data.forms["acc_pl_m"] = ""
		data.forms["abl_pl_m"] = ""
		data.forms["voc_pl_m"] = ""
		data.forms["nom_pl_f"] = stem2 .. "ēs"
		data.forms["gen_pl_f"] = stem2 .. "ium"
		data.forms["dat_pl_f"] = stem2 .. "ibus"
		data.forms["acc_pl_f"] = stem2 .. "ēs"
		data.forms["abl_pl_f"] = stem2 .. "ibus"
		data.forms["voc_pl_f"] = stem2 .. "ēs"
	end

	local es_base = rmatch(stem1, "^(.*)ēs$")
	if es_base and es_base == stem2 then
		if data.types.greek then
			local note = "It is unknown if Classical Latin preserved (or would have preserved) the shortness of the original Greek short ending."
			local note2 = "It is unknown whether adjectives of this type would use i-stem or consonant-stem endings in Classical Latin: the relevant forms are not attested. Depending on the word, either ending or both may be attested in New Latin."
			data.forms["nom_sg_n"] = {stem2 .. "es", stem2 .. "ēs"}
			data.notes["nom_sg_n1"] = note
			data.forms["acc_sg_n"] = {stem2 .. "es", stem2 .. "ēs"}
			data.notes["acc_sg_n1"] = note
			data.forms["voc_sg_m"] = {stem2 .. "es", stem2 .. "ēs"}
			data.notes["voc_sg_m1"] = note
			data.forms["voc_sg_n"] = {stem2 .. "es", stem2 .. "ēs"}
			data.notes["voc_sg_n1"] = note
			data.forms["nom_pl_n"] = {stem2 .. "a", stem2 .. "ia"}
			data.notes["nom_pl_n2"] = note2
			data.forms["acc_pl_n"] = {stem2 .. "a", stem2 .. "ia"}
			data.notes["acc_pl_n2"] = note2
			data.forms["voc_pl_n"] = {stem2 .. "a", stem2 .. "ia"}
			data.notes["voc_pl_n2"] = note2
			data.forms["abl_sg_m"] = {stem2 .. "e", stem2 .. "ī"}
			data.notes["abl_sg_m2"] = note2
			data.forms["abl_sg_f"] = {stem2 .. "e", stem2 .. "ī"}
			data.notes["abl_sg_f2"] = note2
			data.forms["abl_sg_n"] = {stem2 .. "e", stem2 .. "ī"}
			data.notes["abl_sg_n2"] = note2
			data.forms["gen_pl_m"] = {stem2 .. "um", stem2 .. "ium"}
			data.notes["gen_pl_m2"] = note2
			data.forms["gen_pl_f"] = {stem2 .. "um", stem2 .. "ium"}
			data.notes["gen_pl_f2"] = note2
			data.forms["gen_pl_n"] = {stem2 .. "um", stem2 .. "ium"}
			data.notes["gen_pl_n2"] = note2
			table.insert(data.subtitles, "Greek-type")
		elseif data.types.not_greek then
			table.insert(data.subtitles, "non-Greek-type")
		end
	end

	table.insert(data.categories, "Latin third declension " .. data.pos)
	table.insert(data.categories, "Latin third declension " .. data.pos .. " of one termination")
end

decl["3-C"] = function(data, args)
	local singpos = singularize(data.pos)
    data.title = decl_link("third") .. " comparative " .. singularize(data.pos)

	local stem = args[1]

	data.forms["nom_sg_m"] = stem .. "or"
	data.forms["nom_sg_f"] = stem .. "or"
	data.forms["nom_sg_n"] = stem .. "us"
	data.forms["nom_pl_m"] = stem .. "ōrēs"
	data.forms["nom_pl_f"] = stem .. "ōrēs"
	data.forms["nom_pl_n"] = stem .. "ōra"

	data.forms["gen_sg_m"] = stem .. "ōris"
	data.forms["gen_sg_f"] = stem .. "ōris"
	data.forms["gen_sg_n"] = stem .. "ōris"
	data.forms["gen_pl_m"] = stem .. "ōrum"
	data.forms["gen_pl_f"] = stem .. "ōrum"
	data.forms["gen_pl_n"] = stem .. "ōrum"

	data.forms["dat_sg_m"] = stem .. "ōrī"
	data.forms["dat_sg_f"] = stem .. "ōrī"
	data.forms["dat_sg_n"] = stem .. "ōrī"
	data.forms["dat_pl_m"] = stem .. "ōribus"
	data.forms["dat_pl_f"] = stem .. "ōribus"
	data.forms["dat_pl_n"] = stem .. "ōribus"

	data.forms["acc_sg_m"] = stem .. "ōrem"
	data.forms["acc_sg_f"] = stem .. "ōrem"
	data.forms["acc_sg_n"] = stem .. "us"
	data.forms["acc_pl_m"] = {stem .. "ōrēs", stem .. "ōrīs"}
	data.forms["acc_pl_f"] = {stem .. "ōrēs", stem .. "ōrīs"}
	data.forms["acc_pl_n"] = stem .. "ōra"

	data.forms["abl_sg_m"] = {stem .. "ōre", stem .. "ōrī"}
	data.forms["abl_sg_f"] = {stem .. "ōre", stem .. "ōrī"}
	data.forms["abl_sg_n"] = {stem .. "ōre", stem .. "ōrī"}
	data.forms["abl_pl_m"] = stem .. "ōribus"
	data.forms["abl_pl_f"] = stem .. "ōribus"
	data.forms["abl_pl_n"] = stem .. "ōribus"

	data.forms["loc_sg_m"] = {stem .. "ōrī", stem .. "ōre"}
	data.forms["loc_sg_f"] = {stem .. "ōrī", stem .. "ōre"}
	data.forms["loc_sg_n"] = {stem .. "ōrī", stem .. "ōre"}
	data.forms["loc_pl_m"] = stem .. "ōribus"
	data.forms["loc_pl_f"] = stem .. "ōribus"
	data.forms["loc_pl_n"] = stem .. "ōribus"

	data.forms["voc_sg_m"] = stem .. "or"
	data.forms["voc_sg_f"] = stem .. "or"
	data.forms["voc_sg_n"] = stem .. "us"
	data.forms["voc_pl_m"] = stem .. "ōrēs"
	data.forms["voc_pl_f"] = stem .. "ōrēs"
	data.forms["voc_pl_n"] = stem .. "ōra"

	table.insert(data.categories, "Latin third declension " .. data.pos)
	table.insert(data.categories, "Latin comparative adjectives")

end

decl["3-P"] = function(data, args)
	local stem1 = args[1]
	local stem2 = args[2]

	decl["3-1"](data, args)
	data.title = decl_link("third") .. " participle"

	data.forms["abl_sg_m"] = {stem2 .. "e", stem2 .. "ī"}
	data.notes["abl_sg_m2"] = "When used purely as an adjective."
	data.forms["abl_sg_n"] = {stem2 .. "e", stem2 .. "ī"}
	data.notes["abl_sg_n2"] = "When used purely as an adjective."
	data.forms["acc_pl_m"] = {stem2 .. "ēs", stem2 .. "īs"}
end

decl["3-2"] = function(data, args)
	local singpos = singularize(data.pos)
	if data.gender then
		data.title = decl_link("third") .. " " .. singpos
	else
		data.title = decl_link("third") .. " two-termination " .. singpos
	end

	local stem = args[1]
	local stem2 = args[2]

	data.forms["nom_sg_m"] = stem .. "is"
	data.forms["nom_sg_n"] = stem .. "e"
	data.forms["nom_pl_m"] = stem .. "ēs"
	data.forms["nom_pl_n"] = stem .. "ia"

	data.forms["gen_sg_m"] = stem .. "is"
	data.forms["gen_sg_n"] = stem .. "is"
	data.forms["gen_pl_m"] = stem .. "ium"
	data.forms["gen_pl_n"] = stem .. "ium"

	data.forms["dat_sg_m"] = stem .. "ī"
	data.forms["dat_sg_n"] = stem .. "ī"
	data.forms["dat_pl_m"] = stem .. "ibus"
	data.forms["dat_pl_n"] = stem .. "ibus"

	data.forms["acc_sg_m"] = stem .. "em"
	data.forms["acc_sg_n"] = stem .. "e"
	data.forms["acc_pl_m"] = {stem .. "ēs", stem .. "īs"}
	data.forms["acc_pl_n"] = stem .. "ia"

	data.forms["abl_sg_m"] = stem .. "ī"
	data.forms["abl_sg_n"] = stem .. "ī"
	data.forms["abl_pl_m"] = stem .. "ibus"
	data.forms["abl_pl_n"] = stem .. "ibus"

	data.forms["loc_sg_m"] = stem .. "ī"
	data.forms["loc_sg_n"] = stem .. "ī"
	data.forms["loc_pl_m"] = stem .. "ibus"
	data.forms["loc_pl_n"] = stem .. "ibus"

	data.forms["voc_sg_m"] = stem .. "is"
	data.forms["voc_sg_n"] = stem .. "e"
	data.forms["voc_pl_m"] = stem .. "ēs"
	data.forms["voc_pl_n"] = stem .. "ia"

	table.insert(data.categories, "Latin third declension " .. data.pos)
	table.insert(data.categories, "Latin third declension " .. data.pos .. " of two terminations")
end

decl["3-3"] = function(data, args)
	local singpos = singularize(data.pos)
	if data.gender then
		data.title = decl_link("third") .. " " .. singpos
	else
		data.title = decl_link("third") .. " three-termination " .. singpos
	end

	local stem1 = args[1]
	local stem2 = args[2]

	data.forms["nom_sg_m"] = stem1
	data.forms["nom_sg_f"] = stem2 .. "is"
	data.forms["nom_sg_n"] = stem2 .. "e"
	data.forms["nom_pl_m"] = stem2 .. "ēs"
	data.forms["nom_pl_f"] = stem2 .. "ēs"
	data.forms["nom_pl_n"] = stem2 .. "ia"

	data.forms["gen_sg_m"] = stem2 .. "is"
	data.forms["gen_sg_f"] = stem2 .. "is"
	data.forms["gen_sg_n"] = stem2 .. "is"
	data.forms["gen_pl_m"] = stem2 .. "ium"
	data.forms["gen_pl_f"] = stem2 .. "ium"
	data.forms["gen_pl_n"] = stem2 .. "ium"

	data.forms["dat_sg_m"] = stem2 .. "ī"
	data.forms["dat_sg_f"] = stem2 .. "ī"
	data.forms["dat_sg_n"] = stem2 .. "ī"
	data.forms["dat_pl_m"] = stem2 .. "ibus"
	data.forms["dat_pl_f"] = stem2 .. "ibus"
	data.forms["dat_pl_n"] = stem2 .. "ibus"

	data.forms["acc_sg_m"] = stem2 .. "em"
	data.forms["acc_sg_f"] = stem2 .. "em"
	data.forms["acc_sg_n"] = stem2 .. "e"
	data.forms["acc_pl_m"] = stem2 .. "ēs"
	data.forms["acc_pl_f"] = stem2 .. "ēs"
	data.forms["acc_pl_n"] = stem2 .. "ia"

	data.forms["abl_sg_m"] = stem2 .. "ī"
	data.forms["abl_sg_f"] = stem2 .. "ī"
	data.forms["abl_sg_n"] = stem2 .. "ī"
	data.forms["abl_pl_m"] = stem2 .. "ibus"
	data.forms["abl_pl_f"] = stem2 .. "ibus"
	data.forms["abl_pl_n"] = stem2 .. "ibus"

	data.forms["loc_sg_m"] = stem2 .. "ī"
	data.forms["loc_sg_f"] = stem2 .. "ī"
	data.forms["loc_sg_n"] = stem2 .. "ī"
	data.forms["loc_pl_m"] = stem2 .. "ibus"
	data.forms["loc_pl_f"] = stem2 .. "ibus"
	data.forms["loc_pl_n"] = stem2 .. "ibus"

	data.forms["voc_sg_m"] = stem1
	data.forms["voc_sg_f"] = stem2 .. "is"
	data.forms["voc_sg_n"] = stem2 .. "e"
	data.forms["voc_pl_m"] = stem2 .. "ēs"
	data.forms["voc_pl_f"] = stem2 .. "ēs"
	data.forms["voc_pl_n"] = stem2 .. "ia"

	table.insert(data.categories, "Latin third declension " .. data.pos)
	table.insert(data.categories, "Latin third declension " .. data.pos .. " of three terminations")
end

decl["irreg"] = function(data,args)
	if args[1] == "duo" or args[1] == "ambō" then
		local stem = args[1] == "duo" and "du" or "amb"
		data.title = stem == "amb" and glossary_link("irregular") .. " adjective" or "numeral"
		data.num = "pl"

		local stem_with_o = stem .. (stem == "amb" and "ō" or "o")

		data.forms["nom_pl_m"] = stem_with_o
		data.forms["nom_pl_f"] = stem .. "ae"
		data.forms["nom_pl_n"] = stem_with_o

		data.forms["gen_pl_m"] = stem .. "ōrum"
		data.forms["gen_pl_f"] = stem .. "ārum"
		data.forms["gen_pl_n"] = stem .. "ōrum"

		data.forms["dat_pl_m"] = stem .. "ōbus"
		data.forms["dat_pl_f"] = stem .. "ābus"
		data.forms["dat_pl_n"] = stem .. "ōbus"

		data.forms["acc_pl_m"] = {stem .. "ōs", stem_with_o}
		data.forms["acc_pl_f"] = stem .. "ās"
		data.forms["acc_pl_n"] = stem_with_o

		data.forms["abl_pl_m"] = stem .. "ōbus"
		data.forms["abl_pl_f"] = stem .. "ābus"
		data.forms["abl_pl_n"] = stem .. "ōbus"

		data.forms["voc_pl_m"] = stem_with_o
		data.forms["voc_pl_f"] = stem .. "ae"
		data.forms["voc_pl_n"] = stem_with_o

		if stem == "du" then
			data.footnote = "Note: The masculine and neuter genitive of ''duo'' can alternatively be ''[[duum]]'' (also spelt ''[[duûm]]'')."
		end

	elseif args[1] == "mīlle" then
		data.title = "semi-" .. glossary_link("indeclinable") .. " numeral"
		data.forms["nom_sg_m"] = "mīlle"
		data.forms["nom_pl_m"] = {"mīlia", "mīllia"}

		data.forms["gen_sg_m"] = "mīlle"
		data.forms["gen_pl_m"] = {"mīlium", "mīllium"}

		data.forms["dat_sg_m"] = "mīlle"
		data.forms["dat_pl_m"] = {"mīlibus", "mīllibus"}

		data.forms["acc_sg_m"] = "mīlle"
		data.forms["acc_pl_m"] = {"mīlia", "mīllia"}

		data.forms["abl_sg_m"] = "mīlle"
		data.forms["abl_pl_m"] = {"mīlibus", "mīllibus"}

		data.forms["voc_sg_m"] = "mīlle"
		data.forms["voc_pl_m"] = {"mīlia", "mīllia"}
		
	elseif args[1] == "sēsquimīlle" then
		data.title = "semi-" .. glossary_link("indeclinable") .. " numeral"
		data.forms["nom_sg_m"] = "sēsquimīlle"
		data.forms["nom_pl_m"] = {"sēsquimīlia", "sēsquimīllia"}

		data.forms["gen_sg_m"] = "sēsquimīlle"
		data.forms["gen_pl_m"] = {"sēsquimīlium", "sēsquimīllium"}

		data.forms["dat_sg_m"] = "sēsquimīlle"
		data.forms["dat_pl_m"] = {"sēsquimīlibus", "sēsquimīllibus"}

		data.forms["acc_sg_m"] = "sēsquimīlle"
		data.forms["acc_pl_m"] = {"sēsquimīlia", "sēsquimīllia"}

		data.forms["abl_sg_m"] = "sēsquimīlle"
		data.forms["abl_pl_m"] = {"sēsquimīlibus", "sēsquimīllibus"}

		data.forms["voc_sg_m"] = "sēsquimīlle"
		data.forms["voc_pl_m"] = {"sēsquimīlia", "sēsquimīllia"}

	elseif args[1] == "illic" then
		data.title = glossary_link("demonstrative") .. " pronoun"

		data.forms["nom_sg_m"] = "illic"
		data.forms["nom_sg_f"] = "illaec"
		data.forms["nom_sg_n"] = {"illuc", "illoc"}
		data.forms["nom_pl_m"] = ""
		data.forms["nom_pl_f"] = ""
		data.forms["nom_pl_n"] = "illaec"

		data.forms["gen_sg_m"] = ""
		data.forms["gen_sg_f"] = ""
		data.forms["gen_sg_n"] = ""
		data.forms["gen_pl_m"] = ""
		data.forms["gen_pl_f"] = ""
		data.forms["gen_pl_n"] = ""

		data.forms["dat_sg_m"] = ""
		data.forms["dat_sg_f"] = ""
		data.forms["dat_sg_n"] = ""
		data.forms["dat_pl_m"] = ""
		data.forms["dat_pl_f"] = ""
		data.forms["dat_pl_n"] = ""

		data.forms["acc_sg_m"] = "illunc"
		data.forms["acc_sg_f"] = "illanc"
		data.forms["acc_sg_n"] = {"illuc", "illoc"}
		data.forms["acc_pl_m"] = ""
		data.forms["acc_pl_f"] = ""
		data.forms["acc_pl_n"] = "illaec"

		data.forms["abl_sg_m"] = "illōc"
		data.forms["abl_sg_f"] = "illāc"
		data.forms["abl_sg_n"] = "illōc"
		data.forms["abl_pl_m"] = ""
		data.forms["abl_pl_f"] = ""
		data.forms["abl_pl_n"] = ""

		data.voc = false

	elseif args[1] == "hice" then
		data.title = glossary_link("demonstrative") .. " pronoun"

		data.forms["nom_sg_m"] = "hice"
		data.forms["nom_sg_f"] = "haece"
		data.forms["nom_sg_n"] = "hoce"
		data.forms["nom_pl_m"] = "hīce"
		data.forms["nom_pl_f"] = "haece"
		data.forms["nom_pl_n"] = "haece"

		data.forms["gen_sg_m"] = "huiusce"
		data.forms["gen_sg_f"] = "huiusce"
		data.forms["gen_sg_n"] = "huiusce"
		data.forms["gen_pl_m"] = {"hōrunce", "hōrumce"}
		data.forms["gen_pl_f"] = {"hārunce", "hārumce"}
		data.forms["gen_pl_n"] = {"hōrunce", "hōrumce"}

		data.forms["dat_sg_m"] = "huīce"
		data.forms["dat_sg_f"] = "huīce"
		data.forms["dat_sg_n"] = "huīce"
		data.forms["dat_pl_m"] = "hīsce"
		data.forms["dat_pl_f"] = "hīsce"
		data.forms["dat_pl_n"] = "hīsce"

		data.forms["acc_sg_m"] = "hunce"
		data.forms["acc_sg_f"] = "hance"
		data.forms["acc_sg_n"] = "hoce"
		data.forms["acc_pl_m"] = "hōsce"
		data.forms["acc_pl_f"] = "hāsce"
		data.forms["acc_pl_n"] = "haece"

		data.forms["abl_sg_m"] = "hōce"
		data.forms["abl_sg_f"] = "hāce"
		data.forms["abl_sg_n"] = "hōce"
		data.forms["abl_pl_m"] = "hīsce"
		data.forms["abl_pl_f"] = "hīsce"
		data.forms["abl_pl_n"] = "hīsce"

		data.voc = false

	elseif args[1] == "plūs" then
		data.title = glossary_link("irregular") .. " " .. decl_link("third") .. " comparative adjective"

		data.forms["nom_sg_m"] = ""
		data.forms["nom_sg_n"] = "plūs"
		data.forms["nom_pl_m"] = "plūrēs"
		data.forms["nom_pl_n"] = "plūra"

		data.forms["gen_sg_m"] = ""
		data.forms["gen_sg_n"] = "plūris"
		data.forms["gen_pl_m"] = "plūrium"
		data.forms["gen_pl_n"] = "plūrium"

		data.forms["dat_sg_m"] = ""
		data.forms["dat_sg_n"] = ""
		data.forms["dat_pl_m"] = "plūribus"
		data.forms["dat_pl_n"] = "plūribus"

		data.forms["acc_sg_m"] = ""
		data.forms["acc_sg_n"] = "plūs"
		data.forms["acc_pl_m"] = "plūrēs"
		data.forms["acc_pl_n"] = "plūra"

		data.forms["abl_sg_m"] = ""
		data.forms["abl_sg_n"] = "plūre"
		data.forms["abl_pl_m"] = "plūribus"
		data.forms["abl_pl_n"] = "plūribus"

		data.forms["voc_sg_m"] = ""
		data.forms["voc_sg_n"] = "plūs"
		data.forms["voc_pl_m"] = "plūrēs"
		data.forms["voc_pl_n"] = "plūra"

		data.footnote = "Note: Singular forms take the genitive of the whole and do not function as adjectives."

		table.insert(data.categories, "Latin third declension " .. data.pos)
		table.insert(data.categories, "Latin third declension " .. data.pos .. " of one termination")
	elseif args[1] == "is" or args[1] == "īdem" then
		data.title = glossary_link("demonstrative") .. " pronoun"

		local note1 = "The dat. singular is found spelled <small>EIEI</small> (here represented as ''ēī'') and scanned as two longs in Plautus, but also as a monosyllable. The latter is its normal scansion in Classical. Other spellings include <small>EEI, IEI</small>."

		local note2 = "The nom./dat./abl. plural forms regularly developed into a monosyllable  /iː(s)/, with later remodelling - compare the etymology of [[deus]]. This /iː/ was normally spelled as <small>EI</small> during and as <small>II</small> after the Republic; a disyllabic ''iī'', spelled <small>II, Iꟾ</small>, appears in Silver Age poetry, while disyllabic ''eīs'' is only post-Classical. Other spellings include <small>EEI(S), EIEI(S), IEI(S)</small>."

		data.forms["nom_sg_m"] = "is"
		data.forms["nom_sg_f"] = "ea"
		data.forms["nom_sg_n"] = "id"
		data.forms["nom_pl_m"] = {"eī", "iī", "ī"}
		data.notes["nom_pl_m1"] = note2
		data.forms["nom_pl_f"] = "eae"
		data.forms["nom_pl_n"] = "ea"

		data.forms["gen_sg_m"] = {"eius", "ejus"}
		data.forms["gen_sg_f"] = {"eius", "ejus"}
		data.forms["gen_sg_n"] = {"eius", "ejus"}
		data.forms["gen_pl_m"] = {"eōrum", "eum"}
		data.forms["gen_pl_f"] = "eārum"
		data.forms["gen_pl_n"] = {"eōrum", "eum"}


		data.forms["dat_sg_m"] = {"eī", "e͡i", "ēī"}
		data.notes["dat_sg_m1"] = note1
		data.forms["dat_sg_f"] = {"eī", "e͡i", "ēī", "eae"}
		data.notes["dat_sg_f1"] = note1
		data.forms["dat_sg_n"] = {"eī", "e͡i", "ēī"}
		data.notes["dat_sg_n1"] = note1
		data.forms["dat_pl_m"] = {"eīs", "iīs", "īs"}
		data.notes["dat_pl_m1"] = note2
		data.forms["dat_pl_f"] = {"eīs", "iīs", "īs", "eābus"}
		data.notes["dat_pl_f1"] = note2
		data.forms["dat_pl_n"] = {"eīs", "iīs", "īs"}
		data.notes["dat_pl_n1"] = note2

		data.forms["acc_sg_m"] = "eum"
		data.forms["acc_sg_f"] = "eam"
		data.forms["acc_sg_n"] = "id"
		data.forms["acc_pl_m"] = "eōs"
		data.forms["acc_pl_f"] = "eās"
		data.forms["acc_pl_n"] = "ea"

		data.forms["abl_sg_m"] = "eō"
		data.forms["abl_sg_f"] = "eā"
		data.forms["abl_sg_n"] = "eō"
		data.forms["abl_pl_m"] = {"eīs", "iīs", "īs"}
		data.notes["abl_pl_m1"] = note2
		data.forms["abl_pl_f"] = {"eīs", "iīs", "īs"}
		data.notes["abl_pl_f1"] = note2
		data.forms["abl_pl_n"] = {"eīs", "iīs", "īs"}
		data.notes["abl_pl_n1"] = note2

		data.voc = false

		if args[1] == "īdem" then
			data.forms["nom_sg_m"] = "ī"
			data.forms["nom_sg_n"] = "i"
			data.forms["nom_pl_m"] = "ī"
			data.forms["acc_sg_n"] = "i"
		end
	elseif args[1] == "ille" then
		data.types.ius = true

		decl["1&2"](data, {"ill"})

		data.title = glossary_link("demonstrative") .. " pronoun"

		data.forms["nom_sg_m"] = "ille"
		data.forms["nom_sg_n"] = "illud"

		data.forms["acc_sg_n"] = "illud"

		data.voc = false

		data.categories = {}
	elseif args[1] == "iste" then
		data.types.ius = true

		decl["1&2"](data, {"ist"})

		data.title = glossary_link("demonstrative") .. " pronoun"

		data.forms["nom_sg_m"] = "iste"
		data.forms["nom_sg_n"] = "istud"

		data.forms["acc_sg_n"] = "istud"

		data.voc = false

		data.categories = {}
	elseif args[1] == "ipse" then
		data.types.ius = true

		decl["1&2"](data, {"ips"})

		data.title = glossary_link("demonstrative") .. " pronoun"

		data.forms["nom_sg_m"] = "ipse"
		data.forms["nom_sg_n"] = "ipsum"

		data.forms["acc_sg_n"] = "ipsum"

		data.voc = false

		data.categories = {}
	elseif args[1] == "quis" or args[1] == "quī" then

		local note1 = "When used as an indefinite word (pronoun or adjective), the feminine nominative singular and neuter nominative/accusative plural is usually ''qua'' (with short ''ă'') instead of ''quae''. Indefinite ''quă'' is generally only found directly after ''[[si#Latin|sī]]'', ''[[nisi#Latin|nisi]]'', ''[[num#Latin|num]]'', or ''[[ne#Latin|nē]]'' and may be considered to be either enclitic to the preceding word or (in Priscian's view) forming a compound with it; accordingly, ''[[siqua#Latin|sīqua]]'', ''[[numqua#Latin|numqua]]'', and ''[[nequa#Latin|nēqua]]'' are sometimes written together (as also are the masculines ''[[siquis#Latin|sīquis]]'', ''[[numquis#Latin|numquis]]'', and ''[[nequis#Latin|nēquis]]''). The form ''quă'' is never used for the feminine plural, nor for any form of the relative pronoun or of the interrogative pronoun or adjective."

		local note2 = "In Republican Latin or earlier, alternative spellings could be found for the following forms of [[qui#Latin|quī]]/[[quis#Latin|quis]] and its compounds: the masculine nominative singular or plural ''quī'' (old spelling ''[[quei]]''), the genitive singular ''cuius'' (old spelling ''[[quoius]]''), the dative singular ''cui'' (old spelling ''[[quoi]]'' or ''[[quoiei]]''), the dative/ablative plural ''quīs'' (old spelling ''[[queis]]'')."

		local id = "id"
		if args[1] == "quī" then
			id = "od"
			data.forms["nom_sg_m"] = {"quī", "quis"}
			data.notes["nom_sg_m1"] = note2
			data.forms["nom_sg_f"] = {"quae", "qua"}
			data.notes["nom_sg_f2"] = note1
			data.forms["acc_sg_f"] = "quam"
			data.forms["abl_sg_m"] = "quō"
			data.forms["abl_sg_f"] = "quā"
			data.forms["abl_sg_n"] = "quō"
		else
			data.forms["nom_sg_m"] = {"quis", "quī"}
			data.notes["nom_sg_m2"] = note2
			data.forms["nom_sg_f"] = {"quae", "qua", "quis"}
			data.notes["nom_sg_f2"] = note1
			data.forms["acc_sg_f"] = {"quam", "quem"}
			data.forms["abl_sg_m"] = {"quō", "quī"}
			data.forms["abl_sg_f"] = {"quā", "quī"}
			data.forms["abl_sg_n"] = {"quō", "quī"}
		end
		data.title = glossary_link("relative") .. "/" .. glossary_link("interrogative") .. " pronoun"

		data.forms["nom_sg_n"] = "qu"..id
		data.forms["nom_pl_m"] = "quī"
		data.notes["nom_pl_m1"] = note2
		data.forms["nom_pl_f"] = "quae"
		data.forms["nom_pl_n"] = {"quae", "qua"}
		data.notes["nom_pl_n2"] = note1

		data.forms["gen_sg_m"] = "cuius"
		data.forms["gen_sg_f"] = "cuius"
		data.forms["gen_sg_n"] = "cuius"
		data.notes["gen_sg_m1"] = note2
		data.notes["gen_sg_f1"] = note2
		data.notes["gen_sg_n1"] = note2
		data.forms["gen_pl_m"] = "quōrum"
		data.forms["gen_pl_f"] = "quārum"
		data.forms["gen_pl_n"] = "quōrum"

		data.forms["dat_sg_m"] = "cui"
		data.forms["dat_sg_f"] = "cui"
		data.forms["dat_sg_n"] = "cui"
		data.notes["dat_sg_m1"] = note2
		data.notes["dat_sg_f1"] = note2
		data.notes["dat_sg_n1"] = note2
		data.forms["dat_pl_m"] = {"quibus", "quīs"}
		data.forms["dat_pl_f"] = {"quibus", "quīs"}
		data.forms["dat_pl_n"] = {"quibus", "quīs"}
		data.notes["dat_pl_m2"] = note2
		data.notes["dat_pl_f2"] = note2
		data.notes["dat_pl_n2"] = note2

		data.forms["acc_sg_m"] = "quem"
		data.forms["acc_sg_n"] = "qu"..id
		data.forms["acc_pl_m"] = "quōs"
		data.forms["acc_pl_f"] = "quās"
		data.forms["acc_pl_n"] = {"quae", "qua"}
		data.notes["acc_pl_n2"] = note1

		data.forms["abl_pl_m"] = {"quibus", "quīs"}
		data.forms["abl_pl_f"] = {"quibus", "quīs"}
		data.forms["abl_pl_n"] = {"quibus", "quīs"}
		data.notes["abl_pl_m2"] = note2
		data.notes["abl_pl_f2"] = note2
		data.notes["abl_pl_n2"] = note2

		data.voc = false

	elseif args[1] == "aliquī" then
		data.title = glossary_link("indefinite") .. " " .. glossary_link("determiner")
		
		local note1 = "Normatively, [[aliqui#Latin|aliquī]] is a determiner (used adjectivally) and [[aliquis#Latin|aliquis]] is a pronoun (used substantively), but the opposite usages can be found, even among the best Classical writers."
		local note2 = "The feminine nominative singular form is usually ''aliqua'', but there are a handful of possible examples of ''aliquae'' as a feminine nominative singular form; see [[Citations:aliquae]]. The feminine nominative plural can only be ''aliquae'', and there are perhaps no solid examples of the neuter nominative/accusative plural taking any form other than ''aliqua''."
		local note3 = "Alternative spelling [[aliquoius]] (used in Republican Latin or earlier)."
		local note4 = "Alternative spelling [[aliqueis]] (used in Republican Latin or earlier)."
		local note5 = "Alternative spelling [[aliquoi]] (used in Republican Latin or earlier)."
		
		data.forms["nom_sg_m"] = {"aliquī", "aliquis"}
		data.notes["nom_sg_m2"] = note1
		data.forms["nom_sg_f"] = "aliqua"
		data.notes["nom_sg_f1"] = note2
		data.forms["nom_sg_n"] = "aliquod"
		data.forms["nom_pl_m"] = "aliquī"
		data.forms["nom_pl_f"] = "aliquae"
		data.notes["nom_pl_f1"] = note2
		data.forms["nom_pl_n"] = "aliqua"
		data.notes["nom_pl_n1"] = note2

		data.forms["gen_sg_m"] = "alicuius"
		data.notes["gen_sg_m1"] = note3
		data.forms["gen_sg_f"] = "alicuius"
		data.notes["gen_sg_f1"] = note3
		data.forms["gen_sg_n"] = "alicuius"
		data.notes["gen_sg_n1"] = note3
		data.forms["gen_pl_m"] = "aliquōrum"
		data.forms["gen_pl_f"] = "aliquārum"
		data.forms["gen_pl_n"] = "aliquōrum"
		
		data.forms["dat_sg_m"] = "alicui"
		data.notes["dat_sg_m1"] = note5
		data.forms["dat_sg_f"] = "alicui"
		data.notes["dat_sg_f1"] = note5
		data.forms["dat_sg_n"] = "alicui"
		data.notes["dat_sg_n1"] = note5
		data.forms["dat_pl_m"] = {"aliquīs", "aliquibus"}
		data.notes["dat_pl_m1"] = note4
		data.forms["dat_pl_f"] = {"aliquīs", "aliquibus"}
		data.notes["dat_pl_f1"] = note4
		data.forms["dat_pl_n"] = {"aliquīs", "aliquibus"}
		data.notes["dat_pl_n1"] = note4
	
		data.forms["acc_sg_m"] = "aliquem"
		data.forms["acc_sg_f"] = "aliquam"
		data.forms["acc_sg_n"] = "aliquod"
		data.forms["acc_pl_m"] = "aliquōs"
		data.forms["acc_pl_f"] = "aliquās"
		data.forms["acc_pl_n"] = "aliqua"
		data.notes["acc_pl_n1"] = note2
		
		data.forms["abl_sg_m"] = "aliquō"
		data.forms["abl_sg_f"] = "aliquā"
		data.forms["abl_sg_n"] = "aliquō"
		data.forms["abl_pl_m"] = {"aliquīs", "aliquibus"}
		data.notes["abl_pl_m1"] = note4
		data.forms["abl_pl_f"] = {"aliquīs", "aliquibus"}
		data.notes["abl_pl_f1"] = note4
		data.forms["abl_pl_n"] = {"aliquīs", "aliquibus"}
		data.notes["abl_pl_n1"] = note4
		
		data.voc = false
		
	elseif args[1] == "quisquam" then
		local note1 = "Only attested in postclassical Latin. In Classical Latin, forms of [[ullus#Latin|ūllus]] were used instead."
		local note2 = "Only attested as a feminine form in the preclassical Latin of authors like Plautus."
		local note3 = "Attested only once in Classical Latin. Usually [[ullus#Latin|ūllam]] was used instead."
		local note4 = "Attested, but rare in Classical Latin. Usually [[ullus#Latin|ūllō]] was used instead."
		
		data.title = glossary_link("negative polarity item", "negative polarity") .. " " .. glossary_link("indefinite") .. " " .. glossary_link("determiner")
		
		data.forms["nom_sg_m"] = "quisquam"
		data.forms["nom_sg_f"] = {"quaequam", "quisquam"}
		data.notes["nom_sg_f1"] = note1
		data.notes["nom_sg_f2"] = note2
		data.forms["nom_sg_n"] = "quodquam"
		data.notes["nom_sg_n1"] = note1
		data.forms["nom_pl_m"] = "quīquam"
		data.notes["nom_pl_m1"] = note1
		data.forms["nom_pl_f"] = "quaequam"
		data.notes["nom_pl_f1"] = note1
		data.forms["nom_pl_n"] = "quaequam"
		data.notes["nom_pl_n1"] = note1

		data.forms["gen_sg_m"] = "cuiusquam"
		data.forms["gen_sg_f"] = "cuiusquam"
		data.forms["gen_sg_n"] = "cuiusquam"
		data.forms["gen_pl_m"] = "quōrumquam"
		data.notes["gen_pl_m1"] = note1
		data.forms["gen_pl_f"] = "quārumquam"
		data.notes["gen_pl_f1"] = note1
		data.forms["gen_pl_n"] = "quōrumquam"
		data.notes["gen_pl_n1"] = note1

		data.forms["dat_sg_m"] = "cuiquam"
		data.forms["dat_sg_f"] = "cuiquam"
		data.forms["dat_sg_n"] = "cuiquam"
		data.forms["dat_pl_m"] = "quibusquam"
		data.notes["dat_pl_m1"] = note1
		data.forms["dat_pl_f"] = "quibusquam"
		data.notes["dat_pl_f1"] = note1
		data.forms["dat_pl_n"] = "quibusquam"
		data.notes["dat_pl_n1"] = note1

		data.forms["acc_sg_m"] = "quemquam"
		data.forms["acc_sg_f"] = {"quamquam", "quemquam"}
		data.notes["acc_sg_f1"] = note3
		data.notes["acc_sg_f2"] = note2
		data.forms["acc_sg_n"] = "quodquam"
		data.notes["acc_sg_n1"] = note1
		data.forms["acc_pl_m"] = "quōsquam"
		data.notes["acc_pl_m1"] = note1
		data.forms["acc_pl_f"] = "quāsquam"
		data.notes["acc_pl_f1"] = note1
		data.forms["acc_pl_n"] = "quaequam"
		data.notes["acc_pl_n1"] = note1

		data.forms["abl_sg_m"] = {"quōquam", "quīquam"}
		data.notes["abl_sg_m1"] = note4
		data.notes["abl_sg_m2"] = note2
		data.forms["abl_sg_f"] = "quāquam"
		data.notes["abl_sg_f1"] = note1
		data.forms["abl_sg_n"] = "quōquam"
		data.notes["abl_sg_n1"] = note4
		data.forms["abl_pl_m"] = "quibusquam"
		data.notes["abl_pl_m1"] = note1
		data.forms["abl_pl_f"] = "quibusquam"
		data.notes["abl_pl_f1"] = note1
		data.forms["abl_pl_n"] = "quibusquam"
		data.notes["abl_pl_n1"] = note1

		data.forms["voc_sg_m"] = "quisquam"
		data.notes["voc_sg_m1"] = note1
		data.forms["voc_sg_f"] = "quaequam"
		data.notes["voc_sg_f1"] = note1
		data.forms["voc_sg_n"] = "quodquam"
		data.notes["voc_sg_n1"] = note1
		data.forms["voc_pl_m"] = "quīquam"
		data.notes["voc_pl_m1"] = note1
		data.forms["voc_pl_f"] = "quaequam"
		data.notes["voc_pl_f1"] = note1
		data.forms["voc_pl_n"] = "quaequam"
		data.notes["voc_pl_n1"] = note1
		
		data.voc = true
		
	elseif args[1] == "quisquis" then
		data.title = glossary_link("relative") .. "/" .. glossary_link("interrogative") .. " pronoun"

		data.forms["nom_sg_m"] = "quisquis"
		data.forms["nom_sg_f"] = "quisquis"
		data.forms["nom_sg_n"] = {"quidquid", "quicquid"}
		data.forms["nom_pl_m"] = "quīquī"
		data.forms["nom_pl_f"] = "quaequae"
		data.forms["nom_pl_n"] = "quaequae"

		data.forms["gen_sg_m"] = "cuiuscuius"
		data.forms["gen_sg_f"] = "cuiuscuius"
		data.forms["gen_sg_n"] = "cuiuscuius"
		data.forms["gen_pl_m"] = "quōrumquōrum"
		data.forms["gen_pl_f"] = "quārumquārum"
		data.forms["gen_pl_n"] = "quōrumquōrum"

		data.forms["dat_sg_m"] = "cuicui"
		data.forms["dat_sg_f"] = "cuicui"
		data.forms["dat_sg_n"] = "cuicui"
		data.forms["dat_pl_m"] = {"quibusquibus", "quīsquīs"}
		data.forms["dat_pl_f"] = {"quibusquibus", "quīsquīs"}
		data.forms["dat_pl_n"] = {"quibusquibus", "quīsquīs"}

		data.forms["acc_sg_m"] = "quemquem"
		data.forms["acc_sg_f"] = "quamquam"
		data.forms["acc_sg_n"] = {"quidquid", "quicquid"}
		data.forms["acc_pl_m"] = "quōsquōs"
		data.forms["acc_pl_f"] = "quāsquās"
		data.forms["acc_pl_n"] = "quaequae"

		data.forms["abl_sg_m"] = "quōquō"
		data.forms["abl_sg_f"] = "quāquā"
		data.forms["abl_sg_n"] = "quōquō"
		data.forms["abl_pl_m"] = {"quibusquibus", "quīsquīs"}
		data.forms["abl_pl_f"] = {"quibusquibus", "quīsquīs"}
		data.forms["abl_pl_n"] = {"quibusquibus", "quīsquīs"}

		data.forms["voc_sg_m"] = "quisquis"
		data.forms["voc_sg_f"] = "quisquis"
		data.forms["voc_sg_n"] = {"quidquid", "quicquid"}
		data.forms["voc_pl_m"] = "quīquī"
		data.forms["voc_pl_f"] = "quaequae"
		data.forms["voc_pl_n"] = "quaequae"

		data.voc = true

	elseif args[1] == "ecquis" then
		local note1 = "Unattested in classical Latin."
		local note2 = "Attested only twice in Classical Latin."
		
		data.title = glossary_link("interrogative") .. " pronoun"
		
		data.forms["nom_sg_m"] = {"ecquis", "ecquī"}
		data.forms["nom_sg_f"] = {"ecqua", "ecquae"}
		data.forms["nom_sg_n"] = "ecquid"
		data.forms["nom_pl_m"] = "ecquī"
		data.forms["nom_pl_f"] = "ecquae"
		data.forms["nom_pl_n"] = {"ecqua", "ecquae"}

		data.forms["gen_sg_m"] = "eccuius"
		data.forms["gen_sg_f"] = "eccuius"
		data.forms["gen_sg_n"] = "eccuius"
		data.notes["gen_sg_m1"] = note1
		data.notes["gen_sg_f1"] = note1
		data.notes["gen_sg_n1"] = note1
		data.forms["gen_pl_m"] = ""
		data.forms["gen_pl_f"] = ""
		data.forms["gen_pl_n"] = ""

		data.forms["dat_sg_m"] = "eccui"
		data.forms["dat_sg_f"] = "eccui"
		data.forms["dat_sg_n"] = "eccui"
		data.notes["dat_sg_m1"] = note2
		data.notes["dat_sg_f1"] = note2
		data.notes["dat_sg_n1"] = note2
		data.forms["dat_pl_m"] = ""
		data.forms["dat_pl_f"] = ""
		data.forms["dat_pl_n"] = ""

		data.forms["acc_sg_m"] = "ecquem"
		data.forms["acc_sg_f"] = "ecquam"
		data.forms["acc_sg_n"] = "ecquod"
		data.forms["acc_pl_m"] = "ecquōs"
		data.forms["acc_pl_f"] = "ecquās"
		data.forms["acc_pl_n"] = {"ecqua", "ecquae"}

		data.forms["abl_sg_m"] = {"ecquō", "ecquī"}
		data.forms["abl_sg_f"] = {"ecquā", "ecquī"}
		data.forms["abl_sg_n"] = {"ecquō", "ecquī"}
		data.forms["abl_pl_m"] = ""
		data.forms["abl_pl_f"] = ""
		data.forms["abl_pl_n"] = ""
		
		data.voc = false

	elseif args[1] == "quīdam" then
		local note1 = "The genitive singular was spelled [[quoiusdam#Latin|''quoiusdam'']] before the Augustan period."
		local note2 = "The dative singular was spelled [[quoidam#Latin|''quoidam'']] before the Augustan period."
		local note3 = "An alternative masculine nominative/accusative plural form [[quesdam#Latin|''quēsdam'']] occurs in Accius."
		local note4 = "The dative/ablative plural has a rare alternative form [[quisdam#Latin|''quīsdam'']]/[[queisdam#Latin|''queisdam'']]."

		data.title = glossary_link("indefinite") .. " pronoun"
		
		data.forms["nom_sg_m"] = "quīdam"
		data.forms["nom_sg_f"] = "quaedam"
		data.forms["nom_sg_n"] = "quiddam"
		data.forms["nom_pl_m"] = "quīdam"
		data.notes["nom_pl_m1"] = note3
		data.forms["nom_pl_f"] = "quaedam"
		data.forms["nom_pl_n"] = "quaedam"

		data.forms["gen_sg_m"] = "cuiusdam"
		data.forms["gen_sg_f"] = "cuiusdam"
		data.forms["gen_sg_n"] = "cuiusdam"
		data.notes["gen_sg_m1"] = note1
		data.notes["gen_sg_f1"] = note1
		data.notes["gen_sg_n1"] = note1
		data.forms["gen_pl_m"] = {"quōrundam", "quōrumdam"}
		data.forms["gen_pl_f"] = {"quārundam", "quārumdam"}
		data.forms["gen_pl_n"] = {"quōrundam", "quōrumdam"}

		data.forms["dat_sg_m"] = "cuidam"
		data.forms["dat_sg_f"] = "cuidam"
		data.forms["dat_sg_n"] = "cuidam"
		data.notes["dat_sg_m1"] = note2
		data.notes["dat_sg_f1"] = note2
		data.notes["dat_sg_n1"] = note2
		data.forms["dat_pl_m"] = "quibusdam"
		data.forms["dat_pl_f"] = "quibusdam"
		data.forms["dat_pl_n"] = "quibusdam"
		data.notes["dat_pl_m1"] = note4
		data.notes["dat_pl_f1"] = note4
		data.notes["dat_pl_n1"] = note4

		data.forms["acc_sg_m"] = {"quendam", "quemdam"}
		data.forms["acc_sg_f"] = {"quandam", "quamdam"}
		data.forms["acc_sg_n"] = "quiddam"
		data.forms["acc_pl_m"] = "quōsdam"
		data.notes["acc_pl_m1"] = note3
		data.forms["acc_pl_f"] = "quāsdam"
		data.forms["acc_pl_n"] = "quaedam"

		data.forms["abl_sg_m"] = "quōdam"
		data.forms["abl_sg_f"] = "quādam"
		data.forms["abl_sg_n"] = "quōdam"
		data.forms["abl_pl_m"] = "quibusdam"
		data.forms["abl_pl_f"] = "quibusdam"
		data.forms["abl_pl_n"] = "quibusdam"
		data.notes["abl_pl_m1"] = note4
		data.notes["abl_pl_f1"] = note4
		data.notes["abl_pl_n1"] = note4
		
		data.voc = false	
	elseif args[1] == "nēmō" then
		local note1 = "The genitive [[neminis|''nēminis'']] is not used in Classical Latin, and is generally also avoided by later authors."
		local note2 = "The ablative [[nemine|''nēmine'']] is not used in Classical Latin, but can be seen in authors from the Imperial period onwards."

		data.title = "Negative pronoun and " .. glossary_link("determiner")
		
		data.forms["nom_sg_m"] = "nēmō"
		data.forms["nom_sg_f"] = "nēmō"

		data.forms["gen_sg_m"] = {"nūllī̆us", "nēminis"}
		data.forms["gen_sg_f"] = {"nūllī̆us", "nēminis"}
		data.notes["gen_sg_m2"] = note1
		data.notes["gen_sg_f2"] = note1

		data.forms["dat_sg_m"] = "nēminī"
		data.forms["dat_sg_f"] = "nēminī"

		data.forms["acc_sg_m"] = "nēminem"
		data.forms["acc_sg_f"] = "nēminem"

		data.forms["abl_sg_m"] = {"nūllō", "nēmine"}
		data.forms["abl_sg_f"] = {"nūllā", "nēmine"}
		data.notes["abl_sg_m2"] = note2
		data.notes["abl_sg_f2"] = note2
		
		data.voc = false	
	else
		error('adjective ' .. args[1] .. ' not recognized')
	end
end

return decl

-- For Vim, so we get 4-space tabs
-- vim: set ts=4 sw=4 noet: