local labels = {}
local raw_categories = {}
local handlers = {}
labels["依語法範疇分類的詞"] = {
description = "{{{langname}}} terms categorized by their grammatical category.",
fundamental = "分类",
parents = {{template = "langcatboiler"}},
}
------- GENDER -------
for _, pos in ipairs { "名詞", "專有名詞", "代詞" } do
labels["各性別" .. pos] = {
description = "{{{langname}}} " .. pos .. " organized by the gender they belong to.",
parents = {{name = pos, sort = "gender"}},
}
labels["有多種性別的" .. pos] = {
description = "{{{langname}}} " .. pos .. " that belong to more than one gender.",
parents = {{name = "各性別" .. pos, sort = "multiple genders"}},
}
labels["各有生性" .. pos] = {
description = "{{{langname}}} " .. pos .. " organized by the animacy they belong to.",
parents = {{name = pos, sort = "animacy"}},
}
labels["有多種有生性的" .. pos] = {
description = "{{{langname}}} " .. pos .. " that belong to more than one animacy.",
parents = {{name = pos, sort = "multiple animacies"}},
}
labels["通性" .. pos] = {
description = "{{{langname}}} " .. pos .. " of [[Appendix:Glossary#common gender|common gender]], i.e. belonging to a gender category that combines the function of [[Appendix:Glossary#masculine|masculine]] and [[Appendix:Glossary#feminine|feminine]] and is opposed to the [[Appendix:Glossary#neuter|neuter]] gender.",
parents = {"各性別" .. pos},
}
labels["陰性" .. pos] = {
description = "{{{langname}}} " .. pos .. " of [[Appendix:Glossary#feminine|feminine]] gender, i.e. belonging to a gender category that contains (among other things) female beings.",
parents = {"各性別" .. pos},
}
labels["陽性" .. pos] = {
description = "{{{langname}}} " .. pos .. " of [[Appendix:Glossary#masculine|masculine]] gender, i.e. belonging to a gender category that contains (among other things) male beings.",
parents = {"各性別" .. pos},
}
-- FIXME, remove this in favor of 'masculine and feminine POS by sense'.
labels["陽性和陰性" .. pos] = {
description = "{{{langname}}} " .. pos .. " that display grammatical relations associated with male and female beings, depending on context or usage.",
parents = {"各性別" .. pos},
}
labels["依詞義區分陽性和陰性的" .. pos] = {
description = "{{{langname}}} " .. pos .. " that may be either [[Appendix:Glossary#masculine|masculine]] or [[Appendix:Glossary#feminine|feminine]] depending on whether they refer to male or female beings.",
parents = {"各性別" .. pos},
}
labels["中性" .. pos] = {
description = "{{{langname}}} " .. pos .. " of [[Appendix:Glossary#neuter|neuter]] gender, i.e. belonging to a gender category that does not usually contain male or female beings.",
parents = {"各性別" .. pos},
}
end
------- NOUN CLASSES -------
labels["各類名詞"] = {
description = "{{{langname}}} nouns organized by the class they belong to.",
parents = {{name = "名詞", sort = "類"}},
}
------- ANIMACY -------
-- This category should be used particularly in languages that have
-- grammatical distinctions related to animals, such as Ukrainian.
labels["有生名詞"] = {
description = "指代人類或動物的{{{langname}}}名詞。",
parents = {"名詞"},
}
labels["有生動詞"] = {
description = "指代人類或動物的{{{langname}}}動詞。",
parents = {"動詞"},
}
labels["無生名詞"] = {
description = "指代非人類、動物的{{{langname}}}名詞。",
parents = {"名詞"},
}
labels["無生動詞"] = {
description = "指代不是人類或動物的{{{langname}}}動詞。",
parents = {"動詞"},
}
labels["動物名詞"] = {
description = "指代動物的{{{langname}}}名詞。",
parents = {"有生名詞"},
}
-- This category should be used particularly in languages that have
-- grammatical distinctions related to men, such as Polish.
labels["非男性名詞"] = {
description = "{{{langname}}}中指稱沒有男性的群體的複數名詞。",
parents = {"名詞", "唯複名詞"},
}
labels["個人名詞"] = {
description = "指代人類的{{{langname}}}名詞。",
parents = {"有生名詞"},
}
-- This category should be used particularly in languages that have
-- grammatical distinctions related to men, such as Polish.
labels["男性名詞"] = {
description = "{{{langname}}}中指稱至少有一名男性的群體的複數名詞。",
parents = {"名詞", "唯複名詞"},
}
labels["nouns with multiple animacies"] = {
description = "{{{langname}}} nouns that belong to more than one animacy.",
parents = {{name = "名詞", sort = "multiple animacies"}},
}
------- 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 = {
"形容詞",
"副詞",
"限定詞",
"名詞",
"數詞",
"分詞",
"代詞",
"專有名詞",
"動詞",
}
for _, pos in ipairs(inflected_poses) do
labels["依屈折分類的" .. pos] = {
description = "{{{langname}}} " .. pos .. " organized by the type of inflection they follow.",
parents = {{name = pos, sort = "inflection"}},
}
labels["不規則" .. pos] = {
description = "{{{langname}}} " .. pos .. " that follow non-standard patterns of inflection.",
parents = {"依屈折分類的" .. pos},
}
labels["defective " .. pos] = {
description = "{{{langname}}} " .. pos .. " that lack one or more forms in their inflections.",
parents = {pos, "不規則" .. pos},
}
labels["異幹" .. pos] = {
description = "{{{langname}}} " .. pos .. " that have inflected forms from different roots.",
parents = {"不規則" .. pos},
}
if pos ~= "動詞" and pos ~= "副詞" then
labels["無屈折" .. pos] = {
description = "{{{langname}}} " .. pos .. " that do not display additional grammatical relations by means of declension.",
parents = {"依屈折分類的" .. pos},
}
labels[pos .. " with multiple declensions"] = {
description = "{{{langname}}} " .. pos .. " that follow more than one type of inflection.",
parents = {{name = "依屈折分類的" .. pos, sort = "multiple declensions"}},
}
end
labels["各音調" .. pos] = {
description = "{{{langname}}}" .. pos .. "按照各自的音調進行分類。",
parents = {{name = "依屈折分類的" .. pos, sort = "音調"}},
}
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 = {"依屈折分類的形容詞"},
}
for _, pos in ipairs { "名詞", "專有名詞", "代詞" } 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},
}
end
for _, pos in ipairs(inflected_poses) do
labels["依屈折分類的" .. pos] = {
description = "{{{langname}}} " .. pos .. " organized by the type of inflection they follow.",
parents = {{name = pos, sort = "inflection"}},
}
labels["不規則" .. pos] = {
description = "{{{langname}}} " .. pos .. " that follow non-standard patterns of inflection.",
parents = {"依屈折分類的" .. pos},
}
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 ~= "動詞" and pos ~= "副詞" then
labels["無變格" .. pos] = {
description = "{{{langname}}} " .. pos .. " that do not display additional grammatical relations by means of declension.",
parents = {"依屈折分類的" .. pos},
}
labels[pos .. " with multiple declensions"] = {
description = "{{{langname}}} " .. pos .. " that follow more than one type of inflection.",
parents = {{name = "依屈折分類的" .. pos, sort = "multiple declensions"}},
}
end
labels[pos .. " by tone"] = {
description = "{{{langname}}} " .. pos .. " organized by the tone they follow.",
parents = {{name = "依屈折分類的" .. pos, sort = "tone"}},
}
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 = {"依屈折分類的動詞"},
}
labels["weak verbs"] = {
description = "{{{langname}}} verbs that display dental suffixes in their past tense conjugated forms.",
parents = {"依屈折分類的動詞"},
}
labels["preterite-present verbs"] = {
description = "{{{langname}}} verbs that inflect in the present tense like the past tense of strong verbs.",
parents = {"不規則動詞"},
}
labels["1類強變化動詞"] = {
description = "Verbs where the [[ablaut]] vowel was followed by ''-y-'' in Proto-Indo-European.",
parents = {{name = "強變化動詞", sort = "1"}},
}
labels["1類弱變化動詞"] = {
description = "Weak verbs of the first class.",
parents = {{name = "弱變化動詞", sort = "1"}},
}
labels["2類強變化動詞"] = {
description = "Verbs where the [[ablaut]] vowel was followed by ''-w-'' in Proto-Indo-European.",
parents = {{name = "強變化動詞", sort = "2"}},
}
labels["2a類強變化動詞"] = {
description = "Verbs where the [[ablaut]] vowel was *eu in Proto-Germanic.",
parents = {{name = "2類強變化動詞", sort = "1"}},
}
labels["2b類強變化動詞"] = {
description = "Verbs where the [[ablaut]] vowel was *ū in Proto-Germanic.",
parents = {{name = "2類強變化動詞", sort = "2"}},
}
labels["2類弱變化動詞"] = {
description = "Weak verbs of the second class.",
parents = {{name = "弱變化動詞", sort = "2"}},
}
labels["3類弱變化動詞"] = {
description = "Weak verbs of the third class.",
parents = {{name = "弱變化動詞", sort = "3"}},
}
labels["3類強變化動詞"] = {
description = "Verbs where the [[ablaut]] vowel was followed by a [[consonant cluster]] in Proto-Indo-European.",
parents = {{name = "強變化動詞", sort = "3"}},
}
labels["3a類強變化動詞"] = {
description = "Verbs where the [[consonant cluster]] begins with a nasal consonant.",
parents = {{name = "3類強變化動詞", sort = "1"}},
}
labels["3b類強變化動詞"] = {
description = "Verbs where the [[consonant cluster]] begins with a lateral consonant or velar fricative.",
parents = {{name = "3類強變化動詞", sort = "2"}},
}
labels["3c類強變化動詞"] = {
description = "Verbs where the [[consonant cluster]] begins with a rhotic consonant.",
parents = {{name = "3類強變化動詞", sort = "3"}},
}
labels["4類強變化動詞"] = {
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 = "強變化動詞", sort = "4"}},
}
labels["4類弱變化動詞"] = {
description = "Weak verbs of the fourth class.",
parents = {{name = "弱變化動詞", sort = "4"}},
}
labels["5類強變化動詞"] = {
description = "Verbs where the [[ablaut]] vowel was followed by [[consonant]] other than a [[sonorant]] in Proto-Indo-European.",
parents = {{name = "強變化動詞", sort = "5"}},
}
labels["6類強變化動詞"] = {
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 = "強變化動詞", sort = "6"}},
}
labels["7類強變化動詞"] = {
description = "Verbs that retained their reduplication in the past tense in Proto-Germanic.",
parents = {{name = "強變化動詞", sort = "7"}},
}
labels["7a類強變化動詞"] = {
description = "Class 7 strong verbs where the root vowel was ''*ai'' in Proto-Germanic, analogous to class 1.",
parents = {{name = "7類強變化動詞", sort = "a"}},
}
labels["7b類強變化動詞"] = {
description = "Class 7 strong verbs where the root vowel was ''*au'' in Proto-Germanic, analogous to class 2.",
parents = {{name = "7類強變化動詞", sort = "b"}},
}
labels["7c類強變化動詞"] = {
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 = "7類強變化動詞", sort = "c"}},
}
labels["7d類強變化動詞"] = {
description = "Class 7 strong verbs where the root vowel was ''*ē'' in Proto-Germanic.",
parents = {{name = "7類強變化動詞", sort = "d"}},
}
labels["7e類強變化動詞"] = {
description = "Class 7 strong verbs where the root vowel was ''*ō'' in Proto-Germanic.",
parents = {{name = "7類強變化動詞", sort = "e"}},
}
local labels2 = {}
-- Add 'fundamental' key if not already present.
for key, data in pairs(labels) do
labels2[key] = data
if not data.umbrella_parents then
data.umbrella_parents = "語法範疇子分類"
end
end
-----------------------------------------------------------------------------
-- --
-- RAW CATEGORIES --
-- --
-----------------------------------------------------------------------------
raw_categories["語法範疇子分類"] = {
description = "Umbrella categories covering topics related to grammatical categories, such as gender, animacy and noun and verb classes.",
additional = "{{{umbrella_meta_msg}}}",
parents = {
"Umbrella metacategories",
{name = "依語法範疇分類的詞", is_label = true, sort = " "},
},
}
-----------------------------------------------------------------------------
-- HANDLERS --
-----------------------------------------------------------------------------
table.insert(handlers, function(data)
local class = data.label:match("^第([0-9a-z]+)類名詞$")
if class then
local classnum, suffix = class:match("^([0-9]+)([a-z]*)$")
return {
description =
"屬於第" .. class .. "類的{{{langname}}}名詞。",
breadcrumb = class,
umbrella = false,
parents = {{
name = "各類名詞",
sort = classnum and ("#%02d"):format(classnum) .. suffix or class,
}},
}
end
end)
table.insert(handlers, function(data)
local tone, pos = data.label:match("^音調為([^ ]+)的(.+)$")
if pos then
return {
description = "音調為" .. tone .. "的{{{langname}}}" .. pos .. "。",
breadcrumb = tone,
-- FIXME, should there be an umbrella category e.g. 'Adjectives with tone H by language'?
umbrella = false,
parents = {{
name = "各音調" .. pos,
sort = "" .. tone:len() .. tone,
}},
}
end
end)
table.insert(handlers, function(data)
local classifier, pos = data.label:match("^分類詞為「(.+)」的(名詞)$")
if pos then
local linktext
if data.lang then
if data.lang:getCode() == "zh" then
linktext = require("Module:zh/link").link(nil, true, { classifier, tr = "-" }, classifier)
else
linktext = require("Module:links").full_link({ term = classifier, lang = data.lang }, "term")
end
else
linktext = classifier
end
return {
description = "分類詞為「".. linktext .. "」的{{{langname}}}" .. pos .. "。",
breadcrumb = classifier,
umbrella = false,
parents = {{
name = "各分類詞" .. pos,
sort = data.lang and data.lang:getCode() == "zh" and require("Module:zh-sortkey").makeSortKey(classifier) or classifier,
}},
}
end
end)
return {LABELS = labels2, RAW_CATEGORIES = raw_categories, HANDLERS = handlers}