This module handles generating the descriptions and categorization for Hebrew category pages of the format "Hebrew LABEL" where LABEL can be any text. Examples are Category:Bulgarian conjugation 2.1 verbs and Category:Russian velar-stem neuter-form nouns. This module is part of the poscatboiler system, which is a general framework for generating the descriptions and categorization of category pages.
For more information, see Module:category tree/poscatboiler/data/lang-specific/documentation.
NOTE: If you add a new language-specific module, you must add the language code to the list at the top of Module:category tree/poscatboiler/data/lang-specific in order for the module to be recognized.
local labels = {}
local handlers = {}
local lang = require("Module:languages").getByCode("he")
local m_table = require("Module:table")
-- FIXME: It should be possible to compute the plene form automatically.
local plene_form_for_pattern = {
= "קטילה",
= "קטולה",
= "קוטל",
= "קיטלון",
= "מקוטל",
}
labels = {
description = "Hebrew terms classified by their pattern. A ''pattern'' in the Semitic languages is a phonological template " ..
"with specified vowels, into which the consonants of the root are inserted. By convention, the verb " ..
"{{m|he|קָטַל|tr=katál||to kill}} is used to fill out the consonants of the pattern.",
parents = {"lemmas"},
}
table.insert(handlers, function(data)
local pattern = mw.ustring.match(data.label, "^terms in the pattern (+)$")
if pattern then
local plene = plene_form_for_pattern
local link = require("Module:links").full_link({ lang = lang, term = pattern }, "term")
local altlink = require("Module:links").full_link({ lang = lang, alt = pattern }, "term")
return {
description = "Hebrew terms that are in the pattern, or ''mishkál'', <big>{{he-l|:Appendix:Hebrew patterns/" ..
pattern .. "|wv=" .. (plene or pattern) .. (plene and "|dwv=" .. pattern or "") .. "}}</big>.",
displaytitle = "Hebrew terms in the pattern " .. altlink,
breadcrumb = altlink,
parents = {{name = "terms by pattern", sort = pattern}},
}
end
end)
--------------------------- Verbs ----------------------------
labels = {
description = "{{{langname}}} verbs with weak roots.",
breadcrumb = "with weak roots",
parents = {{name = "verbs", sort = "weak roots"}},
}
local binyans = {
= 1,
= 2,
= 3,
= 4,
= 5,
= 6,
= 7,
= 8, -- a suspect binyan
}
local radical_identifier = {
= "first",
= "second",
= "third",
}
local weak_letter = m_table.listToSet { "א", "ה", "ו", "ח", "י", "נ", "ע", "ר" }
local function construction_cat(binyan)
return "''']'''"
end
for binyan, order in pairs(binyans) do
-- Add label for e.g. ].
labels = {
description = "{{{langname}}} verbs in the '']'' ].",
breadcrumb = "''" .. binyan .. "''",
parents = {{name = "verbs", sort = " " .. order}},
}
-- Add label for e.g. ].
labels = {
description = construction_cat(binyan) .. " with weak roots.",
breadcrumb = "with weak roots",
parents = {
{name = binyan .. " verbs", sort = "*"},
{name = "verbs with weak roots", sort = " " .. order},
}
}
end
-- Handler for e.g. ] and ].
table.insert(handlers, function(data)
local radical_and_letter, radical, letter, binyan = mw.ustring.match(data.label, "^((.)״(.)) (*) verbs$")
if not radical then
radical_and_letter, radical, letter = mw.ustring.match(data.label, "^((.)״(.)) verbs$")
end
if radical and radical_identifier and weak_letter and (not binyan or binyans) then
local altlink = "{{m|he||" .. radical_and_letter .. "}}"
if radical == "ע" and letter == "ע" then -- double-ayin verbs
desc = "with geminate roots"
else
desc = "with weak roots having " .. letter .. " as their " .. radical_identifier .. " radical"
end
if binyan then
return {
description = construction_cat(binyan) .. " " .. desc .. ".",
displaytitle = "{{{langname}}} " .. altlink .. " " .. binyan .. " verbs",
breadcrumb = "''" .. binyan .. "''",
parents = {
{name = radical_and_letter .. " verbs", sort = " " .. binyans},
{name = binyan .. " verbs with weak roots", sort = radical .. letter}
},
}
else
return {
description = "{{{langname}}} verbs " .. desc .. ".",
displaytitle = "{{{langname}}} " .. altlink .. " verbs",
breadcrumb = altlink,
parents = {{name = "verbs with weak roots", sort = radical .. letter}},
}
end
end
local binyan = mw.ustring.match(data.label, "^(*) verbs$")
if binyan and binyans then
end
end)
return {LABELS = labels, HANDLERS = handlers}