Module:category tree/poscatboiler/data/lang-specific/he

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["terms by pattern"] = { 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 " .. " 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 ([" .. mw.ustring.char(0x0590) .. "-" .. mw.ustring.char(0x05FF) .. "]+)$")	if pattern then		local plene = plene_form_for_pattern[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, .",			displaytitle = "Hebrew terms in the pattern " .. altlink,			breadcrumb = altlink,			parents = ,		}	end end)

--- Verbs

labels["verbs with weak roots"] = { description = " verbs with weak roots.", breadcrumb = "with weak roots", parents = , }

local binyans = { ["pa'al"] = 1, ["nif'al"] = 2, ["pi'el"] = 3, ["pu'al"] = 4, ["hif'il"] = 5, ["huf'al"] = 6, ["hitpa'el"] = 7, ["hitpu'al"] = 8, -- a suspect binyan } local radical_identifier = { ["פ"] = "first", ["ע"] = "second", ["ל"] = "third", } local weak_letter = m_table.listToSet { "א", "ה", "ו", "ח", "י", "נ", "ע", "ר" }

local function construction_cat(binyan) return " verbs of the " .. binyan .. " construction" end

for binyan, order in pairs(binyans) do -- Add label for e.g.. labels[binyan .. " verbs"] = { description = " verbs in the " .. binyan .. " binyan.", breadcrumb = "''" .. binyan .. "''",		parents = , }	-- Add label for e.g.. labels[binyan .. " verbs with weak roots"] = { 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[radical] and weak_letter[letter] and (not binyan or binyans[binyan]) then		local altlink = ""		if radical == "ע" and letter == "ע" then -- double-ayin verbs			desc = "with geminate roots"		else			desc = "with weak roots having " .. letter .. " as their " .. radical_identifier[radical] .. " radical"		end		if binyan then			return {				description = construction_cat(binyan) .. " " .. desc .. ".",				displaytitle = " " .. altlink .. " " .. binyan .. " verbs",				breadcrumb = "" .. binyan .. "",				parents = {					{name = radical_and_letter .. " verbs", sort = " " .. binyans[binyan]},					{name = binyan .. " verbs with weak roots", sort = radical .. letter} },			}		else return { description = " verbs " .. desc .. ".",				displaytitle = " " .. altlink .. " verbs", breadcrumb = altlink, parents = , }		end end

local binyan = mw.ustring.match(data.label, "^([^ ]*) verbs$") if binyan and binyans[binyan] then end end)

return {LABELS = labels, HANDLERS = handlers}