Modul:category tree/non-lemma forms
Penampilan
- Berikut merupakan pendokumenan yang dijana oleh Templat:category tree data submodule documentation. [sunting]
- Pautan berguna: laman akar • sublaman laman akar • pautan • transklusi • kes ujian • kotak pasir
Submodul data ini mentakrifkan sebahagian daripada struktur kategori Wikikamus.
Untuk pengenalan kepada sistem poscatboiler dan penerangan tentang cara menambah atau mengubah suai kategori, lihat Modul:category tree/data/doc.
local labels = {}
local raw_categories = {}
local en_utilities_module = "Module:en-utilities"
local insert = table.insert
local pluralize = require(en_utilities_module).pluralize
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
-----------------------------------------------------------------------------
-- --
-- LABELS --
-- --
-----------------------------------------------------------------------------
local degrees = {
bandingan = "yang menyatakan darjah lebih tinggi bagi sesuatu sifat apabila membandingkan satu perkara dengan perkara lain, atau berfungsi untuk membezakannya daripada yang lain",
penghabisan = "yang menyatakan darjah tertinggi yang mungkin bagi sesuatu sifat",
elatif = "yang, bergantung pada konteks, menyatakan sama ada darjah perbandingan (darjah lebih tinggi bagi sesuatu sifat apabila membandingkan) atau darjah superlatif (darjah tertinggi yang mungkin bagi sesuatu sifat)",
perbesaran = "yang menyatakan darjah tertinggi yang mungkin bagi sesuatu sifat (seperti darjah superlatif), tetapi dengan penekanan tambahan",
berlebihan = "yang menyatakan darjah berlebihan bagi sesuatu sifat",
ekuatif = "yang menyatakan darjah yang sama atau serupa bagi sesuatu sifat apabila membandingkan satu perkara dengan perkara lain",
}
local degree_pos = { "Kata sifat", "Adverba", "Penunjuk", "Kata ganti nama" }
for _, pos in ipairs(degree_pos) do
for degree, desc in pairs(degrees) do
labels[pos .. " " .. degree] = {
breadcrumb = degree,
description = pos .. " bahasa {{{langname}}} " .. desc .. ".",
parents = {"Bentuk " .. pos:lower()},
}
end
end
labels["Bentuk bukan lema"] = {
description = "bahasa {{{langname}}} inflected forms of other [[Wiktionary:Lemmas|lemmas]], categorized by their part of speech.",
umbrella_parents = "Asas",
parents = {{name = "{{{langcat}}}", raw = true}},
}
-- Handle specific types of non-lemma forms. Each spec is of the form {POS, PARENT_POS} where POS is the singular form
-- of a part of speech for which non-lemma forms exist (e.g. 'penunjuk' is listed because 'Bentuk penunjuk' exist),
-- and PARENT_POS is the singular form of the parent category to add the category to. For example, the spec
-- {"circumfix", "morfem"} means that 'Bentuk circumfix' categories have the corresponding 'Bentuk morfem' categories
-- as their first parent. The second parent is the POS itself; e.g. 'Bentuk morfem' has 'morfem' as its second
-- parent, with a sort key that places 'Bentuk morfem' at the beginning of the child categories. If PARENT_POS is
-- 'false', only the second parent appears as the parent. If a spec is a single string POS, the PARENT_POS defaults to
-- "bukan lema"; e.g. if the spec is "kata sifat", then 'Bentuk kata sifat' categories have the corresponding
-- 'Bentuk bukan lema' category as their first parent.
local specs = {
"kata sifat",
"adverba",
{"kata sandang", "penunjuk"},
{"apitan", "morfem"},
"penjodoh bilangan",
"klitik",
"kata hubung",
"penunjuk",
{"infinitif", false},
"kata seru",
"morfem",
"kata nama",
"kata bilangan",
"partisipel",
"partikel",
{"partisipel lampau", "partisipel"},
"predikatif",
{"awalan", "morfem"},
"kata nama khas",
"postposition",
"preposition",
"kata ganti nama",
{"akhiran", "morfem"},
"kata kerja",
}
for degree in pairs(degrees) do
for _, pos in ipairs(degree_pos) do
insert(specs, {pos .. " " .. degree, false})
end
end
for _, spec in ipairs(specs) do
local pos, parent_pos
if type(spec) == "table" then
pos, parent_pos = unpack(spec)
else
pos = spec
end
if parent_pos == nil then
parent_pos = "bukan lema"
end
local parents, breadcrumb = {}, nil
if parent_pos == false then
breadcrumb = "Bentuk"
else
insert(parents, "Bentuk " .. parent_pos)
end
insert (parents, {name = pos:sub(1,1):upper() .. pos:sub(2), sort = "**"})
labels["Bentuk " .. pos] = {
breadcrumb = breadcrumb,
description = ("Iaitu %s bahasa {{{langname}}} yang mengalami infleksi untuk memaparkan hubungan tatabahasa selain bentuk utama."):format(pos),
parents = parents,
}
end
labels["partisipel aktif"] = {
description = "bahasa {{{langname}}} participles that express an agent actively performing an action.",
parents = {"partisipel"},
}
labels["partisipel kata sifat aktif"] = {
description = "bahasa {{{langname}}} participles that function as adjectives and express an agent actively performing an action.",
parents = {"partisipel", "kata sifat"},
}
labels["partisipel kata sifat"] = {
description = "bahasa {{{langname}}} participles that function as adjectives.",
parents = {"partisipel", "kata sifat"},
}
labels["Bentuk binaan kata sifat"] = {
description = "bahasa {{{langname}}} adjectives that are inflected to modify a noun in a genitive construction.",
parents = {{name = "Bentuk kata sifat", sort = "binaan"}},
}
labels["bentuk tentu kata sifat"] = {
description = "bahasa {{{langname}}} adjectives that are inflected to give attributes to specific and identifiable nouns.",
parents = {{name = "Bentuk kata sifat", sort = "bentuk tentu"}},
}
labels["bentuk duaan kata sifat"] = {
description = "bahasa {{{langname}}} adjectives that are inflected to be quantified as two.",
parents = {{name = "Bentuk kata sifat", sort = "bentuk duaan"}},
}
labels["bentuk feminin kata sifat"] = {
description = "bahasa {{{langname}}} adjectives that are inflected to give attributes to nouns associated to female beings.",
parents = {{name = "Bentuk kata sifat", sort = "bentuk feminin"}},
}
labels["partisipel kata adverba"] = {
description = "bahasa {{{langname}}} participles that function as adverbs.",
parents = {"partisipel", "kata adverba"},
}
labels["partisipel pelaku"] = {
description = "bahasa {{{langname}}} participles that express an agent by who something is done.",
parents = {"partisipel"},
}
labels["partisipel kata adverba depan"] = {
description = "bahasa {{{langname}}} participles that function as adverbs and express an action completed before the one expressed by the primary verb.",
parents = {"partisipel", "kata adverba"},
}
labels["classifier singular forms"] = {
description = "{{{langname}}} classifiers that are inflected for singular number.",
parents = {"Bentuk penjodoh bilangan"},
}
labels["collective plurals"] = {
description = "{{{langname}}} nominal plural forms with specifically collective semantics.",
parents = {"Bentuk kata nama"},
}
labels["partisipel kata adverba kontemporari"] = {
description = "bahasa {{{langname}}} participles that function as adverbs and express an action occuring simultaneously with the one expressed by the primary verb.",
parents = {"partisipel", "kata adverba"},
}
labels["converbs"] = {
description = "{{{langname}}} verb forms that build clauses which function as adverbials.",
parents = {"Bentuk kata kerja"},
}
labels["gerund diminutif"] = {
description = "bahasa {{{langname}}} diminutives of gerunds.",
parents = {"Bentuk kata kerja"},
}
labels["extended adjective forms"] = {
parents = {"Bentuk kata sifat"},
}
labels["future active participles"] = {
description = "{{{langname}}} participles that express an agent actively performing an action in future time.",
parents = {"partisipel"},
}
labels["future participles"] = {
description = "{{{langname}}} participles that indicate future events.",
parents = {"partisipel"},
}
labels["future passive participles"] = {
description = "{{{langname}}} participles that express a patient having an action performed on it in future time.",
parents = {"partisipel"},
}
local function gerund_description(data)
local default_text = "{{{langname}}} verbs that are conjugated to indicate ongoing events at unspecified moments."
if not data.lang then
-- This happens e.g. in [[:Category:Gerunds by language]].
return default_text
else
local langcode = data.lang:getCode()
if langcode == "sq" or langcode == "kmr" or langcode == "liv" or data.lang:inFamily("gem", "itc") then
return "{{{langname}}} forms that generally act as an action noun for the verb that they are formed from."
elseif langcode == "sa" or langcode == "pi" then
return "{{{langname}}} verb forms used in a clause to indicate a prior action by the subject of the sentence."
else
return default_text
end
end
end
labels["gerunds"] = {
description = gerund_description,
additional = "{{small|[Edit function gerund_description() in [[Modul:category tree/non-lemma forms]] to change this description.]}}",
parents = {"Bentuk kata kerja"},
}
labels["imperfect participles"] = {
description = "{{{langname}}} participles that express an ongoing or continuous action.",
parents = {"partisipel"},
}
labels["infinitives"] = {
description = "{{{langname}}} non-finite verb forms of various kinds.",
parents = {"Bentuk kata kerja"},
}
labels["intensive adjectives"] = {
description = "{{{langname}}} adjectives that are derived from a base word to express a stronger concept than the base word.",
parents = {"Bentuk kata sifat"},
}
labels["manuscript forms"] = {
description = "{{{langname}}} words as they appear in original manuscripts.",
parents = {"Bentuk bukan lema"},
}
labels["mutated forms"] = {
description = "{{{langname}}} terms whose initial consonant is mutated due to the effect of the preceding word.",
parents = {"Bentuk bukan lema"},
}
-- Maps English POS names (used for plural label keys) to their Malay equivalents (used for parent references).
local inflected_pos_for_mutation = {
{"adjective", "kata sifat"},
{"adverb", "kata adverba"},
{"determiner", "penunjuk"},
{"interjection","kata seru"},
{"noun", "kata nama"},
{"numeral", "angka"},
{"participle", "partisipel"},
{"particle", "partikel"},
{"prefix", "awalan"},
{"preposition", "preposition"},
{"pronoun", "kata ganti nama"},
{"proper noun", "kata nama khas"},
{"verb", "kata kerja"},
}
for _, pair in ipairs(inflected_pos_for_mutation) do
local pos_en, pos_ms = pair[1], pair[2]
local plpos = pluralize(pos_en)
labels["mutated " .. plpos] = {
description = "{{{langname}}} " .. plpos .. " whose initial consonant is mutated due to the effect of the preceding word.",
parents = {"Bentuk " .. pos_ms, {name = "mutated forms", sort = pos_en}},
}
end
local mutation_types = {
-- FIXME, we should add these terms to [[Appendix:Glossary]] and link to them.
["eclipsed"] = "[[Appendix:Irish mutations#Eclipsis|eclipsis]]",
["lenited"] = "[[Appendix:Irish mutations#Lenition|lenition]]",
["h-prothesized"] = "[[h-prothesis]]",
["t-prothesized"] = "[[t-prothesis]]",
["aspirate-mutation"]= "[[aspirate mutation]]",
["hard-mutation"] = "[[hard mutation]]",
["mixed-mutation"] = "[[mixed mutation]]",
["nasal-mutation"] = "[[nasal mutation]]",
["soft-mutation"] = "[[soft mutation]]",
}
for muttype, desc in pairs(mutation_types) do
labels[muttype .. " forms"] = {
description = "{{{langname}}} terms whose initial consonant is mutated through " .. desc .. ", due to the effect of the preceding word.",
parents = {"mutated forms"},
}
end
labels["partisipel negatif"] = {
description = "{{{langname}}} participles that express lack of an action being performed.",
parents = {"partisipel"},
}
labels["nominal participles"] = {
description = "{{{langname}}} participles that function as nouns.",
parents = {"partisipel", "kata nama"},
}
labels["noun construct forms"] = {
description = "{{{langname}}} nouns that are inflected to modify a noun in a genitive construction.",
parents = {{name = "Bentuk kata nama", sort = "construct"}},
}
labels["noun definite forms"] = {
description = "{{{langname}}} nouns that are inflected to designate an identified object.",
parents = {{name = "Bentuk kata nama", sort = "definite"}},
}
labels["noun feminine forms"] = {
description = "{{{langname}}} nouns that are inflected to be associated to female beings.",
parents = {{name = "Bentuk kata nama", sort = "feminine"}},
}
labels["noun indefinite forms"] = {
description = "{{{langname}}} nouns that are inflected to designate an unidentified object.",
parents = {{name = "Bentuk kata nama", sort = "indefinite"}},
}
labels["noun masculine forms"] = {
description = "{{{langname}}} nouns that are inflected to be associated to male beings.",
parents = {{name = "Bentuk kata nama", sort = "masculine"}},
}
labels["noun paucal forms"] = {
description = "{{{langname}}} nouns that are inflected to be quantified as between two (or three in some languages with dual number) and ten.",
parents = {{name = "Bentuk kata nama", sort = "paucal"}},
}
labels["noun possessive forms"] = {
description = "{{{langname}}} nouns that are inflected to indicate possession.",
parents = {{name = "Bentuk kata nama", sort = "possessive"}},
}
labels["Partisipel"] = {
description = "{{{langname}}} verbal forms that behave syntactically like adjectives (or sometimes adverbs), and in some languages are often used in compound conjugations and/or reduced relative clauses.",
parents = {"Bentuk kata kerja"},
}
labels["passive participles"] = {
description = "{{{langname}}} participles that express a patient having an action performed on it.",
parents = {"partisipel"},
}
labels["passive adjectival participles"] = {
description = "{{{langname}}} participles that function as adjectives and express a patient having an action performed on it.",
parents = {"partisipel", "kata sifat"},
}
labels["past active aorist participles"] = {
description = "{{{langname}}} participles that express completed events in past time.",
parents = {"partisipel"},
}
labels["past active imperfect participles"] = {
description = "{{{langname}}} participles that express ongoing events in past time.",
parents = {"partisipel"},
}
labels["past active participles"] = {
description = "{{{langname}}} participles that express an agent actively performing an action in past time.",
parents = {"partisipel"},
}
labels["past adverbial participles"] = {
description = "{{{langname}}} participles that function as adverbs and express actions in past time.",
parents = {"partisipel kata adverba", "kata adverba"},
}
labels["past participles"] = {
description = "{{{langname}}} participles that express actions in past time.",
parents = {"partisipel"},
}
labels["past passive participles"] = {
description = "{{{langname}}} participles that express a patient having an action performed on it in past time.",
parents = {"partisipel"},
}
labels["perfect participles"] = {
description = "{{{langname}}} participles that express having completed or undergone an action.",
parents = {"partisipel"},
}
labels["perfect active participles"] = {
description = "{{{langname}}} participles that express an agent having completed an action.",
parents = {"partisipel"},
}
labels["prepositional pronouns"] = {
description = "{{{langname}}} pronouns that are combined with a preposition.",
umbrella_parents = "Lemmas subcategories by language",
parents = {"Bentuk kata ganti nama", {name = "preposition", sort = "pronouns"}},
}
labels["present active participles"] = {
description = "{{{langname}}} participles that express an agent actively performing an action in present time.",
parents = {"partisipel"},
}
labels["present adverbial participles"] = {
description = "{{{langname}}} participles that function as adverbs and express actions in present time.",
parents = {"partisipel kata adverba", "kata adverba"},
}
labels["present middle participles"] = {
description = "{{{langname}}} participles that express an agent performing an action in present time in middle voice.",
parents = {"partisipel"},
}
labels["present participles"] = {
description = "{{{langname}}} participles that express actions occurring in the present time.",
parents = {"partisipel"},
}
labels["present passive participles"] = {
description = "{{{langname}}} participles that express a patient having an action performed on it in present time.",
parents = {"partisipel"},
}
labels["pronoun possessive forms"] = {
description = "{{{langname}}} pronouns that are inflected to indicate possession.",
parents = {{name = "Bentuk kata ganti nama", sort = "possessive"}},
}
labels["pronunciation variants"] = {
description = "{{{langname}}} words that have alternative pronunciation-based spellings.",
parents = {"Bentuk bukan lema"},
}
labels["singulatives"] = {
description = "{{{langname}}} plural nouns that are inflected for singular number.",
parents = {"Bentuk kata nama"},
}
labels["verb causative forms"] = {
description = "{{{langname}}} verbs that are conjugated to express actions caused by external conditions.",
parents = {{name = "Bentuk kata kerja", sort = "causative"}},
}
labels["verb irregular forms"] = {
description = "{{{langname}}} verb forms that don't follow standard patterns of conjugation.",
parents = {{name = "Bentuk kata kerja", sort = "irregular"}},
}
labels["verb negative forms"] = {
description = "{{{langname}}} verbs that are conjugated to express negation.",
parents = {{name = "Bentuk kata kerja", sort = "negative"}},
}
labels["verb passive forms"] = {
description = "{{{langname}}} verbs that are conjugated to direct the action to the grammatical subject, by means of passive voice.",
parents = {{name = "Bentuk kata kerja", sort = "passive"}},
}
labels["verb simple past forms"] = {
description = "{{{langname}}} verbs that are conjugated to indicate events before the current moment.",
parents = {{name = "Bentuk kata kerja", sort = "simple past"}},
}
local labels2 = {}
-- Add "reconstructed" subcategories; add 'umbrella_parents' key if not
-- already present.
for key, data in pairs(labels) do
labels2[key] = data
if not data.umbrella_parents then
data.umbrella_parents = "Subkategori bentuk bukan lema mengikut bahasa"
end
labels2[key .. " terekonstruksi"] = {
description = key .. " {{{langname}}} yang telah [[Wiktionary:Reconstructed terms|direkonstruksi]] dari segi linguistik.",
umbrella_parents = "Subkategori bentuk bukan lema mengikut bahasa",
parents = {key, {name = "Kata rekonstruksi", sort = key}}
}
end
-- These are top-level; don't (for the moment at least) add 'reconstructed alternative forms'.
-- These are created by setting the altform= parameter to {{head}} or full_headword() in [[Module:headword]]. See
-- [[Wiktionary:Beer parlour/2024/June#Decluttering the altform mess]] for discussion.
labels2["Bentuk alternatif"] = {
description = "Bentuk alternatif [[Wikikamus:Lema|lema]] bahasa {{{langname}}}, yakni bentuk varian atau ejaan yang wujud tetapi bersifat sampingan, dan tidak lazim dipakai.",
additional = "Ini termasuk varian ejaan tidak lazim; bentuk dialek; ejaan usang atau lama; ejaan tulisan tidak lazim; dan lain-lain. " ..
"Ia dikeluarkan dari kategori lema untuk menjaga kerapian kategori. Varian kegunaan lazim tidak patut diletakkan dalam kategori ini tetapi perlu dianggap sebagai lema.",
umbrella_parents = "Asas",
parents = {{name = "{{{langcat}}}", raw = true}},
}
-----------------------------------------------------------------------------
-- --
-- RAW CATEGORIES --
-- --
-----------------------------------------------------------------------------
raw_categories["Subkategori bentuk bukan lema mengikut bahasa"] = {
description = "Umbrella categories covering topics related to non-lemma forms.",
additional = "{{{umbrella_meta_msg}}}",
parents = {
"Metakategori payung",
{name = "Bentuk bukan lema", is_label = true, sort = " "},
},
}
return {LABELS = labels2, RAW_CATEGORIES = raw_categories}