Placeholder for the documentation page.
--[=[
TODO:
- Add functionality for short headword display with transcription: ex. 𐤐𐤏𐤋 (pa'al)
- Continue implementing basic tables for strong, triconsonantal pa'al roots.
Keywords and Abbreviations:
Input Parameters:
1: Stem/binyan abbreviation
p: First root letter
a: Second root letter
l: Third root letter
Binyan Abbreviations:
pa: pa'al
pi: pi'el
pu: pu'al
nip: nip'al
yip: yip'il
yit: yitpe'el
yipta: yipta'al
Tense Abbreviations:
imp: imperative
suf: suffix conjugation
preA: prefix conjugation A
preB: prefix conjugation B
jus: jussive (a.k.a. prefix conjugation C)
act: active participle
pas: passive participle
]=]
local m_utilities = require("Module:utilities")
local export = {}
local lang = require("Module:languages").getByCode("phn")
-- Transliteration table for phoenician letters
local translit_cache = {
= 'ʔ',
= 'b',
= 'd',
= 'g',
= 'h',
= 'w',
= 'z',
= 'ħ',
= 'tˤ',
= 'y',
= 'k',
= 'l',
= 'm',
= 'n',
= 't͡s',
= 'ʕ',
= 'p',
= 'sˤ',
= 'q',
= 'r',
= 's',
= 't',
}
local suffix_cache = {
= 'ti',
= 'ta',
= 'ti',
= '',
= 'a',
= 'nu',
= 'tem',
= '?',
= 'ū',
= '?'
}
function translit_char(char)
local letter = translit_cache
if (letter) then
return letter
end
end
-- Stems are functions responsible for creating the basic verb forms.
-- They are defined further below based on the binyan and root consonants.
local stems = {}
-- Main entry point. Can be invoked from a template.
function export.show(frame)
-- Check if verb class and stem type have been included, otherwise give error message
args = frame:getParent().args
local conj_type = args or frame.args or error("Conjugation type has not been specified.")
local stem_type = args or fram.args or error("Stem binyan has not been specified.")
SUBPAGENAME = mw.title.getCurrentTitle().subpageText
NAMESPACE = mw.title.getCurrentTitle().nsText
-- Declare empty variables for verb forms, table titles, and category labels
local forms, title, categories
if stems then
forms, titles, categories = stems(args)
else
error("Unknown conjugation type '" .. conj_type .. "'")
end
-- Generate a table with the appropriate verb forms and title
return make_table(forms, title) .. m_utilities.format_categories(categories, lang)
end
-- Create strong verb stems
stems = function(args)
local forms = {}
local class = args or ""; if class ~= "" then class = " class " .. class end
local categories = {"Phoenician" .. class .. " strong verbs"}
local title = "strong" .. class
-- Assign root consonants to local variables
local p = args or error("The first root is missing.")
local a = args or error("The second root is missing.")
local l = args or error("The third root is missing.")
-- Assign transliteration to local variables
local r1 = translit_char(p)
local r2 = translit_char(a)
local r3 = translit_char(l)
-- Assign stems to local variables
local suf_stem = (p .. a .. l) or (NAMESPACE == "Template" and "(1)") or error("The first stem is missing.")
local pre_stem = (p .. a .. l) or (NAMESPACE == "Template" and "(2)") or error("The second stem is missing.")
local imp_stem = (p .. a .. l) or (NAMESPACE == "Template" and "(3)") or error("The third stem is missing.")
-- Generate verb forms based on given stems
suf_strong(forms, suf_stem, r1, r2, r3)
pre_strong(forms, pre_stem, r1, r2, r3)
alt_strong(forms, pre_stem)
part_strong(forms, suf_stem)
imp_strong(forms, imp_stem)
return forms, title, categories
end
-- Conjugate strong verbs
function suf_strong(forms, stem, x, y, z)
-- Suffixing form
forms = stem .. "𐤕"
forms = stem .. "𐤕"
forms = stem .. "𐤕"
forms = stem
forms = stem .. "𐤀"
forms = stem .. "𐤍"
forms = stem .. "𐤕"
forms = "?"
forms = stem .. " / " .. stem .. "𐤀"
forms = "?"
forms = populate(x, y, z, "a", "a") .. "ti"
forms = populate(x, y, z, "a", "a") .. "ta"
forms = populate(x, y, z, "a", "a") .. "ti"
forms = populate(x, y, z, "a", "o")
forms = populate(x, y, z, "e") .. "a"
forms = populate(x, y, z, "a", "a") .. "nu"
forms = populate(x, y, z, "", "a") .. "tem"
forms = populate(x, y, z, "e") .. "ū"
end
function pre_strong(forms, stem, x, y, z)
-- Prefixing form A
forms = "𐤀" .. stem
forms = "𐤕" .. stem
forms = "?"
forms = "𐤉" .. stem
forms = "𐤕" .. stem
forms = "𐤍" .. stem
forms = "𐤕" .. stem .. "𐤍"
forms = "?"
forms = "𐤉" .. stem .. "𐤍"
forms = "?"
forms = "ʔi" .. populate(x, y, z, "", "o")
forms = "ti" .. populate(x, y, z, "", "o")
forms = "yi" .. populate(x, y, z, "", "o")
forms = "ti" .. populate(x, y, z, "", "o")
forms = "ni" .. populate(x, y, z, "", "o")
forms = "ti" .. populate(x, y, z, "", "a") .. "ūn"
forms = "yi" .. populate(x, y, z, "a") .. "ūn"
end
function alt_strong(forms, stem)
-- Prefixing form B
forms = "𐤕" .. stem .. "𐤉"
forms = "𐤕" .. stem .. " / " .. "𐤕" .. stem .. "𐤀"
forms = "𐤉" .. stem .. " / " .. "𐤉" .. stem .. "𐤀"
end
function part_strong(forms, stem)
-- Participles
forms = stem
forms = stem .. "𐤕"
forms = stem .. "𐤌"
forms = stem .. "𐤕"
forms = stem
forms = stem .. "𐤕"
forms = stem .. "𐤌"
forms = stem .. "𐤕"
end
function imp_strong(forms, stem)
--Imperative
forms = stem
forms = stem .. " / " .. stem .. "𐤉"
forms = stem .. " / " .. stem .. "𐤍"
forms = "?"
end
-- Populate transliterated form with vowels
function populate(p, a, l, v1, v2)
local p = p
local a = a
local l = l
local v1 = v1 or "" -- Default value
local v2 = v2 or "" -- Default value
local stem = p .. v1 .. a .. v2 .. l
return stem
end
-- Make the table, ***Currently Unfinished***
function make_table(forms, title)
return mw.getCurrentFrame():expandTemplate{
title = 'inflection-table-top',
args = {
title = "Conjugation of '" .. forms .. "'",
-- .. (title and " (" .. title .. ")" or ""),
palette = 'orange',
tall = 'yes'
}
} .. [=[
! colspan="2" rowspan="2" class="outer" |
! scope='col' colspan="2" | singular
! scope='col' colspan="2" | plural
| rowspan="20" class="separator" |
! scope='col' colspan="2" | singular
! scope='col' colspan="2" | plural
|-
! scope='col' class="secondary" | m
! scope='col' class="secondary" | f
! scope='col' class="secondary" | m
! scope='col' class="secondary" | f
! scope='col' class="secondary" | m
! scope='col' class="secondary" | f
! scope='col' class="secondary" | m
! scope='col' class="secondary" | f
|-
! scope='row' rowspan="3" | Suffixing Form
! scope='row' class="secondary" | 1st
| colspan="2" | ]=] .. forms .. " || " .. [=[
colspan="2" | ]=] .. forms .. " || " .. [=[
colspan="2" | ]=] .. forms .. " || " .. [=[
colspan="2" | ]=] .. forms .. " || " .. [=[
|-
! scope='row' class="secondary" | 2nd
| ]=] .. forms .. " || " .. forms .. " || "
.. forms .. " || " .. forms .. " || "
.. forms .. " || " .. forms .. " || "
.. forms .. " || " .. forms .. [=[
|-
! scope='row' class="secondary" | 3rd
| ]=] .. forms .. " || " .. forms .. " || " .. [=[
colspan="2" | ]=] .. forms .. " || " .. forms .. " || "
.. forms .. " || " .. [=[
colspan="2" | ]=] .. forms .. [=[
|-
! class="separator" colspan="6" |
| colspan="6" rowspan="10" class="blank-end-row" |
|-
! scope='row' rowspan="3" | Prefixing Form A
! scope='row' class="secondary" | 1st
| colspan="2" | ]=] .. forms .. " || " .. [=[
colspan="2" | ]=] .. forms .. " || " .. [=[
colspan="2" | ]=] .. forms .. " || " .. [=[
colspan="2" | ]=] .. forms .. [=[
|-
! scope='row' class="secondary" | 2nd
| ]=] .. forms .. " || " .. forms .. " || "
.. forms .. " || " .. forms .. " | "
.. forms .. " || " .. forms .. " || "
.. forms .. " || " .. forms .. [=[
|-
! scope='row' class="secondary" | 3rd
| ]=] .. forms .. " || " .. forms .. " || "
.. forms .. " || " .. forms .. " | "
.. forms .. " || " .. forms .. " || "
.. forms .. " || " .. forms .. [=[
|-
! class="separator" colspan="6" |
| colspan="6" rowspan="10" class="blank-end-row" |
|-
! scope='row' rowspan="3" | Prefixing Form B
! scope='row' class="secondary" | 1st
| colspan="2" | ]=] .. forms .. " || " .. [=[
colspan="2" | ]=] .. forms .. [=[
|-
! scope='row' class="secondary" | 2nd
| ]=] .. forms .. " || " .. forms .. " || "
.. forms .. " || " .. forms .. [=[
|-
! scope='row' class="secondary" | 3rd
| ]=] .. forms .. " || " .. forms .. " || "
.. forms .. " || " .. forms .. [=[
|-
! class="separator" colspan="6" |
| colspan="6" rowspan="10" class="blank-end-row" |
|-
! scope='row' colspan="2" | Active Participle
| ]=] .. forms .. " || " .. forms .. " || "
.. forms .. " || " .. forms .. [=[
|-
! scope='row' colspan="2" | Passive Participle
| ]=] .. forms .. " || " .. forms .. " || "
.. forms .. " || " .. forms .. [=[
|-
! class="separator" colspan="6" |
| colspan="6" rowspan="10" class="blank-end-row" |
|-
! scope='row' rowspan="2" | Imperative
! scope='row' class="secondary" | Short
| ]=] .. forms .. " || " .. forms .. " || "
.. forms .. " || " .. forms .. [=[
|--
! scope='row' class="secondary" | Long
| ]=] .. forms .. " || " .. forms .. " || "
.. forms .. " || " .. forms .. [=[
]=] .. mw.getCurrentFrame():expandTemplate{
title = 'inflection-table-bottom',
}
end
return export