Modhul:category tree/poscatboiler/data/terms by grammatical category

Saka Wikisastra, bausastra mardika

Dhokumèntasi modhul iki bisa digawé ing Modhul:category tree/poscatboiler/data/terms by grammatical category/doc

local labels = {}
local handlers = {}


labels["terms by grammatical category"] = {
	description = "{{{langname}}} terms categorized by their grammatical category.",
	fundamental = "Fundamental",
	parents = {{template = "langcatboiler"}},
}

------- GENDER -------

for _, pos in ipairs { "nouns", "proper nouns", "pronouns" } do
	labels[pos .. " by gender"] = {
		description = "{{{langname}}} " .. pos .. " organized by the gender they belong to.",
		parents = {{name = pos, sort = "gender"}},
	}

	labels[pos .. " with multiple genders"] = {
		description = "{{{langname}}} " .. pos .. " that belong to more than one gender.",
		parents = {{name = pos .. " by gender", sort = "multiple genders"}},
	}

	labels["common " .. pos] = {
		description = "{{{langname}}} " .. pos .. " that display grammatical relations associated with male or female beings.",
		parents = {pos .. " by gender"},
	}

	labels["feminine " .. pos] = {
		description = "{{{langname}}} " .. pos .. " that display grammatical relations associated with female beings.",
		parents = {pos .. " by gender"},
	}

	labels["masculine " .. pos] = {
		description = "{{{langname}}} " .. pos .. " that display grammatical relations associated with male beings.",
		parents = {pos .. " by gender"},
	}

	-- FIXME, remove this in favor of 'common POS'.
	labels["masculine and feminine " .. pos] = {
		description = "{{{langname}}} " .. pos .. " that display grammatical relations associated with male and female beings, depending on context or usage.",
		parents = {pos .. " by gender"},
	}

	labels["neuter " .. pos] = {
		description = "{{{langname}}} " .. pos .. " that display grammatical relations associated with neither male nor female beings.",
		parents = {pos .. " by gender"},
	}
end


------- NOUN CLASSES -------

labels["nouns by class"] = {
	description = "{{{langname}}} nouns organized by the class they belong to.",
	parents = {{name = "nouns", sort = "class"}},
}

table.insert(handlers, function(label)
	local classnum, suffix = label:match("^class ([1-9][0-9]*)([a-z]*) nouns$")
	if classnum then
		return {
			description =
				"{{{langname}}} nouns that belong to class " .. classnum .. suffix .. ".",
			fundamental = "Terms by grammatical category subcategories by language",
			parents = {{
				name = "nouns by class",
				sort = ("#%02d"):format(classnum) .. suffix,
			}},
		}
	end
end)


------- ANIMACY -------

-- This category should be used particularly in languages that have
-- grammatical distinctions related to animals, such as Ukrainian.
labels["animal nouns"] = {
	description = "{{{langname}}} nouns that refer to animals.",
	parents = {"animate nouns"},
}

labels["animate nouns"] = {
	description = "{{{langname}}} nouns that refer to humans or animals.",
	parents = {"nouns"},
}

labels["animate verbs"] = {
	description = "{{{langname}}} verbs that refer to humans or animals.",
	parents = {"verbs"},
}

labels["inanimate nouns"] = {
	description = "{{{langname}}} nouns that refer to inanimate objects (not humans or animals).",
	parents = {"nouns"},
}

labels["inanimate verbs"] = {
	description = "{{{langname}}} verbs that refer to inanimate objects (not humans or animals).",
	parents = {"verbs"},
}

-- This category should be used particularly in languages that have
-- grammatical distinctions related to men, such as Polish.
labels["nonvirile nouns"] = {
	description = "{{{langname}}} plural nouns that refer to a group without male humans.",
	parents = {"nouns", "pluralia tantum"},
}

labels["personal nouns"] = {
	description = "{{{langname}}} nouns that refer to humans.",
	parents = {"animate nouns"},
}

-- This category should be used particularly in languages that have
-- grammatical distinctions related to men, such as Polish.
labels["virile nouns"] = {
	description = "{{{langname}}} plural nouns that refer to a group with at least one male human.",
	parents = {"nouns", "pluralia tantum"},
}


