Wiktionary
omwiktionary
https://om.wiktionary.org/wiki/Fuula_Dura
MediaWiki 1.47.0-wmf.6
case-sensitive
Media
Special
Talk
User
User talk
Wiktionary
Wiktionary talk
File
File talk
MediaWiki
MediaWiki talk
Template
Template talk
Help
Help talk
Category
Category talk
TimedText
TimedText talk
Module
Module talk
Event
Event talk
farda
0
2316
40806
39589
2026-06-09T19:30:56Z
EyobAbebe7
3540
/* */
40806
wikitext
text/x-wiki
{{k}} [[gaangee]], [[harree]], [[gaala]]
{{-om-}}
{{Wikipedia}}
{{Xinj}}
Jecha Afaan Oromoo durjireessa kan [[Oromduroo]]n itti dhimma bahaa ture.
{{t|Jecha Afaan Oromoo Farda.wav|Afán Oromó|{{Sag|Fa-.wav|FA-}}/{{Sag|-AR.wav|-AR}}/{{Sag|-DA.wav|-DA}}}}
{{maq|farda|fardoota|fardeen}}
'''farda''' (baay'ina [[fardoota]]), (lakkaa'amaa)
[[File:Cavalo Arabe REFON.jpg|thumb|200px]]
{{Om-cib1|farda}}
# '''farda''', beellada manaa kan geejibaaf oolu.
{{-trad-}}
{{inici|Farda, beellada geejibaaf oolu}}
* {{de}}: {{trad|de|Pferd}}
* {{en}}: {{trad|en|horse}}
* {{ast}}: {{trad|ast|caballu}}
* {{eu}}: {{trad|eu|zaldi}}
* {{es}}: {{trad|es|caballo}}
* {{co}}: {{trad|co|cavaddu}}
* {{da}}: {{trad|da|hest}}
* {{sk}}: {{trad|sk|kôň}}
* {{eo}}: {{trad|eo|ĉevalo}}
* {{fi}}: {{trad|fi|hevonen}}
* {{fr}}: {{trad|fr|cheval}}
* {{fur}}: {{trad|fur|chaval}}, {{trad|fur|cjaval}}
* {{gl}}: {{trad|gl|cabalo}}
* {{el}}: {{trad|el|άλογο}}
* {{grc}}: {{trad|grc|ἵππος}}
* {{he}}: {{trad|he|סוּס}}
{{mig}}
* {{hi}}: {{trad|hi|घोड़ा}}
* {{hu}}: {{trad|hu|ló}}
* {{it}}: {{trad|it|cavallo}}
* {{la}}: {{trad|la|equus}}, {{trad|la|caballus}}
* {{oc}}: {{trad|oc|caval}}
* {{pl}}: {{trad|pl|koń}}
* {{pt}}: {{trad|pt|cavalo}}
* {{qu}}: {{trad|qu|kawallu}}
* {{rm}}: {{trad|rm|chaval}}
* {{ro}}: {{trad|ro|cal}}
* {{ru}}: {{trad|ru|лошадь}}, {{trad|ru|конь}}
* {{sc}}: {{trad|sc|cuaddu}}
* {{scn}}: {{trad|scn|cavaddu}}
* {{tr}}: {{trad|tr|at}}
* {{cs}}: {{trad|cs|kůň}}
* {{vec}}: {{trad|vec|cavało}}, {{trad|vec|caval}}
{{final}}
{{dag}}
cfua2edhwa0v2m8eqgcv61jg411yd4g
40821
40806
2026-06-09T22:08:42Z
EyobAbebe7
3540
/* */
40821
wikitext
text/x-wiki
{{k}} [[gaangee]], [[harree]], [[gaala]]
{{-om-}}
{{Wikipedia}}
{{Xinj}}
Jecha Afaan Oromoo durjireessa kan [[Oromduroo]]n itti dhimma bahaa ture.
{{t|Jecha Afaan Oromoo Farda.wav|Afán Oromó|{{Sag|Fa-.wav|FA-}}/{{Sag|-AR.wav|-AR}}/{{Sag|-DA.wav|-DA}}}}
{{maq|farda|fardoota|fardeen}}
{{syllables|farda}}
'''farda''' (baay'ina [[fardoota]]), (lakkaa'amaa)
[[File:Cavalo Arabe REFON.jpg|thumb|200px]]
{{Om-cib1|farda}}
# '''farda''', beellada manaa kan geejibaaf oolu.
{{-trad-}}
{{inici|Farda, beellada geejibaaf oolu}}
* {{de}}: {{trad|de|Pferd}}
* {{en}}: {{trad|en|horse}}
* {{ast}}: {{trad|ast|caballu}}
* {{eu}}: {{trad|eu|zaldi}}
* {{es}}: {{trad|es|caballo}}
* {{co}}: {{trad|co|cavaddu}}
* {{da}}: {{trad|da|hest}}
* {{sk}}: {{trad|sk|kôň}}
* {{eo}}: {{trad|eo|ĉevalo}}
* {{fi}}: {{trad|fi|hevonen}}
* {{fr}}: {{trad|fr|cheval}}
* {{fur}}: {{trad|fur|chaval}}, {{trad|fur|cjaval}}
* {{gl}}: {{trad|gl|cabalo}}
* {{el}}: {{trad|el|άλογο}}
* {{grc}}: {{trad|grc|ἵππος}}
* {{he}}: {{trad|he|סוּס}}
{{mig}}
* {{hi}}: {{trad|hi|घोड़ा}}
* {{hu}}: {{trad|hu|ló}}
* {{it}}: {{trad|it|cavallo}}
* {{la}}: {{trad|la|equus}}, {{trad|la|caballus}}
* {{oc}}: {{trad|oc|caval}}
* {{pl}}: {{trad|pl|koń}}
* {{pt}}: {{trad|pt|cavalo}}
* {{qu}}: {{trad|qu|kawallu}}
* {{rm}}: {{trad|rm|chaval}}
* {{ro}}: {{trad|ro|cal}}
* {{ru}}: {{trad|ru|лошадь}}, {{trad|ru|конь}}
* {{sc}}: {{trad|sc|cuaddu}}
* {{scn}}: {{trad|scn|cavaddu}}
* {{tr}}: {{trad|tr|at}}
* {{cs}}: {{trad|cs|kůň}}
* {{vec}}: {{trad|vec|cavało}}, {{trad|vec|caval}}
{{final}}
{{dag}}
2eygblhw9a0m1abxwaafkouxpgatvwu
Afaan Oromoo
0
3173
40827
40682
2026-06-09T22:35:33Z
EyobAbebe7
3540
/* Afaan Oromoo */
40827
wikitext
text/x-wiki
{{k}} [[qooqa]], [[afaan]], [[Oromoo]], [[Kuush]]
==Afaan Oromoo==
{{Wikipedia}}
{{Xinj}}
* Afaan fi maqaa sabichaa Oromoo jedhu irraa dhufe.
{{maqq}}
{{syllables|Afaan Oromoo}}
# Afaan saba guddaa [[Afrikaa]] bahaa irra jiraatu dha.
# Afaan uummata miliyeena jahatama oliin dubbatamuu dha.
{{Sadh}}
* [[Oromummaa]], [[Oromiyaa]], [[Oromeessuu]]
{{dag}}
5h92uyc3zrsvqi8ulyocygq43utdhhb
Template:Om-cib1
10
26649
40804
2026-06-09T19:04:36Z
EyobAbebe7
3540
Created page with "{{#invoke:om-noun|cib1|{{{1|}}}}}"
40804
wikitext
text/x-wiki
{{#invoke:om-noun|cib1|{{{1|}}}}}
5ommhu12y1f98dqru9y3lsn1muum84v
40805
40804
2026-06-09T19:28:58Z
EyobAbebe7
3540
/* */
40805
wikitext
text/x-wiki
Test works.
Parameter: {{{1|none}}}
nh4j7l5cmkofv5h4v7e21wg7m2uvnna
40808
40805
2026-06-09T19:57:09Z
EyobAbebe7
3540
/* */
40808
wikitext
text/x-wiki
{{#invoke:om-noun|cib1|{{{1|}}}}}
5ommhu12y1f98dqru9y3lsn1muum84v
Module:om-noun
828
26650
40807
2026-06-09T19:54:15Z
EyobAbebe7
3540
Created page with "local p = {} -- ========================= -- BASIC MORPHOLOGY RULES -- ========================= local function nominative(word) -- very simple placeholder rule if mw.ustring.sub(word, -1) == "a" then return mw.ustring.sub(word, 1, -1) .. "i" end return word end local function genitive(word) return word .. "a" end local function dative(word) return word .. "af" end -- ========================= -- MAIN TEMPLATE FUNCTION -- ============..."
40807
Scribunto
text/plain
local p = {}
-- =========================
-- BASIC MORPHOLOGY RULES
-- =========================
local function nominative(word)
-- very simple placeholder rule
if mw.ustring.sub(word, -1) == "a" then
return mw.ustring.sub(word, 1, -1) .. "i"
end
return word
end
local function genitive(word)
return word .. "a"
end
local function dative(word)
return word .. "af"
end
-- =========================
-- MAIN TEMPLATE FUNCTION
-- =========================
function p.cib1(frame)
local word = frame.args[1] or frame:getParent().args[1] or "farda"
local nom = nominative(word)
local gen = genitive(word)
local dat = dative(word)
local result = "{| class='wikitable'\n"
result = result .. "! Case !! Form\n"
result = result .. "|-\n"
result = result .. "| Absolutive || " .. word .. "\n"
result = result .. "|-\n"
result = result .. "| Nominative || " .. nom .. "\n"
result = result .. "|-\n"
result = result .. "| Genitive || " .. gen .. "\n"
result = result .. "|-\n"
result = result .. "| Dative || " .. dat .. "\n"
result = result .. "|}\n"
return result
end
return p
k0duks47znlzmhdp4lnq2yi9abd5ng3
40809
40807
2026-06-09T20:11:41Z
EyobAbebe7
3540
40809
Scribunto
text/plain
local p = {}
-- =========================
-- UTILITIES
-- =========================
local function lower(w)
return mw.ustring.lower(w or "")
end
local function isVowel(c)
return c and mw.ustring.find("aeiou", c, 1, true)
end
-- double vowels set
local doubleVowels = {
aa=true, ee=true, ii=true, oo=true, uu=true
}
-- =========================
-- ABSOLUTIVE
-- =========================
local function makeAbsolutive(word)
return lower(word)
end
-- =========================
-- ACCUSATIVE
-- =========================
local function makeAccusative(word)
return lower(word)
end
-- =========================
-- GENITIVE
-- =========================
local function makeGenitive(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w
end
if isVowel(last) then
return w .. last
end
return w
end
-- =========================
-- NOMINATIVE
-- =========================
local function makeNominative(word)
local w = lower(word)
-- yyo rule
if mw.ustring.find(w, "yyo$") then
return w
end
-- -da → -nni (if vowel before)
if mw.ustring.find(w, "da$") then
local base = mw.ustring.sub(w, 1, -3)
local last = mw.ustring.sub(base, -1)
if isVowel(last) then
return base .. "nni"
end
end
-- ra → rri
if mw.ustring.find(w, "ra$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "rri"
end
-- la → lli
if mw.ustring.find(w, "la$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "lli"
end
-- fa → fti
if mw.ustring.find(w, "fa$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "fti"
end
-- VCV → -ni
if mw.ustring.len(w) >= 3 then
local v1 = mw.ustring.sub(w, -3, -3)
local c = mw.ustring.sub(w, -2, -2)
local v2 = mw.ustring.sub(w, -1, -1)
if isVowel(v1) and not isVowel(c) and isVowel(v2) then
return mw.ustring.sub(w, 1, -2) .. "ni"
end
end
-- CCV → -i
if mw.ustring.len(w) >= 3 then
local c1 = mw.ustring.sub(w, -3, -3)
local c2 = mw.ustring.sub(w, -2, -2)
local v = mw.ustring.sub(w, -1, -1)
if not isVowel(c1) and not isVowel(c2) and isVowel(v) then
return mw.ustring.sub(w, 1, -2) .. "i"
end
end
-- VV ending → +n
if mw.ustring.find(w, "(aa|ee|ii|oo|uu)$") then
return w .. "n"
end
return w
end
-- =========================
-- FOCUS
-- =========================
local function makeNominativeFocus(word)
return lower(word) .. "tu"
end
-- =========================
-- INSTRUMENTAL
-- =========================
local function makeInstrumental(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "dhaan"
end
if isVowel(last) then
return w .. last .. "n"
end
return w
end
-- =========================
-- INSTRUMENTAL EXTENDED
-- =========================
local function makeInstrumentalExtended(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tiin"
end
if isVowel(last) then
return w .. last .. "tiin"
end
return w .. "iin"
end
-- =========================
-- DATIVE
-- =========================
local function makeDative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "f"
end
if isVowel(last) then
return w .. last .. "f"
end
return w .. "iif"
end
-- =========================
-- DATIVE EXTENDED
-- =========================
local function makeDativeExtended(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tiif"
end
if isVowel(last) then
return w .. last .. "tiif"
end
return w .. "itiif"
end
-- =========================
-- ALLATIVE
-- =========================
local function makeAllative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
if isVowel(last) then
return w .. "tti"
end
return w .. "itti"
end
-- =========================
-- GENITIVE-ALLATIVE
-- =========================
local function makeGenitiveAllative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tti"
end
if isVowel(last) then
return w .. last .. "tti"
end
return w .. "iitti"
end
-- =========================
-- VOCATIVE
-- =========================
local function makeVocative(word)
return "yaa " .. makeGenitive(word)
end
-- =========================
-- MAIN TEMPLATE
-- =========================
function p.cib1(frame)
local word = frame:getParent().args[1] or frame.args[1] or ""
local abs = makeAbsolutive(word)
local nom = makeNominative(word)
local foc = makeNominativeFocus(word)
local acc = makeAccusative(word)
local gen = makeGenitive(word)
local ins = makeInstrumental(word)
local insE = makeInstrumentalExtended(word)
local dat = makeDative(word)
local datE = makeDativeExtended(word)
local all = makeAllative(word)
local gall = makeGenitiveAllative(word)
local voc = makeVocative(word)
local result = "{| class='wikitable'\n"
result = result .. "! Case !! Form\n|-\n"
result = result .. "| Absolutive || " .. abs .. "\n|-\n"
result = result .. "| Nominative || " .. nom .. "\n|-\n"
result = result .. "| Focus || " .. foc .. "\n|-\n"
result = result .. "| Accusative || " .. acc .. "\n|-\n"
result = result .. "| Genitive || " .. gen .. "\n|-\n"
result = result .. "| Instrumental || " .. ins .. "\n|-\n"
result = result .. "| Instrumental (ext) || " .. insE .. "\n|-\n"
result = result .. "| Dative || " .. dat .. "\n|-\n"
result = result .. "| Dative (ext) || " .. datE .. "\n|-\n"
result = result .. "| Allative || " .. all .. "\n|-\n"
result = result .. "| Genitive-Allative || " .. gall .. "\n|-\n"
result = result .. "| Vocative || " .. voc .. "\n"
result = result .. "}\n"
return result
end
return p
4w1q5mb5jpfc42r21ffvsj0mgmyo45x
40810
40809
2026-06-09T20:22:20Z
EyobAbebe7
3540
40810
Scribunto
text/plain
local p = {}
-- =========================
-- UTILITIES
-- =========================
local function lower(w)
return mw.ustring.lower(w or "")
end
local function isVowel(c)
return c and mw.ustring.find("aeiou", c, 1, true)
end
-- double vowels set
local doubleVowels = {
aa=true, ee=true, ii=true, oo=true, uu=true
}
-- =========================
-- ABSOLUTIVE
-- =========================
local function makeAbsolutive(word)
return lower(word)
end
-- =========================
-- ACCUSATIVE
-- =========================
local function makeAccusative(word)
return lower(word)
end
-- =========================
-- GENITIVE
-- =========================
local function makeGenitive(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w
end
if isVowel(last) then
return w .. last
end
return w
end
-- =========================
-- NOMINATIVE
-- =========================
local function makeNominative(word)
local w = lower(word)
-- yyo rule
if mw.ustring.find(w, "yyo$") then
return w
end
-- -da → -nni (if vowel before)
if mw.ustring.find(w, "da$") then
local base = mw.ustring.sub(w, 1, -3)
local last = mw.ustring.sub(base, -1)
if isVowel(last) then
return base .. "nni"
end
end
-- ra → rri
if mw.ustring.find(w, "ra$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "rri"
end
-- la → lli
if mw.ustring.find(w, "la$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "lli"
end
-- fa → fti
if mw.ustring.find(w, "fa$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "fti"
end
-- VCV → -ni
if mw.ustring.len(w) >= 3 then
local v1 = mw.ustring.sub(w, -3, -3)
local c = mw.ustring.sub(w, -2, -2)
local v2 = mw.ustring.sub(w, -1, -1)
if isVowel(v1) and not isVowel(c) and isVowel(v2) then
return mw.ustring.sub(w, 1, -2) .. "ni"
end
end
-- CCV → -i
if mw.ustring.len(w) >= 3 then
local c1 = mw.ustring.sub(w, -3, -3)
local c2 = mw.ustring.sub(w, -2, -2)
local v = mw.ustring.sub(w, -1, -1)
if not isVowel(c1) and not isVowel(c2) and isVowel(v) then
return mw.ustring.sub(w, 1, -2) .. "i"
end
end
-- VV ending → +n
if mw.ustring.find(w, "(aa|ee|ii|oo|uu)$") then
return w .. "n"
end
return w
end
-- =========================
-- FOCUS
-- =========================
local function makeNominativeFocus(word)
return lower(word) .. "tu"
end
-- =========================
-- INSTRUMENTAL
-- =========================
local function makeInstrumental(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "dhaan"
end
if isVowel(last) then
return w .. last .. "n"
end
return w
end
-- =========================
-- INSTRUMENTAL EXTENDED
-- =========================
local function makeInstrumentalExtended(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tiin"
end
if isVowel(last) then
return w .. last .. "tiin"
end
return w .. "iin"
end
-- =========================
-- DATIVE
-- =========================
local function makeDative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "f"
end
if isVowel(last) then
return w .. last .. "f"
end
return w .. "iif"
end
-- =========================
-- DATIVE EXTENDED
-- =========================
local function makeDativeExtended(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tiif"
end
if isVowel(last) then
return w .. last .. "tiif"
end
return w .. "itiif"
end
-- =========================
-- ALLATIVE
-- =========================
local function makeAllative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
if isVowel(last) then
return w .. "tti"
end
return w .. "itti"
end
-- =========================
-- GENITIVE-ALLATIVE
-- =========================
local function makeGenitiveAllative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tti"
end
if isVowel(last) then
return w .. last .. "tti"
end
return w .. "iitti"
end
-- =========================
-- VOCATIVE
-- =========================
local function makeVocative(word)
return "yaa " .. makeGenitive(word)
end
-- =========================
-- MAIN TEMPLATE
-- =========================
function p.cib1(frame)
local word = frame:getParent().args[1] or frame.args[1] or ""
local abs = makeAbsolutive(word)
local nom = makeNominative(word)
local foc = makeNominativeFocus(word)
local acc = makeAccusative(word)
local gen = makeGenitive(word)
local ins = makeInstrumental(word)
local insE = makeInstrumentalExtended(word)
local dat = makeDative(word)
local datE = makeDativeExtended(word)
local all = makeAllative(word)
local gall = makeGenitiveAllative(word)
local voc = makeVocative(word)
local result = "{| class='wikitable'\n"
result = result .. "! Case !! Form\n|-\n"
result = result .. "| Absolutive || " .. abs .. "\n|-\n"
result = result .. "| Nominative || " .. nom .. "\n|-\n"
result = result .. "| Focus || " .. foc .. "\n|-\n"
result = result .. "| Accusative || " .. acc .. "\n|-\n"
result = result .. "| Genitive || " .. gen .. "\n|-\n"
result = result .. "| Instrumental || " .. ins .. "\n|-\n"
result = result .. "| Instrumental (ext) || " .. insE .. "\n|-\n"
result = result .. "| Dative || " .. dat .. "\n|-\n"
result = result .. "| Dative (ext) || " .. datE .. "\n|-\n"
result = result .. "| Allative || " .. all .. "\n|-\n"
result = result .. "| Genitive-Allative || " .. gall .. "\n|-\n"
result = result .. "| Vocative || " .. voc .. "\n"
result = result .. "\n"
return result
end
return p
48lhpu35z5s9r894jy7nmj8lhg1l2b6
40811
40810
2026-06-09T20:25:40Z
EyobAbebe7
3540
40811
Scribunto
text/plain
local p = {}
-- =========================
-- UTILITIES
-- =========================
local function lower(w)
return mw.ustring.lower(w or "")
end
local function isVowel(c)
return c and mw.ustring.find("aeiou", c, 1, true)
end
-- double vowels set
local doubleVowels = {
aa=true, ee=true, ii=true, oo=true, uu=true
}
-- =========================
-- ABSOLUTIVE
-- =========================
local function makeAbsolutive(word)
return lower(word)
end
-- =========================
-- ACCUSATIVE
-- =========================
local function makeAccusative(word)
return lower(word)
end
-- =========================
-- GENITIVE
-- =========================
local function makeGenitive(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w
end
if isVowel(last) then
return w .. last
end
return w
end
-- =========================
-- NOMINATIVE
-- =========================
local function makeNominative(word)
local w = lower(word)
-- yyo rule
if mw.ustring.find(w, "yyo$") then
return w
end
-- -da → -nni (if vowel before)
if mw.ustring.find(w, "da$") then
local base = mw.ustring.sub(w, 1, -3)
local last = mw.ustring.sub(base, -1)
if isVowel(last) then
return base .. "nni"
end
end
-- ra → rri
if mw.ustring.find(w, "ra$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "rri"
end
-- la → lli
if mw.ustring.find(w, "la$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "lli"
end
-- fa → fti
if mw.ustring.find(w, "fa$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "fti"
end
-- VCV → -ni
if mw.ustring.len(w) >= 3 then
local v1 = mw.ustring.sub(w, -3, -3)
local c = mw.ustring.sub(w, -2, -2)
local v2 = mw.ustring.sub(w, -1, -1)
if isVowel(v1) and not isVowel(c) and isVowel(v2) then
return mw.ustring.sub(w, 1, -2) .. "ni"
end
end
-- CCV → -i
if mw.ustring.len(w) >= 3 then
local c1 = mw.ustring.sub(w, -3, -3)
local c2 = mw.ustring.sub(w, -2, -2)
local v = mw.ustring.sub(w, -1, -1)
if not isVowel(c1) and not isVowel(c2) and isVowel(v) then
return mw.ustring.sub(w, 1, -2) .. "i"
end
end
-- VV ending → +n
if mw.ustring.find(w, "(aa|ee|ii|oo|uu)$") then
return w .. "n"
end
return w
end
-- =========================
-- FOCUS
-- =========================
local function makeNominativeFocus(word)
return lower(word) .. "tu"
end
-- =========================
-- INSTRUMENTAL
-- =========================
local function makeInstrumental(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "dhaan"
end
if isVowel(last) then
return w .. last .. "n"
end
return w
end
-- =========================
-- INSTRUMENTAL EXTENDED
-- =========================
local function makeInstrumentalExtended(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tiin"
end
if isVowel(last) then
return w .. last .. "tiin"
end
return w .. "iin"
end
-- =========================
-- DATIVE
-- =========================
local function makeDative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "f"
end
if isVowel(last) then
return w .. last .. "f"
end
return w .. "iif"
end
-- =========================
-- DATIVE EXTENDED
-- =========================
local function makeDativeExtended(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tiif"
end
if isVowel(last) then
return w .. last .. "tiif"
end
return w .. "itiif"
end
-- =========================
-- ALLATIVE
-- =========================
local function makeAllative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
if isVowel(last) then
return w .. "tti"
end
return w .. "itti"
end
-- =========================
-- GENITIVE-ALLATIVE
-- =========================
local function makeGenitiveAllative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tti"
end
if isVowel(last) then
return w .. last .. "tti"
end
return w .. "iitti"
end
-- =========================
-- VOCATIVE
-- =========================
local function makeVocative(word)
return "yaa " .. makeGenitive(word)
end
-- =========================
-- MAIN TEMPLATE
-- =========================
function p.cib1(frame)
local word = frame:getParent().args[1] or frame.args[1] or ""
local abs = makeAbsolutive(word)
local nom = makeNominative(word)
local foc = makeNominativeFocus(word)
local acc = makeAccusative(word)
local gen = makeGenitive(word)
local ins = makeInstrumental(word)
local insE = makeInstrumentalExtended(word)
local dat = makeDative(word)
local datE = makeDativeExtended(word)
local all = makeAllative(word)
local gall = makeGenitiveAllative(word)
local voc = makeVocative(word)
local result = "{| class='wikitable'\n"
result = result .. "! Case !! Form\n|-\n"
result = result .. "| Absolutive || " .. abs .. "\n|-\n"
result = result .. "| Nominative || " .. nom .. "\n|-\n"
result = result .. "| Focus || " .. foc .. "\n|-\n"
result = result .. "| Accusative || " .. acc .. "\n|-\n"
result = result .. "| Genitive || " .. gen .. "\n|-\n"
result = result .. "| Instrumental || " .. ins .. "\n|-\n"
result = result .. "| Instrumental (ext) || " .. insE .. "\n|-\n"
result = result .. "| Dative || " .. dat .. "\n|-\n"
result = result .. "| Dative (ext) || " .. datE .. "\n|-\n"
result = result .. "| Allative || " .. all .. "\n|-\n"
result = result .. "| Genitive-Allative || " .. gall .. "\n|-\n"
result = result .. "| Vocative || " .. voc .. "\n"
result = result .. "|}\n"
return result
end
return p
d69u0q6z3unvli4by2q0eqy63dhhjmb
40812
40811
2026-06-09T20:34:17Z
EyobAbebe7
3540
40812
Scribunto
text/plain
local p = {}
-- =========================
-- UTILITIES
-- =========================
local function lower(w)
return mw.ustring.lower(w or "")
end
local function isVowel(c)
return c and mw.ustring.find("aeiou", c, 1, true)
end
-- double vowels set
local doubleVowels = {
aa=true, ee=true, ii=true, oo=true, uu=true
}
-- =========================
-- ABSOLUTIVE
-- =========================
local function makeAbsolutive(word)
return lower(word)
end
-- =========================
-- ACCUSATIVE
-- =========================
local function makeAccusative(word)
return lower(word)
end
-- =========================
-- GENITIVE
-- =========================
local function makeGenitive(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w
end
if isVowel(last) then
return w .. last
end
return w
end
-- =========================
-- NOMINATIVE
-- =========================
local function makeNominative(word)
local w = lower(word)
-- yyo rule
if mw.ustring.find(w, "yyo$") then
return w
end
-- -da → -nni (if vowel before)
if mw.ustring.find(w, "da$") then
local base = mw.ustring.sub(w, 1, -3)
local last = mw.ustring.sub(base, -1)
if isVowel(last) then
return base .. "nni"
end
end
-- ra → rri
if mw.ustring.find(w, "ra$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "rri"
end
-- la → lli
if mw.ustring.find(w, "la$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "lli"
end
-- fa → fti
if mw.ustring.find(w, "fa$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "fti"
end
-- VCV → -ni
if mw.ustring.len(w) >= 3 then
local v1 = mw.ustring.sub(w, -3, -3)
local c = mw.ustring.sub(w, -2, -2)
local v2 = mw.ustring.sub(w, -1, -1)
if isVowel(v1) and not isVowel(c) and isVowel(v2) then
return mw.ustring.sub(w, 1, -2) .. "ni"
end
end
-- CCV → -i
if mw.ustring.len(w) >= 3 then
local c1 = mw.ustring.sub(w, -3, -3)
local c2 = mw.ustring.sub(w, -2, -2)
local v = mw.ustring.sub(w, -1, -1)
if not isVowel(c1) and not isVowel(c2) and isVowel(v) then
return mw.ustring.sub(w, 1, -2) .. "i"
end
end
-- VV ending → +n
if mw.ustring.find(w, "(aa|ee|ii|oo|uu)$") then
return w .. "n"
end
return w
end
-- =========================
-- FOCUS
-- =========================
local function makeNominativeFocus(word)
return lower(word) .. "tu"
end
-- =========================
-- INSTRUMENTAL
-- =========================
local function makeInstrumental(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "dhaan"
end
if isVowel(last) then
return w .. last .. "n"
end
return w
end
-- =========================
-- INSTRUMENTAL EXTENDED
-- =========================
local function makeInstrumentalExtended(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tiin"
end
if isVowel(last) then
return w .. last .. "tiin"
end
return w .. "iin"
end
-- =========================
-- DATIVE
-- =========================
local function makeDative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "f"
end
if isVowel(last) then
return w .. last .. "f"
end
return w .. "iif"
end
-- =========================
-- DATIVE EXTENDED
-- =========================
local function makeDativeExtended(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tiif"
end
if isVowel(last) then
return w .. last .. "tiif"
end
return w .. "itiif"
end
-- =========================
-- ALLATIVE
-- =========================
local function makeAllative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
if isVowel(last) then
return w .. "tti"
end
return w .. "itti"
end
-- =========================
-- GENITIVE-ALLATIVE
-- =========================
local function makeGenitiveAllative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tti"
end
if isVowel(last) then
return w .. last .. "tti"
end
return w .. "iitti"
end
-- =========================
-- VOCATIVE
-- =========================
local function makeVocative(word)
return "yaa " .. makeGenitive(word)
end
-- =========================
-- MAIN TEMPLATE
-- =========================
function p.cib1(frame)
local word = frame:getParent().args[1] or frame.args[1] or ""
local abs = makeAbsolutive(word)
local nom = makeNominative(word)
local foc = makeNominativeFocus(word)
local acc = makeAccusative(word)
local gen = makeGenitive(word)
local ins = makeInstrumental(word)
local insE = makeInstrumentalExtended(word)
local dat = makeDative(word)
local datE = makeDativeExtended(word)
local all = makeAllative(word)
local gall = makeGenitiveAllative(word)
local voc = makeVocative(word)
local result = "{| class='wikitable'\n"
result = result .. "! Case !! Form\n|-\n"
result = result .. "| Absolutive || " .. abs .. "\n|-\n"
result = result .. "| Nominative || " .. nom .. "\n|-\n"
result = result .. "| Nominative+Focus || " .. foc .. "\n|-\n"
result = result .. "| Accusative || " .. acc .. "\n|-\n"
result = result .. "| Genitive || " .. gen .. "\n|-\n"
result = result .. "| Instrumental || " .. ins .. "\n|-\n"
result = result .. "| Instrumental (ext) || " .. insE .. "\n|-\n"
result = result .. "| Dative || " .. dat .. "\n|-\n"
result = result .. "| Dative (ext) || " .. datE .. "\n|-\n"
result = result .. "| Allative || " .. all .. "\n|-\n"
result = result .. "| Genitive-Allative || " .. gall .. "\n|-\n"
result = result .. "| Vocative || " .. voc .. "\n"
result = result .. "|}\n"
return result
end
return p
pp6m7op0ilyxrurqceq2k1lkyv9z36c
40813
40812
2026-06-09T20:49:38Z
EyobAbebe7
3540
40813
Scribunto
text/plain
local p = {}
-- =========================
-- UTILITIES
-- =========================
local function lower(w)
return mw.ustring.lower(w or "")
end
local function isVowel(c)
return c and mw.ustring.find("aeiou", c, 1, true)
end
-- double vowels set
local doubleVowels = {
aa=true, ee=true, ii=true, oo=true, uu=true
}
-- =========================
-- ABSOLUTIVE
-- =========================
local function makeAbsolutive(word)
return lower(word)
end
-- =========================
-- ACCUSATIVE
-- =========================
local function makeAccusative(word)
return lower(word)
end
-- =========================
-- GENITIVE
-- =========================
local function makeGenitive(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w
end
if isVowel(last) then
return w .. last
end
return w
end
-- =========================
-- GENITIVE + Focus
-- =========================
local function makeGenitiveFocus(word)
local gen = makeGenitive(word)
return gen .. "tu"
end
-- =========================
-- NOMINATIVE
-- =========================
local function makeNominative(word)
local w = lower(word)
-- yyo rule
if mw.ustring.find(w, "yyo$") then
return w
end
-- -da → -nni (if vowel before)
if mw.ustring.find(w, "da$") then
local base = mw.ustring.sub(w, 1, -3)
local last = mw.ustring.sub(base, -1)
if isVowel(last) then
return base .. "nni"
end
end
-- ra → rri
if mw.ustring.find(w, "ra$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "rri"
end
-- la → lli
if mw.ustring.find(w, "la$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "lli"
end
-- fa → fti
if mw.ustring.find(w, "fa$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "fti"
end
-- VCV → -ni
if mw.ustring.len(w) >= 3 then
local v1 = mw.ustring.sub(w, -3, -3)
local c = mw.ustring.sub(w, -2, -2)
local v2 = mw.ustring.sub(w, -1, -1)
if isVowel(v1) and not isVowel(c) and isVowel(v2) then
return mw.ustring.sub(w, 1, -2) .. "ni"
end
end
-- CCV → -i
if mw.ustring.len(w) >= 3 then
local c1 = mw.ustring.sub(w, -3, -3)
local c2 = mw.ustring.sub(w, -2, -2)
local v = mw.ustring.sub(w, -1, -1)
if not isVowel(c1) and not isVowel(c2) and isVowel(v) then
return mw.ustring.sub(w, 1, -2) .. "i"
end
end
-- VV ending → +n
if mw.ustring.find(w, "(aa|ee|ii|oo|uu)$") then
return w .. "n"
end
return w
end
-- =========================
-- FOCUS
-- =========================
local function makeNominativeFocus(word)
return lower(word) .. "tu"
end
-- =========================
-- INSTRUMENTAL
-- =========================
local function makeInstrumental(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "dhaan"
end
if isVowel(last) then
return w .. last .. "n"
end
return w
end
-- =========================
-- INSTRUMENTAL EXTENDED
-- =========================
local function makeInstrumentalExtended(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tiin"
end
if isVowel(last) then
return w .. last .. "tiin"
end
return w .. "iin"
end
-- =========================
-- DATIVE
-- =========================
local function makeDative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "f"
end
if isVowel(last) then
return w .. last .. "f"
end
return w .. "iif"
end
-- =========================
-- DATIVE EXTENDED
-- =========================
local function makeDativeExtended(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tiif"
end
if isVowel(last) then
return w .. last .. "tiif"
end
return w .. "itiif"
end
-- =========================
-- ALLATIVE
-- =========================
local function makeAllative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
if isVowel(last) then
return w .. "tti"
end
return w .. "itti"
end
-- =========================
-- GENITIVE-ALLATIVE
-- =========================
local function makeGenitiveAllative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tti"
end
if isVowel(last) then
return w .. last .. "tti"
end
return w .. "iitti"
end
-- =========================
-- VOCATIVE
-- =========================
local function makeVocative(word)
return "yaa " .. makeGenitive(word)
end
-- =========================
-- MAIN TEMPLATE
-- =========================
function p.cib1(frame)
local word = frame:getParent().args[1] or frame.args[1] or ""
local abs = makeAbsolutive(word)
local nom = makeNominative(word)
local foc = makeNominativeFocus(word)
local acc = makeAccusative(word)
local gen = makeGenitive(word)
local genFocus = makeGenitiveFocus(word)
local ins = makeInstrumental(word)
local insE = makeInstrumentalExtended(word)
local dat = makeDative(word)
local datE = makeDativeExtended(word)
local all = makeAllative(word)
local gall = makeGenitiveAllative(word)
local voc = makeVocative(word)
local result = "{| class='wikitable'\n"
result = result .. "! Case !! Form\n|-\n"
result = result .. "| Absolutive || " .. abs .. "\n|-\n"
result = result .. "| Nominative || " .. nom .. "\n|-\n"
result = result .. "| Nominative+Focus || " .. foc .. "\n|-\n"
result = result .. "| Accusative || " .. acc .. "\n|-\n"
result = result .. "| Genitive || " .. gen .. "\n|-\n"
result = result .. "| Genitive + Focus || " .. genFocus .. "\n|-\n"
result = result .. "| Instrumental || " .. ins .. "\n|-\n"
result = result .. "| Instrumental (ext) || " .. insE .. "\n|-\n"
result = result .. "| Dative || " .. dat .. "\n|-\n"
result = result .. "| Dative (ext) || " .. datE .. "\n|-\n"
result = result .. "| Allative || " .. all .. "\n|-\n"
result = result .. "| Genitive-Allative || " .. gall .. "\n|-\n"
result = result .. "| Vocative || " .. voc .. "\n"
result = result .. "|}\n"
return result
end
return p
hzizgex2dfcuiy6q82qpntcgnzz9n1d
40814
40813
2026-06-09T20:51:58Z
EyobAbebe7
3540
40814
Scribunto
text/plain
local p = {}
-- =========================
-- UTILITIES
-- =========================
local function lower(w)
return mw.ustring.lower(w or "")
end
local function isVowel(c)
return c and mw.ustring.find("aeiou", c, 1, true)
end
-- double vowels set
local doubleVowels = {
aa=true, ee=true, ii=true, oo=true, uu=true
}
-- =========================
-- ABSOLUTIVE
-- =========================
local function makeAbsolutive(word)
return lower(word)
end
-- =========================
-- ACCUSATIVE
-- =========================
local function makeAccusative(word)
return lower(word)
end
-- =========================
-- GENITIVE
-- =========================
local function makeGenitive(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w
end
if isVowel(last) then
return w .. last
end
return w
end
-- =========================
-- GENITIVE + Focus
-- =========================
local function makeGenitiveFocus(word)
local gen = makeGenitive(word)
return gen .. "tu"
end
-- =========================
-- NOMINATIVE
-- =========================
local function makeNominative(word)
local w = lower(word)
-- yyo rule
if mw.ustring.find(w, "yyo$") then
return w
end
-- -da → -nni (if vowel before)
if mw.ustring.find(w, "da$") then
local base = mw.ustring.sub(w, 1, -3)
local last = mw.ustring.sub(base, -1)
if isVowel(last) then
return base .. "nni"
end
end
-- ra → rri
if mw.ustring.find(w, "ra$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "rri"
end
-- la → lli
if mw.ustring.find(w, "la$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "lli"
end
-- fa → fti
if mw.ustring.find(w, "fa$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "fti"
end
-- VCV → -ni
if mw.ustring.len(w) >= 3 then
local v1 = mw.ustring.sub(w, -3, -3)
local c = mw.ustring.sub(w, -2, -2)
local v2 = mw.ustring.sub(w, -1, -1)
if isVowel(v1) and not isVowel(c) and isVowel(v2) then
return mw.ustring.sub(w, 1, -2) .. "ni"
end
end
-- CCV → -i
if mw.ustring.len(w) >= 3 then
local c1 = mw.ustring.sub(w, -3, -3)
local c2 = mw.ustring.sub(w, -2, -2)
local v = mw.ustring.sub(w, -1, -1)
if not isVowel(c1) and not isVowel(c2) and isVowel(v) then
return mw.ustring.sub(w, 1, -2) .. "i"
end
end
-- VV ending → +n
if mw.ustring.find(w, "(aa|ee|ii|oo|uu)$") then
return w .. "n"
end
return w
end
-- =========================
-- FOCUS
-- =========================
local function makeNominativeFocus(word)
return lower(word) .. "tu"
end
-- =========================
-- INSTRUMENTAL
-- =========================
local function makeInstrumental(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "dhaan"
end
if isVowel(last) then
return w .. last .. "n"
end
return w
end
-- =========================
-- INSTRUMENTAL EXTENDED
-- =========================
local function makeInstrumentalExtended(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tiin"
end
if isVowel(last) then
return w .. last .. "tiin"
end
return w .. "iin"
end
-- =========================
-- DATIVE
-- =========================
local function makeDative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "f"
end
if isVowel(last) then
return w .. last .. "f"
end
return w .. "iif"
end
-- =========================
-- DATIVE EXTENDED
-- =========================
local function makeDativeExtended(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tiif"
end
if isVowel(last) then
return w .. last .. "tiif"
end
return w .. "itiif"
end
-- =========================
-- ALLATIVE
-- =========================
local function makeAllative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
if isVowel(last) then
return w .. "tti"
end
return w .. "itti"
end
-- =========================
-- GENITIVE-ALLATIVE
-- =========================
local function makeGenitiveAllative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tti"
end
if isVowel(last) then
return w .. last .. "tti"
end
return w .. "iitti"
end
-- =========================
-- VOCATIVE
-- =========================
local function makeVocative(word)
return "yaa " .. makeGenitive(word)
end
-- =========================
-- MAIN TEMPLATE
-- =========================
function p.cib1(frame)
local word = frame:getParent().args[1] or frame.args[1] or ""
local abs = makeAbsolutive(word)
local nom = makeNominative(word)
local foc = makeNominativeFocus(word)
local acc = makeAccusative(word)
local gen = makeGenitive(word)
local genFocus = makeGenitiveFocus(word)
local ins = makeInstrumental(word)
local insE = makeInstrumentalExtended(word)
local dat = makeDative(word)
local datE = makeDativeExtended(word)
local all = makeAllative(word)
local gall = makeGenitiveAllative(word)
local voc = makeVocative(word)
local result = "{| class='wikitable'\n"
result = result .. "! Case !! Form\n|-\n"
result = result .. "| Absolutive || " .. abs .. "\n|-\n"
result = result .. "| Nominative || " .. nom .. "\n|-\n"
result = result .. "| Nominative + Focus || " .. foc .. "\n|-\n"
result = result .. "| Accusative || " .. acc .. "\n|-\n"
result = result .. "| Genitive || " .. gen .. "\n|-\n"
result = result .. "| Genitive + Focus || " .. genFocus .. "\n|-\n"
result = result .. "| Instrumental || " .. ins .. "\n|-\n"
result = result .. "| Instrumental (ext) || " .. insE .. "\n|-\n"
result = result .. "| Dative || " .. dat .. "\n|-\n"
result = result .. "| Dative (ext) || " .. datE .. "\n|-\n"
result = result .. "| Allative || " .. all .. "\n|-\n"
result = result .. "| Genitive-Allative || " .. gall .. "\n|-\n"
result = result .. "| Vocative || " .. voc .. "\n"
result = result .. "|}\n"
return result
end
return p
fumzvn6f6q3zlgt9wen1dumvg90xtko
40815
40814
2026-06-09T21:02:35Z
EyobAbebe7
3540
40815
Scribunto
text/plain
local p = {}
-- =========================
-- UTILITIES
-- =========================
local function lower(w)
return mw.ustring.lower(w or "")
end
local function isVowel(c)
return c and mw.ustring.find("aeiou", c, 1, true)
end
-- double vowels set
local doubleVowels = {
aa=true, ee=true, ii=true, oo=true, uu=true
}
-- =========================
-- ABSOLUTIVE
-- =========================
local function makeAbsolutive(word)
return lower(word)
end
-- =========================
-- ACCUSATIVE
-- =========================
local function makeAccusative(word)
return lower(word)
end
-- =========================
-- GENITIVE
-- =========================
local function makeGenitive(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w
end
if isVowel(last) then
return w .. last
end
return w
end
-- =========================
-- GENITIVE + Focus
-- =========================
local function makeGenitiveFocus(word)
local gen = makeGenitive(word)
return gen .. "tu"
end
-- =========================
-- NOMINATIVE
-- =========================
local function makeNominative(word)
local w = lower(word)
-- yyo rule
if mw.ustring.find(w, "yyo$") then
return w
end
-- -da → -nni (if vowel before)
if mw.ustring.find(w, "da$") then
local base = mw.ustring.sub(w, 1, -3)
local last = mw.ustring.sub(base, -1)
if isVowel(last) then
return base .. "nni"
end
end
-- ra → rri
if mw.ustring.find(w, "ra$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "rri"
end
-- la → lli
if mw.ustring.find(w, "la$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "lli"
end
-- fa → fti
if mw.ustring.find(w, "fa$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "fti"
end
-- VCV → -ni
if mw.ustring.len(w) >= 3 then
local v1 = mw.ustring.sub(w, -3, -3)
local c = mw.ustring.sub(w, -2, -2)
local v2 = mw.ustring.sub(w, -1, -1)
if isVowel(v1) and not isVowel(c) and isVowel(v2) then
return mw.ustring.sub(w, 1, -2) .. "ni"
end
end
-- CCV → -i
if mw.ustring.len(w) >= 3 then
local c1 = mw.ustring.sub(w, -3, -3)
local c2 = mw.ustring.sub(w, -2, -2)
local v = mw.ustring.sub(w, -1, -1)
if not isVowel(c1) and not isVowel(c2) and isVowel(v) then
return mw.ustring.sub(w, 1, -2) .. "i"
end
end
-- VV ending → +n
if mw.ustring.find(w, "(aa|ee|ii|oo|uu)$") then
return w .. "n"
end
return w
end
-- =========================
-- FOCUS
-- =========================
local function makeNominativeFocus(word)
return lower(word) .. "tu"
end
-- =========================
-- INSTRUMENTAL
-- =========================
local function makeInstrumental(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "dhaan"
end
if isVowel(last) then
return w .. last .. "n"
end
return w
end
-- =========================
-- INSTRUMENTAL EXTENDED
-- =========================
local function makeInstrumentalExtended(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tiin"
end
if isVowel(last) then
return w .. last .. "tiin"
end
return w .. "iin"
end
-- =========================
-- DATIVE
-- =========================
local function makeDative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "f"
end
if isVowel(last) then
return w .. last .. "f"
end
return w .. "iif"
end
-- =========================
-- DATIVE EXTENDED
-- =========================
local function makeDativeExtended(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tiif"
end
if isVowel(last) then
return w .. last .. "tiif"
end
return w .. "itiif"
end
-- =========================
-- ALLATIVE
-- =========================
local function makeAllative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
if isVowel(last) then
return w .. "tti"
end
return w .. "itti"
end
-- =========================
-- GENITIVE-ALLATIVE
-- =========================
local function makeGenitiveAllative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tti"
end
if isVowel(last) then
return w .. last .. "tti"
end
return w .. "iitti"
end
-- =========================
-- VOCATIVE
-- =========================
local function makeVocative(word)
return "yaa " .. makeGenitive(word)
end
-- =========================
-- MAIN TEMPLATE
-- =========================
function p.cib1(frame)
local word = frame:getParent().args[1] or frame.args[1] or ""
local abs = makeAbsolutive(word)
local nom = makeNominative(word)
local foc = makeNominativeFocus(word)
local acc = makeAccusative(word)
local gen = makeGenitive(word)
local genFocus = makeGenitiveFocus(word)
local ins = makeInstrumental(word)
local insE = makeInstrumentalExtended(word)
local dat = makeDative(word)
local datE = makeDativeExtended(word)
local all = makeAllative(word)
local gall = makeGenitiveAllative(word)
local voc = makeVocative(word)
local result = '{| class="wikitable collapsible collapsed" style="width:100%;"\n'
result = result .. "! Case !! Form\n|-\n"
result = result .. "| Absolutive || " .. abs .. "\n|-\n"
result = result .. "| Nominative || " .. nom .. "\n|-\n"
result = result .. "| Nominative + Focus || " .. foc .. "\n|-\n"
result = result .. "| Accusative || " .. acc .. "\n|-\n"
result = result .. "| Genitive || " .. gen .. "\n|-\n"
result = result .. "| Genitive + Focus || " .. genFocus .. "\n|-\n"
result = result .. "| Instrumental || " .. ins .. "\n|-\n"
result = result .. "| Instrumental (ext) || " .. insE .. "\n|-\n"
result = result .. "| Dative || " .. dat .. "\n|-\n"
result = result .. "| Dative (ext) || " .. datE .. "\n|-\n"
result = result .. "| Allative || " .. all .. "\n|-\n"
result = result .. "| Genitive-Allative || " .. gall .. "\n|-\n"
result = result .. "| Vocative || " .. voc .. "\n"
result = result .. "|}\n"
return result
end
return p
1l8meh5ov6te1gehqllpryc736rut4v
40816
40815
2026-06-09T21:06:03Z
EyobAbebe7
3540
40816
Scribunto
text/plain
local p = {}
-- =========================
-- UTILITIES
-- =========================
local function lower(w)
return mw.ustring.lower(w or "")
end
local function isVowel(c)
return c and mw.ustring.find("aeiou", c, 1, true)
end
-- double vowels set
local doubleVowels = {
aa=true, ee=true, ii=true, oo=true, uu=true
}
-- =========================
-- ABSOLUTIVE
-- =========================
local function makeAbsolutive(word)
return lower(word)
end
-- =========================
-- ACCUSATIVE
-- =========================
local function makeAccusative(word)
return lower(word)
end
-- =========================
-- GENITIVE
-- =========================
local function makeGenitive(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w
end
if isVowel(last) then
return w .. last
end
return w
end
-- =========================
-- GENITIVE + Focus
-- =========================
local function makeGenitiveFocus(word)
local gen = makeGenitive(word)
return gen .. "tu"
end
-- =========================
-- NOMINATIVE
-- =========================
local function makeNominative(word)
local w = lower(word)
-- yyo rule
if mw.ustring.find(w, "yyo$") then
return w
end
-- -da → -nni (if vowel before)
if mw.ustring.find(w, "da$") then
local base = mw.ustring.sub(w, 1, -3)
local last = mw.ustring.sub(base, -1)
if isVowel(last) then
return base .. "nni"
end
end
-- ra → rri
if mw.ustring.find(w, "ra$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "rri"
end
-- la → lli
if mw.ustring.find(w, "la$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "lli"
end
-- fa → fti
if mw.ustring.find(w, "fa$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "fti"
end
-- VCV → -ni
if mw.ustring.len(w) >= 3 then
local v1 = mw.ustring.sub(w, -3, -3)
local c = mw.ustring.sub(w, -2, -2)
local v2 = mw.ustring.sub(w, -1, -1)
if isVowel(v1) and not isVowel(c) and isVowel(v2) then
return mw.ustring.sub(w, 1, -2) .. "ni"
end
end
-- CCV → -i
if mw.ustring.len(w) >= 3 then
local c1 = mw.ustring.sub(w, -3, -3)
local c2 = mw.ustring.sub(w, -2, -2)
local v = mw.ustring.sub(w, -1, -1)
if not isVowel(c1) and not isVowel(c2) and isVowel(v) then
return mw.ustring.sub(w, 1, -2) .. "i"
end
end
-- VV ending → +n
if mw.ustring.find(w, "(aa|ee|ii|oo|uu)$") then
return w .. "n"
end
return w
end
-- =========================
-- FOCUS
-- =========================
local function makeNominativeFocus(word)
return lower(word) .. "tu"
end
-- =========================
-- INSTRUMENTAL
-- =========================
local function makeInstrumental(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "dhaan"
end
if isVowel(last) then
return w .. last .. "n"
end
return w
end
-- =========================
-- INSTRUMENTAL EXTENDED
-- =========================
local function makeInstrumentalExtended(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tiin"
end
if isVowel(last) then
return w .. last .. "tiin"
end
return w .. "iin"
end
-- =========================
-- DATIVE
-- =========================
local function makeDative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "f"
end
if isVowel(last) then
return w .. last .. "f"
end
return w .. "iif"
end
-- =========================
-- DATIVE EXTENDED
-- =========================
local function makeDativeExtended(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tiif"
end
if isVowel(last) then
return w .. last .. "tiif"
end
return w .. "itiif"
end
-- =========================
-- ALLATIVE
-- =========================
local function makeAllative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
if isVowel(last) then
return w .. "tti"
end
return w .. "itti"
end
-- =========================
-- GENITIVE-ALLATIVE
-- =========================
local function makeGenitiveAllative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tti"
end
if isVowel(last) then
return w .. last .. "tti"
end
return w .. "iitti"
end
-- =========================
-- VOCATIVE
-- =========================
local function makeVocative(word)
return "yaa " .. makeGenitive(word)
end
-- =========================
-- MAIN TEMPLATE
-- =========================
function p.cib1(frame)
local word = frame:getParent().args[1] or frame.args[1] or ""
local abs = makeAbsolutive(word)
local nom = makeNominative(word)
local foc = makeNominativeFocus(word)
local acc = makeAccusative(word)
local gen = makeGenitive(word)
local genFocus = makeGenitiveFocus(word)
local ins = makeInstrumental(word)
local insE = makeInstrumentalExtended(word)
local dat = makeDative(word)
local datE = makeDativeExtended(word)
local all = makeAllative(word)
local gall = makeGenitiveAllative(word)
local voc = makeVocative(word)
local result = '{| class="wikitable collapsible collapsed"\n'
result = result .. '! Case !! Form\n'
result = result .. "! Case !! Form\n|-\n"
result = result .. "| Absolutive || " .. abs .. "\n|-\n"
result = result .. "| Nominative || " .. nom .. "\n|-\n"
result = result .. "| Nominative + Focus || " .. foc .. "\n|-\n"
result = result .. "| Accusative || " .. acc .. "\n|-\n"
result = result .. "| Genitive || " .. gen .. "\n|-\n"
result = result .. "| Genitive + Focus || " .. genFocus .. "\n|-\n"
result = result .. "| Instrumental || " .. ins .. "\n|-\n"
result = result .. "| Instrumental (ext) || " .. insE .. "\n|-\n"
result = result .. "| Dative || " .. dat .. "\n|-\n"
result = result .. "| Dative (ext) || " .. datE .. "\n|-\n"
result = result .. "| Allative || " .. all .. "\n|-\n"
result = result .. "| Genitive-Allative || " .. gall .. "\n|-\n"
result = result .. "| Vocative || " .. voc .. "\n"
result = result .. "|}\n"
return result
end
return p
qftm1u2og6cbty0i24wrkeo3qlyvq20
40817
40816
2026-06-09T21:08:08Z
EyobAbebe7
3540
40817
Scribunto
text/plain
local p = {}
-- =========================
-- UTILITIES
-- =========================
local function lower(w)
return mw.ustring.lower(w or "")
end
local function isVowel(c)
return c and mw.ustring.find("aeiou", c, 1, true)
end
-- double vowels set
local doubleVowels = {
aa=true, ee=true, ii=true, oo=true, uu=true
}
-- =========================
-- ABSOLUTIVE
-- =========================
local function makeAbsolutive(word)
return lower(word)
end
-- =========================
-- ACCUSATIVE
-- =========================
local function makeAccusative(word)
return lower(word)
end
-- =========================
-- GENITIVE
-- =========================
local function makeGenitive(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w
end
if isVowel(last) then
return w .. last
end
return w
end
-- =========================
-- GENITIVE + Focus
-- =========================
local function makeGenitiveFocus(word)
local gen = makeGenitive(word)
return gen .. "tu"
end
-- =========================
-- NOMINATIVE
-- =========================
local function makeNominative(word)
local w = lower(word)
-- yyo rule
if mw.ustring.find(w, "yyo$") then
return w
end
-- -da → -nni (if vowel before)
if mw.ustring.find(w, "da$") then
local base = mw.ustring.sub(w, 1, -3)
local last = mw.ustring.sub(base, -1)
if isVowel(last) then
return base .. "nni"
end
end
-- ra → rri
if mw.ustring.find(w, "ra$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "rri"
end
-- la → lli
if mw.ustring.find(w, "la$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "lli"
end
-- fa → fti
if mw.ustring.find(w, "fa$") then
local b = mw.ustring.sub(w, 1, -3)
return b .. "fti"
end
-- VCV → -ni
if mw.ustring.len(w) >= 3 then
local v1 = mw.ustring.sub(w, -3, -3)
local c = mw.ustring.sub(w, -2, -2)
local v2 = mw.ustring.sub(w, -1, -1)
if isVowel(v1) and not isVowel(c) and isVowel(v2) then
return mw.ustring.sub(w, 1, -2) .. "ni"
end
end
-- CCV → -i
if mw.ustring.len(w) >= 3 then
local c1 = mw.ustring.sub(w, -3, -3)
local c2 = mw.ustring.sub(w, -2, -2)
local v = mw.ustring.sub(w, -1, -1)
if not isVowel(c1) and not isVowel(c2) and isVowel(v) then
return mw.ustring.sub(w, 1, -2) .. "i"
end
end
-- VV ending → +n
if mw.ustring.find(w, "(aa|ee|ii|oo|uu)$") then
return w .. "n"
end
return w
end
-- =========================
-- FOCUS
-- =========================
local function makeNominativeFocus(word)
return lower(word) .. "tu"
end
-- =========================
-- INSTRUMENTAL
-- =========================
local function makeInstrumental(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "dhaan"
end
if isVowel(last) then
return w .. last .. "n"
end
return w
end
-- =========================
-- INSTRUMENTAL EXTENDED
-- =========================
local function makeInstrumentalExtended(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tiin"
end
if isVowel(last) then
return w .. last .. "tiin"
end
return w .. "iin"
end
-- =========================
-- DATIVE
-- =========================
local function makeDative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "f"
end
if isVowel(last) then
return w .. last .. "f"
end
return w .. "iif"
end
-- =========================
-- DATIVE EXTENDED
-- =========================
local function makeDativeExtended(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tiif"
end
if isVowel(last) then
return w .. last .. "tiif"
end
return w .. "itiif"
end
-- =========================
-- ALLATIVE
-- =========================
local function makeAllative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
if isVowel(last) then
return w .. "tti"
end
return w .. "itti"
end
-- =========================
-- GENITIVE-ALLATIVE
-- =========================
local function makeGenitiveAllative(word)
local w = lower(word)
local last = mw.ustring.sub(w, -1)
local last2 = mw.ustring.sub(w, -2)
if doubleVowels[last2] then
return w .. "tti"
end
if isVowel(last) then
return w .. last .. "tti"
end
return w .. "iitti"
end
-- =========================
-- VOCATIVE
-- =========================
local function makeVocative(word)
return "yaa " .. makeGenitive(word)
end
-- =========================
-- MAIN TEMPLATE
-- =========================
function p.cib1(frame)
local word = frame:getParent().args[1] or frame.args[1] or ""
local abs = makeAbsolutive(word)
local nom = makeNominative(word)
local foc = makeNominativeFocus(word)
local acc = makeAccusative(word)
local gen = makeGenitive(word)
local genFocus = makeGenitiveFocus(word)
local ins = makeInstrumental(word)
local insE = makeInstrumentalExtended(word)
local dat = makeDative(word)
local datE = makeDativeExtended(word)
local all = makeAllative(word)
local gall = makeGenitiveAllative(word)
local voc = makeVocative(word)
result = '{| class="wikitable collapsible collapsed"\n'
result = result .. "! Case !! Form\n|-\n"
result = result .. "| Absolutive || " .. abs .. "\n|-\n"
result = result .. "| Nominative || " .. nom .. "\n|-\n"
result = result .. "| Nominative + Focus || " .. foc .. "\n|-\n"
result = result .. "| Accusative || " .. acc .. "\n|-\n"
result = result .. "| Genitive || " .. gen .. "\n|-\n"
result = result .. "| Genitive + Focus || " .. genFocus .. "\n|-\n"
result = result .. "| Instrumental || " .. ins .. "\n|-\n"
result = result .. "| Instrumental (ext) || " .. insE .. "\n|-\n"
result = result .. "| Dative || " .. dat .. "\n|-\n"
result = result .. "| Dative (ext) || " .. datE .. "\n|-\n"
result = result .. "| Allative || " .. all .. "\n|-\n"
result = result .. "| Genitive-Allative || " .. gall .. "\n|-\n"
result = result .. "| Vocative || " .. voc .. "\n"
result = result .. "|}\n"
return result
end
return p
nm32nbi1x44l04h2k9d6k958ykn14mm
Module:syllables
828
26651
40818
2026-06-09T21:50:25Z
EyobAbebe7
3540
Created page with "local p = {} -- ========================= -- DC MAP (digraph normalization) -- ========================= local dcMap = { ch = "Ç", dh = "Ð", ny = "Ñ", ph = "Þ", ts = "Ŧ", sh = "Š", zy = "Ž" } local APOST = "Ƶ" local revMap = {} for k,v in pairs(dcMap) do revMap[v] = k end -- ========================= -- NORMALIZE -- ========================= local function normalize(s) s = mw.ustring.lower(s) for k,v in pairs(dcMap) do s = mw.ustring.gsub(s, k,..."
40818
Scribunto
text/plain
local p = {}
-- =========================
-- DC MAP (digraph normalization)
-- =========================
local dcMap = {
ch = "Ç", dh = "Ð", ny = "Ñ",
ph = "Þ", ts = "Ŧ", sh = "Š", zy = "Ž"
}
local APOST = "Ƶ"
local revMap = {}
for k,v in pairs(dcMap) do
revMap[v] = k
end
-- =========================
-- NORMALIZE
-- =========================
local function normalize(s)
s = mw.ustring.lower(s)
for k,v in pairs(dcMap) do
s = mw.ustring.gsub(s, k, v)
end
s = mw.ustring.gsub(s, "'", APOST)
return s
end
-- =========================
-- UNNORMALIZE
-- =========================
local function unNormalizePiece(p)
local s = p
for v,k in pairs(revMap) do
s = mw.ustring.gsub(s, v, k)
end
s = mw.ustring.gsub(s, APOST, "'")
return s
end
-- =========================
-- HELPERS
-- =========================
local vowels = {a=true,e=true,i=true,o=true,u=true}
local function isV(ch)
return ch and vowels[ch] == true
end
local function isC(ch)
if not ch or ch == "" then return false end
-- normalized consonants
if mw.ustring.match(ch, "[ÇÐÑÞŦŠŽ]") then
return true
end
if ch == "'" or ch == APOST then
return true
end
if ch == "y" then return true end
return mw.ustring.match(ch, "%a") and not vowels[ch]
end
-- =========================
-- EXTRACT END (your rule)
-- =========================
local function extractEnd(norm)
local L = mw.ustring.len(norm)
local function s(i)
return mw.ustring.sub(norm, i, i)
end
if L >= 5 then
local c1,c2,v1,v2,c3 = s(L-4),s(L-3),s(L-2),s(L-1),s(L)
if isC(c1) and isC(c2) and isV(v1) and isV(v2) and isC(c3) then
return mw.ustring.sub(norm, L-4)
end
end
if L >= 4 then
local a,b,c,d = s(L-3),s(L-2),s(L-1),s(L)
if (isC(a) and isC(b) and isV(c) and isC(d)) or
(isC(a) and isV(b) and isV(c) and isC(d)) or
(isC(a) and isC(b) and isV(c) and isV(d)) then
return mw.ustring.sub(norm, L-3)
end
end
if L >= 3 then
local a,b,c = s(L-2),s(L-1),s(L)
if (isC(a) and isV(b) and isC(c)) or
(isC(a) and isC(b) and isV(c)) or
(isC(a) and isV(b) and isV(c)) then
return mw.ustring.sub(norm, L-2)
end
end
if L >= 2 then
local a,b = s(L-1),s(L)
if isC(a) and isV(b) then
return mw.ustring.sub(norm, L-1)
end
end
return mw.ustring.sub(norm, L, L)
end
-- =========================
-- BACKWARD SEGMENTS
-- =========================
local function backwardSegments(norm)
local pieces = {}
while mw.ustring.len(norm) > 0 do
local endSeg = extractEnd(norm)
table.insert(pieces, endSeg)
norm = mw.ustring.sub(norm, 1, mw.ustring.len(norm) - mw.ustring.len(endSeg))
end
return pieces
end
-- =========================
-- MAIN
-- =========================
function p.split(frame)
local word = frame.args[1] or ""
word = normalize(word)
local parts = backwardSegments(word)
-- reverse
local rev = {}
for i = #parts,1,-1 do
table.insert(rev, unNormalizePiece(parts[i]))
end
return table.concat(rev, "-")
end
-- =========================
-- COUNT
-- =========================
function p.count(frame)
local word = p.split(frame)
local _,n = mw.ustring.gsub(word, "-", "-")
return tostring(n + 1)
end
return p
k10tcwfc2zhr44ah5bm4lb3mi7shgni
40820
40818
2026-06-09T22:06:00Z
EyobAbebe7
3540
40820
Scribunto
text/plain
local p = {}
-- =====================
-- YOUR MAP (UNCHANGED)
-- =====================
local dcMap = {
ch="Ç", dh="Ð", ny="Ñ",
ph="Þ", ts="Ŧ", sh="Š", zy="Ž"
}
local APOST = "Ƶ"
local revMap = {}
for k,v in pairs(dcMap) do
revMap[v] = k
end
-- =====================
-- NORMALIZE (UNCHANGED LOGIC)
-- =====================
local function normalize(s)
s = mw.ustring.lower(s)
for k,v in pairs(dcMap) do
s = mw.ustring.gsub(s, k, v)
end
s = mw.ustring.gsub(s, "'", APOST)
return s
end
local function unNormalize(s)
for v,k in pairs(revMap) do
s = mw.ustring.gsub(s, v, k)
end
return mw.ustring.gsub(s, APOST, "'")
end
-- =====================
-- HELPERS
-- =====================
local vowels = {a=true,e=true,i=true,o=true,u=true}
local function isV(c)
return c and vowels[c] == true
end
local function isC(c)
if not c or c == "" then return false end
if mw.ustring.match(c, "[ÇÐÑÞŦŠŽ]") then return true end
if c == "'" or c == APOST then return true end
if c == "y" then return true end
return mw.ustring.match(c, "%a") and not vowels[c]
end
-- =====================
-- 🔥 FIXED extractEnd (ONSET SAFE)
-- =====================
local function extractEnd(norm)
local L = mw.ustring.len(norm)
local function s(i)
return mw.ustring.sub(norm, i, i)
end
-- ALWAYS protect vowel + consonant split
if L >= 2 then
local a = s(L-1)
local b = s(L)
-- CV boundary → never split inside
if isC(a) and isV(b) then
return mw.ustring.sub(norm, L-1)
end
-- VC boundary → safe syllable end
if isV(a) and isC(b) then
return mw.ustring.sub(norm, L-1)
end
end
-- 3-char rule (onset preservation)
if L >= 3 then
local a,b,c = s(L-2),s(L-1),s(L)
if isC(a) and isV(b) and isC(c) then
return mw.ustring.sub(norm, L-2)
end
if isC(a) and isC(b) and isV(c) then
return mw.ustring.sub(norm, L-2)
end
end
return mw.ustring.sub(norm, L, L)
end
-- =====================
-- BACKWARD ENGINE (YOUR STYLE KEPT)
-- =====================
local function backwardSegments(norm)
local pieces = {}
while mw.ustring.len(norm) > 0 do
local endSeg = extractEnd(norm)
table.insert(pieces, endSeg)
norm = mw.ustring.sub(norm, 1, mw.ustring.len(norm) - mw.ustring.len(endSeg))
end
return pieces
end
-- =====================
-- MAIN
-- =====================
function p.split(frame)
local word = frame.args[1] or ""
word = normalize(word)
local parts = backwardSegments(word)
local out = {}
for i = #parts, 1, -1 do
table.insert(out, unNormalize(parts[i]))
end
return table.concat(out, "-")
end
function p.count(frame)
local word = p.split(frame)
local _,n = mw.ustring.gsub(word, "-", "-")
return tostring(n + 1)
end
return p
89cuiokdl2bu94mp30acn984pqr2jfu
40822
40820
2026-06-09T22:09:26Z
EyobAbebe7
3540
40822
Scribunto
text/plain
local p = {}
-- =====================
-- DIGRAPH MAP (YOUR RULE)
-- =====================
local dcMap = {
ch = "Ç", dh = "Ð", ny = "Ñ",
ph = "Þ", ts = "Ŧ", sh = "Š", zy = "Ž"
}
local APOST = "Ƶ"
-- reverse map
local revMap = {}
for k,v in pairs(dcMap) do
revMap[v] = k
end
-- =====================
-- NORMALIZE
-- =====================
local function normalize(s)
s = mw.ustring.lower(s)
-- IMPORTANT: longer patterns first safety
local order = {"ph","sh","ch","dh","ny","ts","zy"}
for _,k in ipairs(order) do
s = mw.ustring.gsub(s, k, dcMap[k])
end
s = mw.ustring.gsub(s, "'", APOST)
return s
end
-- =====================
-- UNNORMALIZE
-- =====================
local function unNormalize(s)
for v,k in pairs(revMap) do
s = mw.ustring.gsub(s, v, k)
end
return mw.ustring.gsub(s, APOST, "'")
end
-- =====================
-- HELPERS
-- =====================
local vowels = {a=true,e=true,i=true,o=true,u=true}
local function isV(c)
return c and vowels[c] == true
end
local function isC(c)
if not c or c == "" then return false end
if mw.ustring.match(c, "[ÇÐÑÞŦŠŽ]") then return true end
if c == "'" or c == APOST then return true end
if c == "y" then return true end
return mw.ustring.match(c, "%a") and not vowels[c]
end
-- =====================
-- EXTRACT END (FIXED SAFELY)
-- =====================
local function extractEnd(norm)
local L = mw.ustring.len(norm)
local function s(i)
return mw.ustring.sub(norm, i, i)
end
if L >= 2 then
local a, b = s(L-1), s(L)
-- VC or CV boundary safe split
if isV(a) and isC(b) then
return mw.ustring.sub(norm, L-1)
end
if isC(a) and isV(b) then
return mw.ustring.sub(norm, L-1)
end
end
if L >= 3 then
local a,b,c = s(L-2), s(L-1), s(L)
if isC(a) and isV(b) and isC(c) then
return mw.ustring.sub(norm, L-2)
end
if isC(a) and isC(b) and isV(c) then
return mw.ustring.sub(norm, L-2)
end
end
return mw.ustring.sub(norm, L, L)
end
-- =====================
-- BACKWARD SEGMENTS
-- =====================
local function backwardSegments(norm)
local pieces = {}
while mw.ustring.len(norm) > 0 do
local endSeg = extractEnd(norm)
-- SAFE GUARD (prevents infinite loop bug)
if not endSeg or endSeg == "" then
endSeg = mw.ustring.sub(norm, -1)
end
table.insert(pieces, endSeg)
norm = mw.ustring.sub(norm, 1, mw.ustring.len(norm) - mw.ustring.len(endSeg))
end
return pieces
end
-- =====================
-- MAIN SPLIT
-- =====================
function p.split(frame)
local word = frame.args[1] or ""
if word == "" then return "" end
word = normalize(word)
local parts = backwardSegments(word)
local out = {}
-- reverse safely
for i = #parts, 1, -1 do
out[#out+1] = unNormalize(parts[i]) -- SAFE (no table.insert error)
end
return table.concat(out, "-")
end
-- =====================
-- COUNT
-- =====================
function p.count(frame)
local word = p.split(frame)
if word == "" then return "0" end
local _,n = mw.ustring.gsub(word, "-", "-")
return tostring(n + 1)
end
return p
oxlcmhcpx62miqya230bzqk1cdw5q87
40823
40822
2026-06-09T22:16:59Z
EyobAbebe7
3540
40823
Scribunto
text/plain
local p = {}
-- =====================
-- DIGRAPHS
-- =====================
local digraphs = {
dh="D", ch="C", ny="N",
ph="P", sh="S", ts="T", zy="Z"
}
local vowels = {a=true,e=true,i=true,o=true,u=true}
local function isV(x)
return vowels[x] == true
end
-- =====================
-- TOKENIZE
-- =====================
local function tokenize(word)
local tokens = {}
local i = 1
while i <= #word do
local two = word:sub(i,i+1)
if digraphs[two] then
table.insert(tokens, digraphs[two])
i = i + 2
else
local c = word:sub(i,i)
if vowels[c] then
table.insert(tokens, "V")
else
table.insert(tokens, "C")
end
i = i + 1
end
end
return tokens
end
-- =====================
-- PATTERNS (your system)
-- =====================
local patterns = {
{"C","C","V","V","C"}, -- CCVVC
{"C","C","V","C"}, -- CCVC
{"C","V","V","C"}, -- CVVC
{"C","C","V","V"}, -- CCVV
{"C","V","C"}, -- CVC
{"C","C","V"}, -- CCV
{"C","V","V"}, -- CVV
{"C","V"} -- CV
}
-- =====================
-- MATCH PATTERN
-- =====================
local function matchPattern(tokens, i)
for _,patt in ipairs(patterns) do
local ok = true
for j=1,#patt do
if tokens[i+j-1] ~= patt[j] then
ok = false
break
end
end
if ok then
return #patt
end
end
return 1
end
-- =====================
-- SPLIT ENGINE
-- =====================
local function syllabify(word)
local tokens = tokenize(word)
local syllables = {}
local i = 1
while i <= #tokens do
local len = matchPattern(tokens, i)
local syll = {}
for j=0,len-1 do
table.insert(syll, tokens[i+j])
end
table.insert(syllables, table.concat(syll))
i = i + len
end
return syllables
end
-- =====================
-- MAIN
-- =====================
function p.split(frame)
local word = frame.args[1] or ""
word = mw.ustring.lower(word)
local syll = syllabify(word)
return table.concat(syll, "-")
end
return p
4wi41u90tx2m5j6ex820st2zqi2zh39
40824
40823
2026-06-09T22:19:20Z
EyobAbebe7
3540
40824
Scribunto
text/plain
local p = {}
local vowels = {a=true,e=true,i=true,o=true,u=true}
local digraphs = {
dh="D", ch="C", ny="N",
ph="P", sh="S", ts="T", zy="Z"
}
-- =====================
-- TOKENIZE (keeps real chars too)
-- =====================
local function tokenize(word)
local tokens = {}
local i = 1
while i <= #word do
local two = word:sub(i,i+1)
if digraphs[two] then
table.insert(tokens, digraphs[two])
i = i + 2
else
table.insert(tokens, word:sub(i,i))
i = i + 1
end
end
return tokens
end
-- =====================
-- CHECK TYPE
-- =====================
local function isV(c)
return vowels[c] == true
end
local function isC(c)
return not isV(c)
end
-- =====================
-- SYLLABLE BUILDER (IMPORTANT FIX)
-- =====================
local function syllabify(word)
local t = tokenize(word)
local syllables = {}
local i = 1
while i <= #t do
local syll = {}
-- STEP 1: onset (C cluster)
while i <= #t and isC(t[i]) do
table.insert(syll, t[i])
i = i + 1
end
-- STEP 2: nucleus (V)
while i <= #t and isV(t[i]) do
table.insert(syll, t[i])
i = i + 1
end
-- STEP 3: coda (optional C, but stop before next vowel)
while i <= #t and isC(t[i]) do
-- lookahead: if next is vowel → break (onset rule)
if t[i+1] and isV(t[i+1]) then
break
end
table.insert(syll, t[i])
i = i + 1
end
table.insert(syllables, table.concat(syll))
end
return syllables
end
-- =====================
-- MAIN
-- =====================
function p.split(frame)
local word = mw.ustring.lower(frame.args[1] or "")
local s = syllabify(word)
return table.concat(s, "-")
end
return p
tpj3vbj8lp9mtv6734ktlim51v30rg0
40826
40824
2026-06-09T22:26:45Z
EyobAbebe7
3540
40826
Scribunto
text/plain
local p = {}
local vowels = {a=true,e=true,i=true,o=true,u=true}
local digraphs = {
dh="D", ch="C", ny="N",
ph="P", sh="S", ts="T", zy="Z"
}
-- =====================
-- TOKENIZE (keeps real chars too)
-- =====================
local function tokenize(word)
local tokens = {}
local i = 1
while i <= #word do
local two = word:sub(i,i+1)
if digraphs[two] then
table.insert(tokens, digraphs[two])
i = i + 2
else
table.insert(tokens, word:sub(i,i))
i = i + 1
end
end
return tokens
end
-- =====================
-- CHECK TYPE
-- =====================
local function isV(c)
return vowels[c] == true
end
local function isC(c)
return not isV(c)
end
-- =====================
-- SYLLABLE BUILDER (IMPORTANT FIX)
-- =====================
local function syllabify(word)
local t = tokenize(word)
local syllables = {}
local i = 1
while i <= #t do
local syll = {}
-- STEP 1: onset (C cluster)
while i <= #t and isC(t[i]) do
table.insert(syll, t[i])
i = i + 1
end
-- STEP 2: nucleus (V)
while i <= #t and isV(t[i]) do
table.insert(syll, t[i])
i = i + 1
end
-- STEP 3: coda (optional C, but stop before next vowel)
while i <= #t and isC(t[i]) do
-- lookahead: if next is vowel → break (onset rule)
if t[i+1] and isV(t[i+1]) then
break
end
table.insert(syll, t[i])
i = i + 1
end
table.insert(syllables, table.concat(syll))
end
return syllables
end
-- =====================
-- MAIN
-- =====================
function p.split(frame)
local word = mw.ustring.lower(frame.args[1] or "")
local s = syllabify(word)
return table.concat(s, "-")
end
function p.count(frame)
local word = mw.text.trim(frame.args[1] or "")
if word == "" then return "0" end
local syll = p.split(frame)
local _, n = mw.ustring.gsub(syll, "-", "-")
return tostring(n + 1)
end
return p
j5jxqmp335od5somgo184ih6sb3m6ig
Template:syllables
10
26652
40819
2026-06-09T21:55:53Z
EyobAbebe7
3540
Created page with "{{#invoke:syllables|split|{{{1}}}}}"
40819
wikitext
text/x-wiki
{{#invoke:syllables|split|{{{1}}}}}
tmykjxxftj5y8vz8cbpacwxh5vd0chb
40825
40819
2026-06-09T22:23:52Z
EyobAbebe7
3540
/* */
40825
wikitext
text/x-wiki
{{#invoke:syllables|split|{{{1}}}}}
{{#invoke:syllables|count|{{{1}}}}}
dg68c8e5pr8bd2h3nynenivu6n4p3w1