模組:Category tree/poscatboiler/data/words by number of syllables/sandbox


此數據子模塊定義了維基詞典分類結構的一部分。

關於poscatboiler系統的介紹以及如何添加或更改分類,請參見Module:category tree/poscatboiler/data/documentation


local labels = {}
local raw_categories = {}
local handlers = {}



-----------------------------------------------------------------------------
--                                                                         --
--                                  LABELS                                 --
--                                                                         --
-----------------------------------------------------------------------------


labels["依音節數分類的"] = {
	description = "{{{langname}}}詞彙按音節數量分類。",
	umbrella_parents = "Terms by lexical property subcategories by language",
	parents = {"依音位屬性分類的"},
}



-----------------------------------------------------------------------------
--                                                                         --
--                              RAW CATEGORIES                             --
--                                                                         --
-----------------------------------------------------------------------------


raw_categories["音節數子分類"] = {
	description = "Umbrella categories covering topics related to words categorized by their number of syllables.",
	additional = "{{{umbrella_meta_msg}}}",
	parents = {
		"Umbrella metacategories",
		{name = "依音節數分類的", is_label = true, sort = " "},
	},
}



-----------------------------------------------------------------------------
--                                                                         --
--                                 HANDLERS                                --
--                                                                         --
-----------------------------------------------------------------------------


table.insert(handlers, function(data)
	local number = data.label:match("^([1-9][0-9]*)音節詞$")
	if number then
		return {
			description = "有" .. number .. "個音節的{{{langname}}}詞。",
			breadcrumb = number,
			umbrella_parents = "音節數子分類",
			parents = {{
				name = "依音節數分類的",
				sort = ("#%02d"):format(number),
			}},
		}
	end
end)

return {LABELS = labels, RAW_CATEGORIES = raw_categories, HANDLERS = handlers}