------- INFLECTED PARTS OF SPEECH -------

-- Add "POS by inflection type", "irregular POS" and "POS by tone"
-- categories for (potentially) inflected parts of speech.

local inflected_poses = {
	"adjectives",
	"adverbs",
	"determiners",
	"nouns",
	"numerals",
	"participles",
	"pronouns",
	"proper nouns",
	"verbs",
}

for _, pos in ipairs(inflected_poses) do
	labels[pos .. " by inflection type"] = {
		description = "{{{langname}}} " .. pos .. " organized by the type of inflection they follow.",
		parents = {{name = pos, sort = "inflection"}},
	}

	labels["irregular " .. pos] = {
		description = "{{{langname}}} " .. pos .. " that follow non-standard patterns of inflection.",
		parents = {pos .. " by inflection type"},
	}

	labels["defective " .. pos] = {
		description = "{{{langname}}} " .. pos .. " that lack one or more forms in their inflections.",
		parents = {pos, "irregular " .. pos},
	}

	labels["suppletive " .. pos] = {
		description = "{{{langname}}} " .. pos .. " that have inflected forms from different roots.",
		parents = {"irregular " .. pos},
	}
	
	if pos ~= "verbs" and pos ~= "adverbs" then
		labels["indeclinable " .. pos] = {
			description = "{{{langname}}} " .. pos .. " that do not display additional grammatical relations by means of declension.",
			parents = {pos .. " by inflection type"},
		}

		labels[pos .. " with multiple declensions"] = {
			description = "{{{langname}}} " .. pos .. " that follow more than one type of inflection.",
			parents = {{name = pos .. " by inflection type", sort = "multiple declensions"}},
		}
	end

	labels[pos .. " by tone"] = {
		description = "{{{langname}}} " .. pos .. " organized by the tone they follow.",
		parents = {{name = pos .. " by inflection type", sort = "tone"}},
	}
end

-- FIXME: Only used currently for Arabic; probably should be removed as a general category.
labels["irregular elative adjectives"] = {
	description = "{{{langname}}} elative adjectives that follow non-standard patterns of inflection.",
	parents = {"adjectives by inflection type"},
}

for _, pos in ipairs { "nouns", "proper nouns", "pronouns" } do
	labels[pos .. " with unattested plurals"] = {
		description = "{{{langname}}} " .. pos .. " with unattested plurals.",
		parents = {{name = pos, sort = "unattested plurals"}},
	}
	labels["definite " .. pos] = {
		description = "{{{langname}}} " .. pos .. " that are inherently definite and have definite concord.",
		parents = {pos .. " by inflection type"},
	}
end


------- GERMANIC VERB CLASSES -------

-- FIXME: Not clear this belongs among the general categories.

labels["strong verbs"] = {
	description = "{{{langname}}} verbs that present different stem vowels in their typically regular conjugated forms.",
	parents = {"verbs by inflection type"},
}

labels["weak verbs"] = {
	description = "{{{langname}}} verbs that display dental suffixes in their past tense conjugated forms.",
	parents = {"verbs by inflection type"},
}

labels["preterite-present verbs"] = {
	description = "{{{langname}}} verbs that inflect in the present tense like the past tense of strong verbs.",
	parents = {"irregular verbs"},
}

labels["class 1 strong verbs"] = {
	description = "Verbs where the [[ablaut]] vowel was followed by ''-y-'' in Proto-Indo-European.",
	parents = {{name = "strong verbs", sort = "1"}},
}

labels["class 1 weak verbs"] = {
	description = "Weak verbs of the first class.",
	parents = {{name = "weak verbs", sort = "1"}},
}

labels["class 2 strong verbs"] = {
	description = "Verbs where the [[ablaut]] vowel was followed by ''-w-'' in Proto-Indo-European.",
	parents = {{name = "strong verbs", sort = "2"}},
}

labels["class 2a strong verbs"] = {
	description = "Verbs where the [[ablaut]] vowel was *eu in Proto-Germanic.",
	parents = {{name = "class 2 strong verbs", sort = "1"}},
}

