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 .. "。",
parents = {{name = pos, sort = "gender"}},
}
labels["有多種性別的" .. pos] = {
description = "有多於一種語法性別的{{{langname}}}" .. pos .. "。",
parents = {{name = "各性別" .. pos, sort = "multiple genders"}},
}
labels["各有生性" .. pos] = {
description = "依其所屬有生性組織的{{{langname}}}" .. pos .. "。",
parents = {{name = pos, sort = "animacy"}},
}
labels["有多種有生性的" .. pos] = {
description = "有多於一種有生性的{{{langname}}}" .. pos .. "。",
parents = {{name = pos, sort = "multiple animacies"}},
}
labels["通性" .. pos] = {
description = "{{{langname}}}[[Appendix:Glossary#通性|通性]]" .. pos .. ",即兼具[[Appendix:Glossary#陽性|陽性]]與[[Appendix:Glossary#陰性|陰性]]功能、與中性相對的性別範疇。",
parents = {"各性別" .. pos},
}
labels["陰性" .. pos] = {
description = "{{{langname}}}[[Appendix:Glossary#陰性|陰性]]" .. pos .. ",即包含了陰性實體或概念的性別範疇。",
parents = {"各性別" .. pos},
}
labels["陽性" .. pos] = {
description = "{{{langname}}}[[Appendix:Glossary#陽性|陽性]]" .. pos .. ",即包含了陰性實體或概念的性別範疇。",
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 .. "。",
parents = {"各性別" .. pos},
}
labels["中性" .. pos] = {
description = "{{{langname}}}[[Appendix:Glossary#陽性|陽性]]" .. pos .. ",即包含了不屬於陽性或陰性實體及概念的性別範疇。",
parents = {"各性別" .. pos},
}
end
------- NOUN CLASSES -------
labels["各類名詞"] = {
description = "依其所屬類別組織的{{{langname}}}名詞。",
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 = {"名詞", "唯複名詞"},
}
------- 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 .. "。",
parents = {{name = pos, sort = "inflection"}},
}
labels["不規則" .. pos] = {
description = "遵循非標準屈折模式的{{{langname}}}" .. pos .. "。",
parents = {"依屈折分類的" .. pos},
}
labels["不完全變化" .. pos] = {
description = "缺乏一種或多種屈折變化形式的{{{langname}}}" .. pos .. "。",
parents = {pos, "不規則" .. pos},
}
labels["異幹" .. pos] = {
description = "具有來自不同詞根的屈折形式的{{{langname}}}" .. pos .. "。",
parents = {"不規則" .. pos},
}
if pos ~= "動詞" and pos ~= "副詞" then
labels["無屈折" .. pos] = {
description = "不藉由屈折顯示額外的語法關係{{{langname}}}" .. pos .. "。",
parents = {"依屈折分類的" .. pos},
}
labels["有多種變格的" .. pos] = {
description = "遵循多種變格的{{{langname}}}" .. pos .. "。",
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["定指" .. 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"}},
}
labels["有多個複數的" .. pos] = {
description = "具有多個可能的複數形式的{{{langname}}}" .. pos .. "(有時具有不同的意義)。",
breadcrumb = "有多個複數",
parents = {{name = "依屈折分類的" .. pos, sort = "multiple plurals"}},
}
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 = "原始印歐語中進行元音變換的元音後面跟著 ''-y-'' 的動詞。",
parents = {{name = "強變化動詞", sort = "1"}},
}
labels["1類弱變化動詞"] = {
description = "1類弱變化動詞。",
parents = {{name = "弱變化動詞", sort = "1"}},
}
labels["2類強變化動詞"] = {
description = "原始印歐語中進行元音變換的元音後面跟著 ''-w-'' 的動詞。",
parents = {{name = "強變化動詞", sort = "2"}},
}
labels["2a類強變化動詞"] = {
description = "原始日耳曼語中進行元音變換的元音為 *eu 的動詞。",
parents = {{name = "2類強變化動詞", sort = "1"}},
}
labels["2b類強變化動詞"] = {
description = "原始日耳曼語中進行元音變換的元音為 *ū 的動詞。",
parents = {{name = "2類強變化動詞", sort = "2"}},
}
labels["2類弱變化動詞"] = {
description = "2類弱變化動詞。",
parents = {{name = "弱變化動詞", sort = "2"}},
}
labels["3類弱變化動詞"] = {
description = "3類弱變化動詞。",
parents = {{name = "弱變化動詞", sort = "3"}},
}
labels["3類強變化動詞"] = {
description = "原始印歐語中進行元音變換的元音後面跟著[[輔音叢]]的動詞。",
parents = {{name = "強變化動詞", sort = "3"}},
}
labels["3a類強變化動詞"] = {
description = "[[輔音叢]]以[[鼻輔音]]開頭的動詞。",
parents = {{name = "3類強變化動詞", sort = "1"}},
}
labels["3b類強變化動詞"] = {
description = "[[輔音叢]]以[[邊音]]或[[軟顎]][[擦音]]開頭的動詞。",
parents = {{name = "3類強變化動詞", sort = "2"}},
}
labels["3c類強變化動詞"] = {
description = "[[輔音叢]]以[[R音]]開頭的動詞。",
parents = {{name = "3類強變化動詞", sort = "3"}},
}
labels["4類強變化動詞"] = {
description = "原始印歐語中進行元音變換的元音後面跟著[[響音]]而沒有其他輔音的動詞。",
parents = {{name = "強變化動詞", sort = "4"}},
}
labels["4類弱變化動詞"] = {
description = "4類弱變化動詞。",
parents = {{name = "弱變化動詞", sort = "4"}},
}
labels["5類強變化動詞"] = {
description = "原始印歐語中進行元音變換的元音後面跟著非[[響音]]的輔音的動詞。",
parents = {{name = "強變化動詞", sort = "5"}},
}
labels["6類強變化動詞"] = {
description = "此類動詞的原始印歐語起源尚不清楚。它包含詞幹元音為 ''-a-'' 的動詞,但其後跟著一個響音和另一個輔音的動詞除外(這種組合在原始印歐語中被視為雙元音,因此屬於第7類)。",
parents = {{name = "強變化動詞", sort = "6"}},
}
labels["7類強變化動詞"] = {
description = "原始日耳曼語中保留過去式重疊形的動詞。",
parents = {{name = "強變化動詞", sort = "7"}},
}
labels["7a類強變化動詞"] = {
description = "詞根元音在原始日耳曼語為 ''*ai'' 的第7類強動詞,與第1類類似。",
parents = {{name = "7類強變化動詞", sort = "a"}},
}
labels["7b類強變化動詞"] = {
description = "詞根元音在原始日耳曼語為 ''*au'' 的第7類強動詞,與第2類類似。",
parents = {{name = "7類強變化動詞", sort = "b"}},
}
labels["7c類強變化動詞"] = {
description = "詞根元音在原始日耳曼語為 ''*a'' 且後面跟著[[輔音叢]]的第7類強動詞,與第3類類似。",
parents = {{name = "7類強變化動詞", sort = "c"}},
}
labels["7d類強變化動詞"] = {
description = "詞根元音在原始日耳曼語為 ''*ē'' 的第7類強動詞。",
parents = {{name = "7類強變化動詞", sort = "d"}},
}
labels["7e類強變化動詞"] = {
description = "詞根元音在原始日耳曼語為 ''*ō'' 的第7類強動詞。",
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 = "涵蓋與語法範疇相關的主題的綜合分類,例如性別、有生性以及名詞、動詞類別。",
additional = "{{{umbrella_meta_msg}}}",
parents = {
"綜合元分類",
{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}