labels["class 2b strong verbs"] = {
	description = "Verbs where the [[ablaut]] vowel was *ū in Proto-Germanic.",
	parents = {{name = "class 2 strong verbs", sort = "2"}},
}

labels["class 2 weak verbs"] = {
	description = "Weak verbs of the second class.",
	parents = {{name = "weak verbs", sort = "2"}},
}

labels["class 3 weak verbs"] = {
	description = "Weak verbs of the third class.",
	parents = {{name = "weak verbs", sort = "3"}},
}

labels["class 3 strong verbs"] = {
	description = "Verbs where the [[ablaut]] vowel was followed by a [[consonant cluster]] in Proto-Indo-European.",
	parents = {{name = "strong verbs", sort = "3"}},
}

labels["class 3a strong verbs"] = {
	description = "Verbs where the [[consonant cluster]] begins with a nasal consonant.",
	parents = {{name = "class 3 strong verbs", sort = "1"}},
}

labels["class 3b strong verbs"] = {
	description = "Verbs where the [[consonant cluster]] begins with a lateral consonant or velar fricative.",
	parents = {{name = "class 3 strong verbs", sort = "2"}},
}

labels["class 3c strong verbs"] = {
	description = "Verbs where the [[consonant cluster]] begins with a rhotic consonant.",
	parents = {{name = "class 3 strong verbs", sort = "3"}},
}

labels["class 4 strong verbs"] = {
	description = "Verbs where the [[ablaut]] vowel was followed by a [[sonorant]] (''m'', ''n'', ''l'', ''r'') but no other consonant in Proto-Indo-European.",
	parents = {{name = "strong verbs", sort = "4"}},
}

labels["class 4 weak verbs"] = {
	description = "Weak verbs of the fourth class.",
	parents = {{name = "weak verbs", sort = "4"}},
}

labels["class 5 strong verbs"] = {
	description = "Verbs where the [[ablaut]] vowel was followed by [[consonant]] other than a [[sonorant]] in Proto-Indo-European.",
	parents = {{name = "strong verbs", sort = "5"}},
}

labels["class 6 strong verbs"] = {
	description = "The Proto-Indo-European origin of this class is not securely known. It contains verbs with the stem vowel ''-a-'', except those where it is followed by a sonorant and another consonant (this combination was considered a diphthong in PIE and therefore belonged to class 7).",
	parents = {{name = "strong verbs", sort = "6"}},
}

labels["class 7 strong verbs"] = {
	description = "Verbs that retained their reduplication in the past tense in Proto-Germanic.",
	parents = {{name = "strong verbs", sort = "7"}},
}

labels["class 7a strong verbs"] = {
	description = "Class 7 strong verbs where the root vowel was ''*ai'' in Proto-Germanic, analogous to class 1.",
	parents = {{name = "class 7 strong verbs", sort = "a"}},
}

labels["class 7b strong verbs"] = {
	description = "Class 7 strong verbs where the root vowel was ''*au'' in Proto-Germanic, analogous to class 2.",
	parents = {{name = "class 7 strong verbs", sort = "b"}},
}

labels["class 7c strong verbs"] = {
	description = "Class 7 strong verbs where the root vowel was ''*a'' followed by a [[consonant cluster]] in Proto-Germanic, analogous to class 3.",
	parents = {{name = "class 7 strong verbs", sort = "c"}},
}

labels["class 7d strong verbs"] = {
	description = "Class 7 strong verbs where the root vowel was ''*ē'' in Proto-Germanic.",
	parents = {{name = "class 7 strong verbs", sort = "d"}},
}

labels["class 7e strong verbs"] = {
	description = "Class 7 strong verbs where the root vowel was ''*ō'' in Proto-Germanic.",
	parents = {{name = "class 7 strong verbs", sort = "e"}},
}



local labels2 = {}

-- Add 'fundamental' key if not already present.
for key, data in pairs(labels) do
	labels2[key] = data
	if not data.fundamental then
		data.fundamental = "Terms by grammatical category subcategories by language"
	end
end

return {LABELS = labels2, HANDLERS = handlers}