Wiktionary
omwiktionary
https://om.wiktionary.org/wiki/Fuula_Dura
MediaWiki 1.47.0-wmf.8
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
harree
0
1989
81936
29498
2026-06-27T11:17:10Z
EyobAbebe7
3540
/* */
81936
wikitext
text/x-wiki
{{k}} [[farda]], [[gaangee]], [[gaala]] {{Wikipedia}}
==Afaan Oromoo==
{{Xinj}}
*'''harre''', jecha [[Oromduroo]] kan Afaan Oromoo irraa dhufe.
{{maq}}
# [[kurrikurrii]], beellada manaa kan fe'iisaaf oolu.
[[File:Donkey Catalan race.jpg|thumb|right|200px|Harre, beellada geejibaaf oolu.]]
===Sadhatawaa===
{{Om-noun}}
{{(|Harree beellada manaa}}
:* {{en}}: {{t+|en|donkey}}
:* {{it}}: {{t+|it|asino}}, {{t+|it|mulo}}
:* {{es}}: {{t+|es|burro}}
{{)}}
h9dccvdh0y0c1k6725b3637dmi57m8x
81939
81936
2026-06-27T11:36:37Z
EyobAbebe7
3540
/* Sadhatawaa */
81939
wikitext
text/x-wiki
{{k}} [[farda]], [[gaangee]], [[gaala]] {{Wikipedia}}
==Afaan Oromoo==
{{Xinj}}
*'''harre''', jecha [[Oromduroo]] kan Afaan Oromoo irraa dhufe.
{{maq}}
# [[kurrikurrii]], beellada manaa kan fe'iisaaf oolu.
[[File:Donkey Catalan race.jpg|thumb|right|200px|Harre, beellada geejibaaf oolu.]]
===Sadhatawaa===
{{Om-adj-v}}
===Dhalatoo Jechaa===
{{Om-noun}}
{{(|Harree beellada manaa}}
:* {{en}}: {{t+|en|donkey}}
:* {{it}}: {{t+|it|asino}}, {{t+|it|mulo}}
:* {{es}}: {{t+|es|burro}}
{{)}}
gdqg1u3s438w7qk109lh14tomm22xj4
81941
81939
2026-06-27T11:41:58Z
EyobAbebe7
3540
81941
wikitext
text/x-wiki
{{k}} [[farda]], [[gaangee]], [[gaala]] {{Wikipedia}}
==Afaan Oromoo==
{{Xinj}}
*'''harre''', jecha [[Oromduroo]] kan Afaan Oromoo irraa dhufe.
{{maq}}
# [[kurrikurrii]], beellada manaa kan fe'iisaaf oolu.
[[File:Donkey Catalan race.jpg|thumb|right|200px|Harre, beellada geejibaaf oolu.]]
===Dhalatoo Jechaa===
{{Om-noun}}
{{(|Harree beellada manaa}}
:* {{en}}: {{t+|en|donkey}}
:* {{it}}: {{t+|it|asino}}, {{t+|it|mulo}}
:* {{es}}: {{t+|es|burro}}
{{)}}
9f7l4k3f18j01wyl5pqmvz8inauwbns
autocrat
0
4127
81935
77043
2026-06-27T09:53:36Z
EyobAbebe7
3540
/* Cibra */
81935
wikitext
text/x-wiki
==Ingiliffaa==
===Cibra===
{{En-noun}}
# [[abbaa-irree]]
{{dag}}
tdb1867e5sb6tp5friq5882pbcn63zv
Template:Om-cib1
10
26649
81938
48095
2026-06-27T11:33:26Z
EyobAbebe7
3540
/* */
81938
wikitext
text/x-wiki
----------
'''<div class="om-head">
Dhalatoo jecha {{{1|{{PAGENAME}}}}} jedhuu {{#if:{{{2|}}}| <sup>{{{2}}}</sup>}}
{{#if:{{{escritura|}}}|
({{{escritura}}}
{{#if:{{{escritura2|}}}|, {{{escritura2}}}}})
}}</div>'''
{{#invoke:om-noun|generate|{{{1|{{PAGENAME}}}}}}}
kht0zc83ats3pnrhdynkm6bav8f8k86
Module:om-noun
828
26650
81937
40897
2026-06-27T11:28:12Z
EyobAbebe7
3540
81937
Scribunto
text/plain
local export = {}
-- ---------------- UTILITIES ----------------
local function is_vowel(c)
if not c or c == "" then return false end
local vowels = {a=true, e=true, i=true, o=true, u=true}
return vowels[mw.ustring.lower(c)] or false
end
local function is_consonant(c)
if not c or c == "" then return false end
return not is_vowel(c) and mw.ustring.match(mw.ustring.lower(c), "[a-z]")
end
local function ends_with_double_vowel(w)
local last2 = mw.ustring.sub(w, -2)
return last2 == "aa" or last2 == "ee" or last2 == "ii" or last2 == "oo" or last2 == "uu"
end
-- ===================================================
-- ABSOLUTIVE & ACCUSATIVE (SINGULAR)
-- ===================================================
local function make_absolutive_singular(word)
return mw.ustring.lower(word)
end
local function make_accusative(word)
return mw.ustring.lower(word)
end
-- ===================================================
-- GENITIVE (SINGULAR)
-- ===================================================
local function make_genitive(word)
local w = mw.ustring.lower(word)
local last_char = mw.ustring.sub(w, -1)
if ends_with_double_vowel(w) then
return w
end
if is_vowel(last_char) then
return w .. last_char
end
return w
end
-- ===================================================
-- NOMINATIVE (SINGULAR) RULES
-- ===================================================
local function nominative_da_rule(w)
if mw.ustring.match(w, "da$") then
local base = mw.ustring.sub(w, 1, -3)
local base_last = mw.ustring.sub(base, -1)
if is_vowel(base_last) then
return base .. "nni"
end
end
return w
end
local function nominative_vra_vla_fa(w)
if mw.ustring.match(w, "ra$") then
local base = mw.ustring.sub(w, 1, -3)
if is_vowel(mw.ustring.sub(base, -1)) then return base .. "rri" end
elseif mw.ustring.match(w, "la$") then
local base = mw.ustring.sub(w, 1, -3)
if is_vowel(mw.ustring.sub(base, -1)) then return base .. "lli" end
elseif mw.ustring.match(w, "fa$") then
local base = mw.ustring.sub(w, 1, -3)
if is_vowel(mw.ustring.sub(base, -1)) then return base .. "fti" end
end
return w
end
local function nominative_vcv(w)
local n = mw.ustring.len(w)
if n < 3 then return w end
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 is_vowel(v1) and is_consonant(c) and is_vowel(v2) then
return mw.ustring.sub(w, 1, -2) .. "ni"
end
return w
end
local function nominative_ccv(w)
local n = mw.ustring.len(w)
if n < 3 then return w end
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 is_consonant(c1) and is_consonant(c2) and is_vowel(v) then
return mw.ustring.sub(w, 1, -2) .. "i"
end
return w
end
local function nominative_vv(w)
if ends_with_double_vowel(w) then
return w .. "n"
end
return w
end
local function make_nominative_singular(word)
local w = mw.ustring.lower(word)
-- Consonant End
if is_consonant(mw.ustring.sub(w, -1)) then return w end
-- yyo rule
if mw.ustring.match(w, "yyo$") then return w end
w = nominative_da_rule(w)
w = nominative_vra_vla_fa(w)
w = nominative_vcv(w)
w = nominative_ccv(w)
w = nominative_vv(w)
return w
end
-- ===================================================
-- INSTRUMENTAL (SIMPLE)
-- ===================================================
local function make_instrumental(word)
local w = mw.ustring.lower(word)
local last = mw.ustring.sub(w, -1)
if ends_with_double_vowel(w) then
return w .. "dhaan"
end
if is_vowel(last) then
return w .. last .. "n"
end
return w
end
-- ===================================================
-- NOMINATIVE + FOCUS
-- ===================================================
local function make_nominative_focus(word)
local w = mw.ustring.lower(word)
-- Both branches in JS return w + "tu", simplifying here:
return w .. "tu"
end
-- ===================================================
-- INSTRUMENTAL (EXTENDED)
-- ===================================================
local function make_instrumental_extended(word)
local w = mw.ustring.lower(word)
if mw.ustring.len(w) == 0 then return w end
local last = mw.ustring.sub(w, -1)
if mw.ustring.match(w, "tiin$") then return w end
if ends_with_double_vowel(w) then
return w .. "tiin"
end
if is_vowel(last) then
return w .. last .. "tiin"
end
return w .. "iin"
end
-- ===================================================
-- DATIVE (SINGULAR)
-- ===================================================
local function make_dative(word)
local w = mw.ustring.lower(word)
local last = mw.ustring.sub(w, -1)
if ends_with_double_vowel(w) then
return w .. "f"
end
if is_vowel(last) then
return w .. last .. "f"
end
return w .. "iif"
end
-- ===================================================
-- DATIVE (EXTENDED)
-- ===================================================
local function make_dative_extended(word)
local w = mw.ustring.lower(word)
if mw.ustring.len(w) == 0 then return w end
local last = mw.ustring.sub(w, -1)
if ends_with_double_vowel(w) then
return w .. "tiif"
end
if is_vowel(last) then
return w .. last .. "tiif"
end
return w .. "itiif"
end
-- ===================================================
-- ALLATIVE
-- ===================================================
local function make_allative(word)
local w = mw.ustring.lower(word)
if mw.ustring.len(w) == 0 then return w end
local last = mw.ustring.sub(w, -1)
if is_vowel(last) then
return w .. "tti"
end
return w .. "itti"
end
-- ===================================================
-- GENITIVE-ALLATIVE
-- ===================================================
local function make_genitive_allative(word)
local w = mw.ustring.lower(word)
if mw.ustring.len(w) == 0 then return w end
local last = mw.ustring.sub(w, -1)
if ends_with_double_vowel(w) then
return w .. "tti"
end
if is_vowel(last) then
return w .. last .. "tti"
end
return w .. "iitti"
end
-- ===================================================
-- VOCATIVE
-- ===================================================
local function make_vocative(word)
local w = mw.ustring.lower(word)
return "yaa " .. make_genitive(w)
end
-- ===================================================
-- EXPORT FUNCTION (TEMPLATE ENTRY POINT)
-- ===================================================
function export.generate(frame)
local args = frame.args
if not args[1] and not args.word then
args = frame:getParent().args
end
local word = args[1] or args.word
-- Yoo parameter'n hin kennamne, maqaa fuulaa irraa fudhata
if not word or word == "" then
local pagename = mw.title.getCurrentTitle().text
-- Yoo Template/Module irra jiraate fakkeenya "nama" fayyadama
if mw.title.getCurrentTitle().namespace == 10 or mw.title.getCurrentTitle().namespace == 828 then
word = "nama"
else
word = pagename
end
end
word = mw.text.trim(word)
if word == "" then return "" end
-- Generate Forms
local forms = {
abs = make_absolutive_singular(word),
nom = make_nominative_singular(word),
nomFocus = make_nominative_focus(word),
acc = make_accusative(word),
gen = make_genitive(word),
ins = make_instrumental(word),
insExt = make_instrumental_extended(word),
dat = make_dative(word),
datExt = make_dative_extended(word),
all = make_allative(word),
genAll = make_genitive_allative(word),
vocat = make_vocative(word)
}
-- HTML Gabatee Uumuu
local html = mw.html.create('table')
:attr('border', '1')
:attr('cellpadding', '6')
:attr('cellspacing', '0')
:attr('style', 'border-collapse: collapse; text-align: left;')
-- Mata Duree
:tag('tr')
:tag('th'):attr('colspan', '2'):attr('style', 'background-color: #f2f2f2; text-align: center;'):wikitext('Maqaa (Noun Declensions) - [[' .. word .. ']]'):done()
:done()
-- Rows
:tag('tr'):tag('th'):wikitext('Absolutive'):done():tag('td'):wikitext('[[' .. forms.abs .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Accusative'):done():tag('td'):wikitext('[[' .. forms.acc .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Nominative'):done():tag('td'):wikitext('[[' .. forms.nom .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Nominative (Focus)'):done():tag('td'):wikitext('[[' .. forms.nomFocus .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Genitive'):done():tag('td'):wikitext('[[' .. forms.gen .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Dative'):done():tag('td'):wikitext('[[' .. forms.dat .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Dative (Extended)'):done():tag('td'):wikitext('[[' .. forms.datExt .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Instrumental'):done():tag('td'):wikitext('[[' .. forms.ins .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Instrumental (Extended)'):done():tag('td'):wikitext('[[' .. forms.insExt .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Allative'):done():tag('td'):wikitext('[[' .. forms.all .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Genitive-Allative'):done():tag('td'):wikitext('[[' .. forms.genAll .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Vocative'):done():tag('td'):wikitext(forms.vocat):done():done() -- Vocative link gochuun barbaachisaa miti ("yaa nama")
return tostring(html)
end
return export
2lw1uda7griily7jj4tf68kt2ohop7l
81943
81937
2026-06-27T11:57:23Z
EyobAbebe7
3540
81943
Scribunto
text/plain
local export = {}
-- ---------------- UTILITIES ----------------
local function is_vowel(c)
if not c or c == "" then return false end
local vowels = {a=true, e=true, i=true, o=true, u=true}
return vowels[mw.ustring.lower(c)] or false
end
local function is_consonant(c)
if not c or c == "" then return false end
return not is_vowel(c) and mw.ustring.match(mw.ustring.lower(c), "[a-z]")
end
local function ends_with_double_vowel(w)
local last2 = mw.ustring.sub(w, -2)
return last2 == "aa" or last2 == "ee" or last2 == "ii" or last2 == "oo" or last2 == "uu"
end
-- ===================================================
-- ABSOLUTIVE & ACCUSATIVE (SINGULAR)
-- ===================================================
local function make_absolutive_singular(word)
return mw.ustring.lower(word)
end
local function make_accusative(word)
return mw.ustring.lower(word)
end
-- ===================================================
-- GENITIVE (SINGULAR)
-- ===================================================
local function make_genitive(word)
local w = mw.ustring.lower(word)
local last_char = mw.ustring.sub(w, -1)
if ends_with_double_vowel(w) then
return w
end
if is_vowel(last_char) then
return w .. last_char
end
return w
end
-- ===================================================
-- GENITIVE + FOCUS
-- ===================================================
local function make_genitive_focus(word)
local w = mw.ustring.lower(word)
-- Yoo 'fardatu' barbaadde kallattiin 'w .. "tu"' fayyadami
-- Yoo 'fardaatu' barbaadde immoo 'make_genitive(w) .. "tu"' fayyadami
-- Asirratti seera ati kennite 'Word + tu' fayyadamneerra:
if is_vowel(mw.ustring.sub(w, -1)) then
return w .. "tu"
end
return w .. "tu"
end
-- ===================================================
-- NOMINATIVE (SINGULAR) RULES
-- ===================================================
local function nominative_da_rule(w)
if mw.ustring.match(w, "da$") then
local base = mw.ustring.sub(w, 1, -3)
local base_last = mw.ustring.sub(base, -1)
if is_vowel(base_last) then
return base .. "nni"
end
end
return w
end
local function nominative_vra_vla_fa(w)
if mw.ustring.match(w, "ra$") then
local base = mw.ustring.sub(w, 1, -3)
if is_vowel(mw.ustring.sub(base, -1)) then return base .. "rri" end
elseif mw.ustring.match(w, "la$") then
local base = mw.ustring.sub(w, 1, -3)
if is_vowel(mw.ustring.sub(base, -1)) then return base .. "lli" end
elseif mw.ustring.match(w, "fa$") then
local base = mw.ustring.sub(w, 1, -3)
if is_vowel(mw.ustring.sub(base, -1)) then return base .. "fti" end
end
return w
end
local function nominative_vcv(w)
local n = mw.ustring.len(w)
if n < 3 then return w end
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 is_vowel(v1) and is_consonant(c) and is_vowel(v2) then
return mw.ustring.sub(w, 1, -2) .. "ni"
end
return w
end
local function nominative_ccv(w)
local n = mw.ustring.len(w)
if n < 3 then return w end
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 is_consonant(c1) and is_consonant(c2) and is_vowel(v) then
return mw.ustring.sub(w, 1, -2) .. "i"
end
return w
end
local function nominative_vv(w)
if ends_with_double_vowel(w) then
return w .. "n"
end
return w
end
local function make_nominative_singular(word)
local w = mw.ustring.lower(word)
-- Consonant End
if is_consonant(mw.ustring.sub(w, -1)) then return w end
-- yyo rule
if mw.ustring.match(w, "yyo$") then return w end
w = nominative_da_rule(w)
w = nominative_vra_vla_fa(w)
w = nominative_vcv(w)
w = nominative_ccv(w)
w = nominative_vv(w)
return w
end
-- ===================================================
-- INSTRUMENTAL (SIMPLE)
-- ===================================================
local function make_instrumental(word)
local w = mw.ustring.lower(word)
local last = mw.ustring.sub(w, -1)
if ends_with_double_vowel(w) then
return w .. "dhaan"
end
if is_vowel(last) then
return w .. last .. "n"
end
return w
end
-- ===================================================
-- NOMINATIVE + FOCUS
-- ===================================================
local function make_nominative_focus(word)
local w = mw.ustring.lower(word)
return w .. "tu"
end
-- ===================================================
-- INSTRUMENTAL (EXTENDED)
-- ===================================================
local function make_instrumental_extended(word)
local w = mw.ustring.lower(word)
if mw.ustring.len(w) == 0 then return w end
local last = mw.ustring.sub(w, -1)
if mw.ustring.match(w, "tiin$") then return w end
if ends_with_double_vowel(w) then
return w .. "tiin"
end
if is_vowel(last) then
return w .. last .. "tiin"
end
return w .. "iin"
end
-- ===================================================
-- DATIVE (SINGULAR)
-- ===================================================
local function make_dative(word)
local w = mw.ustring.lower(word)
local last = mw.ustring.sub(w, -1)
if ends_with_double_vowel(w) then
return w .. "f"
end
if is_vowel(last) then
return w .. last .. "f"
end
return w .. "iif"
end
-- ===================================================
-- DATIVE (EXTENDED)
-- ===================================================
local function make_dative_extended(word)
local w = mw.ustring.lower(word)
if mw.ustring.len(w) == 0 then return w end
local last = mw.ustring.sub(w, -1)
if ends_with_double_vowel(w) then
return w .. "tiif"
end
if is_vowel(last) then
return w .. last .. "tiif"
end
return w .. "itiif"
end
-- ===================================================
-- ALLATIVE
-- ===================================================
local function make_allative(word)
local w = mw.ustring.lower(word)
if mw.ustring.len(w) == 0 then return w end
local last = mw.ustring.sub(w, -1)
if is_vowel(last) then
return w .. "tti"
end
return w .. "itti"
end
-- ===================================================
-- GENITIVE-ALLATIVE
-- ===================================================
local function make_genitive_allative(word)
local w = mw.ustring.lower(word)
if mw.ustring.len(w) == 0 then return w end
local last = mw.ustring.sub(w, -1)
if ends_with_double_vowel(w) then
return w .. "tti"
end
if is_vowel(last) then
return w .. last .. "tti"
end
return w .. "iitti"
end
-- ===================================================
-- VOCATIVE
-- ===================================================
local function make_vocative(word)
local w = mw.ustring.lower(word)
return "yaa " .. make_genitive(w)
end
-- ===================================================
-- EXPORT FUNCTION (TEMPLATE ENTRY POINT)
-- ===================================================
function export.generate(frame)
local args = frame.args
if not args[1] and not args.word then
args = frame:getParent().args
end
local word = args[1] or args.word
-- Yoo parameter'n hin kennamne, maqaa fuulaa irraa fudhata
if not word or word == "" then
local pagename = mw.title.getCurrentTitle().text
if mw.title.getCurrentTitle().namespace == 10 or mw.title.getCurrentTitle().namespace == 828 then
word = "farda" -- Fakkeenyaaf 'farda' fayyadamneerra
else
word = pagename
end
end
word = mw.text.trim(word)
if word == "" then return "" end
-- Generate Forms
local forms = {
abs = make_absolutive_singular(word),
nom = make_nominative_singular(word),
nomFocus = make_nominative_focus(word),
acc = make_accusative(word),
gen = make_genitive(word),
genFocus = make_genitive_focus(word), -- HAARAA KAN DABALAME
ins = make_instrumental(word),
insExt = make_instrumental_extended(word),
dat = make_dative(word),
datExt = make_dative_extended(word),
all = make_allative(word),
genAll = make_genitive_allative(word),
vocat = make_vocative(word)
}
-- HTML Gabatee Uumuu
local html = mw.html.create('table')
:attr('border', '1')
:attr('cellpadding', '6')
:attr('cellspacing', '0')
:attr('style', 'border-collapse: collapse; text-align: left;')
-- Mata Duree
:tag('tr')
:tag('th'):attr('colspan', '2'):attr('style', 'background-color: #f2f2f2; text-align: center;'):wikitext('Maqaa (Noun Declensions) - [[' .. word .. ']]'):done()
:done()
-- Rows
:tag('tr'):tag('th'):wikitext('Absolutive'):done():tag('td'):wikitext('[[' .. forms.abs .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Accusative'):done():tag('td'):wikitext('[[' .. forms.acc .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Nominative'):done():tag('td'):wikitext('[[' .. forms.nom .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Nominative (Focus)'):done():tag('td'):wikitext('[[' .. forms.nomFocus .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Genitive'):done():tag('td'):wikitext('[[' .. forms.gen .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Genitive (Focus)'):done():tag('td'):wikitext('[[' .. forms.genFocus .. ']]'):done():done() -- GABATEETTI DABALAMEERA
:tag('tr'):tag('th'):wikitext('Dative'):done():tag('td'):wikitext('[[' .. forms.dat .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Dative (Extended)'):done():tag('td'):wikitext('[[' .. forms.datExt .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Instrumental'):done():tag('td'):wikitext('[[' .. forms.ins .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Instrumental (Extended)'):done():tag('td'):wikitext('[[' .. forms.insExt .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Allative'):done():tag('td'):wikitext('[[' .. forms.all .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Genitive-Allative'):done():tag('td'):wikitext('[[' .. forms.genAll .. ']]'):done():done()
:tag('tr'):tag('th'):wikitext('Vocative'):done():tag('td'):wikitext(forms.vocat):done():done()
return tostring(html)
end
return export
pjuf1ov8kobp3suuxgxhvlm0rgx4trk
hudhaa
0
30229
81932
44469
2026-06-27T06:30:22Z
EyobAbebe7
3540
/* Afaaneffannoo */
81932
wikitext
text/x-wiki
==Oromoo==
===Afaaneffannoo===
{{syllables}}
**{{Om-audio}}
===Maqibsa===
{{maqi}}
# kan hudhu, kan morma hudhee qabu.
===Cibra===
{{maq}}
# maqaa biqiltuu
===Latii Jechootaa===
{{Om-cib1}}
{{dag}}
6s2d38w3r3syj4tet9869z8iisnsv2b
Template:Om-noun
10
33209
81940
47452
2026-06-27T11:37:22Z
EyobAbebe7
3540
/* */
81940
wikitext
text/x-wiki
'''<div class="om-head">
Dhalatoo jecha {{{1|{{PAGENAME}}}}} jedhuu
{{#if:{{{2|}}}| <sup>{{{2}}}</sup>}}
{{#if:{{{escritura|}}}|
({{{escritura}}}
{{#if:{{{escritura2|}}}|, {{{escritura2}}}}})
}}
</div>'''
{{#invoke:om-noun|generate|{{{1|{{PAGENAME}}}}}}}
lrt2kcwtuc75vz9tca0c7vua4cxulij
Template:Om-verb
10
33896
81918
48144
2026-06-27T03:11:06Z
EyobAbebe7
3540
/* */
81918
wikitext
text/x-wiki
''[[gochima]]''
ear5rdolghye2ye254btz8iz4mpg2h0
deemuu
0
41219
81917
55475
2026-06-27T03:09:51Z
EyobAbebe7
3540
/* Gochima */
81917
wikitext
text/x-wiki
==Oromoo==
===Afaaneffannoo===
{{syllables}}
**{{Om-audio}}
===Gochima===
{{Om-verb}}
# [[karaa]] irra miilla dabaree wal jala qaxxaamursuudhaan yookiin waan akka fardaa irra taa'uudhaan yookiin waan akka konkolaataa, roophilaa, baabura lafaa keessa taa'uudhaan, bakka turanii ka'anii bakka biraa gawuu.
:{{fkn}} ° (Teepha qawwee qabanii, deeman karaa qabanii, taa'an bultii qabanii, waalama maaf dhabanii).
===Sadhatawaa===
{{Om-adj-v|deemuu}}
{{dag}}
7y3woiel1n0anllf6kqge9rciwbu5ti
81942
81917
2026-06-27T11:44:53Z
EyobAbebe7
3540
/* Sadhatawaa */
81942
wikitext
text/x-wiki
==Oromoo==
===Afaaneffannoo===
{{syllables}}
**{{Om-audio}}
===Gochima===
{{Om-verb}}
# [[karaa]] irra miilla dabaree wal jala qaxxaamursuudhaan yookiin waan akka fardaa irra taa'uudhaan yookiin waan akka konkolaataa, roophilaa, baabura lafaa keessa taa'uudhaan, bakka turanii ka'anii bakka biraa gawuu.
:{{fkn}} ° (Teepha qawwee qabanii, deeman karaa qabanii, taa'an bultii qabanii, waalama maaf dhabanii).
===Sadhatawaa===
{{Om-adj-v|deemuu}}
===Dhalatoo Jechaa===
{{Om-noun}}
{{dag}}
f78dy754g5oj5zp50z9detjn8oc3xwm
fufuu
0
42060
81933
56316
2026-06-27T09:48:08Z
EyobAbebe7
3540
/* Gochima */
81933
wikitext
text/x-wiki
==Oromoo==
===Afaaneffannoo===
{{syllables}}
**{{Om-audio}}
===Gochima===
{{Om-verb}}
# walitti hidhuu yookiin itti dhahachuu.
======
{{Om-adj-v}}
{{dag}}
t2ufmke474jb3897sexqvy8jn6kq4xn
81934
81933
2026-06-27T09:50:02Z
EyobAbebe7
3540
/* Sadhatawaa */
81934
wikitext
text/x-wiki
==Oromoo==
===Afaaneffannoo===
{{syllables}}
**{{Om-audio}}
===Gochima===
{{Om-verb}}
# walitti hidhuu yookiin itti dhahachuu.
===Sadhatawaa===
{{Om-adj-v}}
{{dag}}
6enu6lkkffpr7emt1jjwb548wbhzeiq
fuudhuu
0
42109
81927
56365
2026-06-27T05:52:39Z
EyobAbebe7
3540
/* Gochima */
81927
wikitext
text/x-wiki
==Oromoo==
===Afaaneffannoo===
{{syllables}}
**{{Om-audio}}
===Gochima===
{{Om-verb}}
# dubartii niitii ofii godhachuu, abbaa manaa ta'uu.
# ol kaasuu.
===Sadhatawaa===
{{Om-adj-v}}
{{dag}}
5ao5gvabk3ka8kinbzne2fx6kaukip6
hudhuu
0
43286
81928
57542
2026-06-27T05:57:25Z
EyobAbebe7
3540
/* Gochima */
81928
wikitext
text/x-wiki
==Oromoo==
===Afaaneffannoo===
{{syllables}}
**{{Om-audio}}
===Gochima===
{{Om-verb}}
# qabuun yookiin waa itti rakkisuun afuura bawuu. dhowwuu.
# hudhaa baasuu, daraara jala gawuu.
===Sadhatawaa===
{{Om-adj-v}}
{{dag}}
67b9vy9xjbqk93ofru05bc68qelh1oh
81929
81928
2026-06-27T05:59:24Z
EyobAbebe7
3540
/* Gochima */
81929
wikitext
text/x-wiki
==Oromoo==
===Afaaneffannoo===
{{syllables}}
**{{Om-audio}}
===Gochima===
{{Om-verb}}
# qabuun yookiin waa itti rakkisuun afuura bawu dhowwuu.
# Jabeessee [[morma]] qabuun.
# hudhaa baasuu, daraara jala gawuu,daraaruuf [[dhi'aachuu]]
===Sadhatawaa===
{{Om-adj-v}}
{{dag}}
r822ifvbwpkb8xuw5lk3xl21py7xck6
81930
81929
2026-06-27T06:02:31Z
EyobAbebe7
3540
/* Gochima */
81930
wikitext
text/x-wiki
==Oromoo==
===Afaaneffannoo===
{{syllables}}
**{{Om-audio}}
===Gochima===
{{Om-verb}}
# qabuun yookiin waa itti rakkisuun afuura bawu dhowwuu.
# Jabeessee [[morma]] qabuu.
# hudhaa baasuu, daraara jala gawuu,daraaruuf [[dhi'aachuu]]
===Sadhatawaa===
{{Om-adj-v}}
{{dag}}
ryp6irp2ppgvow7r0z0gjmtnrt1yyvd
81931
81930
2026-06-27T06:04:00Z
EyobAbebe7
3540
/* Gochima */
81931
wikitext
text/x-wiki
==Oromoo==
===Afaaneffannoo===
{{syllables}}
**{{Om-audio}}
===Gochima===
{{Om-verb}}
# qabuun yookiin waa itti rakkisuun afuura bawu dhowwuu.
# jabeessee [[morma]] qabuu.
# hudhaa baasuu, daraara jala gawuu,daraaruuf [[dhi'aachuu]]
===Sadhatawaa===
{{Om-adj-v}}
{{dag}}
sty4z1ffb1nyr7gkmi6qyzsqn7q4zvg
ModuleOm-adj-v
0
62060
81911
2026-06-26T18:30:50Z
EyobAbebe7
3540
Created page with "-- Module:adjective local p = {} -- ========================= -- TOKENIZER (ch, dh, ny, ph, sh, ts, zy) -- ========================= local function tokenizeOromo(text) local digraphs = { ch = true, dh = true, ny = true, ph = true, sh = true, ts = true, zy = true } local tokens = {} local i = 1 -- Lua is 1-indexed while i <= #text do local two = text:sub(i, i + 1) if digraphs[two] then tokens[#tokens + 1] = two i = i + 2 else tokens[#tokens + 1] = tex..."
81911
wikitext
text/x-wiki
-- Module:adjective
local p = {}
-- =========================
-- TOKENIZER (ch, dh, ny, ph, sh, ts, zy)
-- =========================
local function tokenizeOromo(text)
local digraphs = { ch = true, dh = true, ny = true, ph = true, sh = true, ts = true, zy = true }
local tokens = {}
local i = 1 -- Lua is 1-indexed
while i <= #text do
local two = text:sub(i, i + 1)
if digraphs[two] then
tokens[#tokens + 1] = two
i = i + 2
else
tokens[#tokens + 1] = text:sub(i, i)
i = i + 1
end
end
return tokens
end
-- =========================
-- VCC DETECTOR
-- =========================
local function isVCCUU(word)
-- expects word ending in "uu"
local stem = word:sub(1, #word - 2)
local tokens = tokenizeOromo(stem)
local vowels = { a = true, e = true, i = true, o = true, u = true }
local consonantsAtEnd = 0
for idx = #tokens, 1, -1 do
local tok = tokens[idx]
if vowels[tok] then
break
end
consonantsAtEnd = consonantsAtEnd + 1
end
return consonantsAtEnd >= 2
end
-- (Unused in your JS main flow, but included for completeness)
local function endsWithLongVowelPlusConsonant(stem)
local tokens = tokenizeOromo(stem)
if #tokens < 2 then return false end
local last = tokens[#tokens]
local prev = tokens[#tokens - 1]
local vowels = { a = true, e = true, i = true, o = true, u = true }
local isConsonant = not vowels[last]
local isLongVowel =
prev == "aa" or prev == "ee" or prev == "ii" or prev == "oo" or prev == "uu"
return isLongVowel and isConsonant
end
-- helper: HTML escape (minimal)
local function htmlEscape(s)
s = tostring(s or "")
s = s:gsub("&", "&")
s = s:gsub("<", "<")
s = s:gsub(">", ">")
s = s:gsub('"', """)
s = s:gsub("'", "'")
return s
end
local function startsWithOOCHUU(word)
-- JS: /(eechuu|ichuu|uchuu|oochuu)$/
return word:match("(eechuu|ichuu|uchuu|oochuu)$") ~= nil
end
local function endsWith(word, suffix)
return word:sub(-#suffix) == suffix
end
-- Main generator
function p.generate(frame)
-- Accept verb as unnamed parameter: {{#invoke:adjective|generate|verb=...}}
local args = frame.args
local word = (args.verb or args[1] or ""):match("^%s*(.-)%s*$")
word = word:lower()
-- allow same JS fields
if word == "" then
return "Verb galchi."
end
if not endsWith(word, "uu") then
return "Verb Afaan Oromoo 'uu'n xumuramuu qaba."
end
local male, female, plural = "", "", ""
-- Base stem (often needed later; not always the same cut for every rule)
local stem = word:sub(1, #word - 2)
-- =====================================
-- 0. EXACT ooCHUU (HIGHEST PRIORITY)
-- =====================================
-- JS: /(eechuu|ichuu|uchuu|oochuu)$/
if startsWithOOCHUU(word) then
-- stem2 = word.slice(0, -4)
local stem2 = word:sub(1, #word - 4) -- remove "oochuu" (or eechuu/ichuu/uchuu)
male = stem2 .. "chaa"
female = stem2 .. "chituu"
plural = stem2 .. "chitoota"
-- JS: else if (/oo'uu$/)
elseif word:match("oo'uu$") then
local stem2 = word:sub(1, #word - 2) -- remove "uu"
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "ssuu"
plural = root .. "ssota"
elseif word:match("o'uu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
elseif word:match("aa'uu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 3) -- remove 3 chars in JS: slice(0,-3)
male = stem2 .. "aa"
female = root .. "ooftuu"
plural = root .. "ooftota"
elseif word:match("[aeio]ta'uu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 2)
male = stem2 .. "aa"
female = root .. "oftuu"
plural = root .. "oftoota"
elseif word:match("[aeiou]ga'uu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 2)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "a'oota"
elseif word:match("ga'uu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 2)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "eessota"
elseif word:match("a'uu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "atuu"
plural = root .. "atota"
elseif word:match("ii'uu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif word:match("i'uu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "toota"
elseif word:match("e'uu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "etuu"
plural = root .. "etota"
elseif word:match("u'uu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
elseif word:match("oowuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "ssuu"
plural = root .. "ssota"
elseif word:match("owuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
elseif word:match("aawuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 3)
male = stem2 .. "aa"
female = root .. "ooftuu"
plural = root .. "ooftota"
elseif word:match("[aeio]tawuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 2)
male = stem2 .. "aa"
female = root .. "oftuu"
plural = root .. "oftoota"
elseif word:match("[aeiou]gawuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 2)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "a'oota"
elseif word:match("gawuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 2)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "eessota"
elseif word:match("awuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "atuu"
plural = root .. "atota"
elseif word:match("iiwuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif word:match("iwuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "toota"
elseif word:match("ewuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "etuu"
plural = root .. "etota"
elseif word:match("uwuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
elseif word:match("ooyuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "ssuu"
plural = root .. "ssota"
elseif word:match("oyuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
elseif word:match("aayuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 3)
male = stem2 .. "aa"
female = root .. "ooftuu"
plural = root .. "ooftota"
elseif word:match("[aeio]tayuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 2)
male = stem2 .. "aa"
female = root .. "oftuu"
plural = root .. "oftoota"
elseif word:match("[aeiou]gayuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 2)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "a'oota"
elseif word:match("gayuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 2)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "eessota"
elseif word:match("ayuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "atuu"
plural = root .. "atota"
elseif word:match("iiyuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif word:match("iyuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "toota"
elseif word:match("eyuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "etuu"
plural = root .. "etota"
elseif word:match("uyuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
elseif word:match("oohuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "ssuu"
plural = root .. "ssota"
elseif word:match("ohuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
elseif word:match("aahuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 3)
male = stem2 .. "aa"
female = root .. "ooftuu"
plural = root .. "ooftota"
elseif word:match("[aeio]tahuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 2)
male = stem2 .. "aa"
female = root .. "oftuu"
plural = root .. "oftoota"
elseif word:match("[aeiou]gahuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 2)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "a'oota"
elseif word:match("gahuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 2)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "eessota"
elseif word:match("ahuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "atuu"
plural = root .. "atota"
elseif word:match("iihuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif word:match("ihuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "toota"
elseif word:match("ehuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "etuu"
plural = root .. "etota"
elseif word:match("uhuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 1)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
elseif word:match("[ae]dhuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif word:match("iidhuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif word:match("idhuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 2)
male = stem2 .. "aa"
female = root .. "ituu"
plural = root .. "itota"
elseif word:match("udhuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 2)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
elseif word:match("dhuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 2)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
elseif word:match("nyuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 2)
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
elseif word:match("shuu$") then
local stem2 = word:sub(1, #word - 2)
local root = stem2:sub(1, #stem2 - 2)
male = stem2 .. "aa"
female = stem2 .. "tuu"
plural = stem2 .. "toota"
elseif word:match("jjechuu$") then
local stem2 = word:sub(1, #word - 4) -- remove "ochuu"
local root = stem2:sub(1, #stem2 - 1)
male = root .. "etaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif word:match("jechuu$") then
local stem2 = word:sub(1, #word - 4)
local root = stem2:sub(1, #stem2 - 1)
male = root .. "edhaa"
female = root .. "ettuu"
plural = root .. "ettoota"
-- =====================================
-- 1. EXACT oCHUU (SECOND PRIORITY)
-- =====================================
elseif word:match("ochuu$") then
local stem2 = word:sub(1, #word - 4)
local root = stem2:sub(1, #stem2 - 1)
male = root .. "odhaa"
female = root .. "ootuu"
plural = root .. "ootota"
-- =====================================
-- 1.1 C + chuu
-- =====================================
elseif word:match("[bcdfghjklmnpqrstvwxyz]chuu$") then
local base = word:sub(1, #word - 4)
-- JS has same outputs for both branches; keep it as-is
male = base .. "chaa"
female = base .. "chituu"
plural = base .. "chitoota"
-- =====================================
-- 2. GENERAL chuu rule
-- =====================================
elseif word:match("chuu$") then
local base = word:sub(1, #word - 4)
male = base .. "taa"
female = base .. "ttuu"
plural = base .. "ttota"
-- =====================================
-- 3. V + CC + uu
-- =====================================
elseif isVCCUU(word) then
male = stem .. "aa"
female = stem .. "ituu"
plural = stem .. "itoota"
-- =====================================
-- 4. V + cuu
-- =====================================
elseif word:match("cuu$") then
local base = word:sub(1, #word - 3)
male = base .. "caa"
female = base .. "ccuu"
plural = base .. "ccitoota"
-- =====================================
-- 5. [d j x t]uu rule
-- =====================================
elseif word:match("[djxt]uu$") then
local base = word:sub(1, #word - 2)
local root = base:sub(1, #base - 1)
local c = word:sub(#word - 2, #word - 2)
-- JS has same outputs for both branches; keep that
male = base .. "aa"
female = base .. c .. "uu"
plural = base .. c .. "ota"
-- =====================================
-- 6. V + buu / guu
-- =====================================
elseif word:match("[bg]uu$") then
local base = word:sub(1, #word - 2)
local root = base:sub(1, #base - 1)
male = base .. "aa"
female = base .. "duu"
plural = base .. "dota"
-- =====================================
-- 7. [fklmnprsvz]uu
-- =====================================
elseif word:match("[fklmnprsvz]uu$") then
local base = word:sub(1, #word - 2)
male = base .. "aa"
female = base .. "tuu"
plural = base .. "tota"
-- =====================================
-- 8. V + quu / phuu
-- =====================================
elseif word:match("(q)uu$") then
local base = word:sub(1, #word - 2)
male = base .. "aa"
female = base .. "xuu"
plural = base .. "xota"
elseif word:match("(ph)uu$") then
local base = word:sub(1, #word - 2)
male = base .. "aa"
female = base .. "xuu"
plural = base .. "xota"
elseif word:match("(zy)uu$") then
local base = word:sub(1, #word - 2)
male = base .. "aa"
female = base .. "xuu"
plural = base .. "xota"
else
return "Rule kanaaf hin jiru."
end
-- Match JS table output
return table.concat({
'<table border="1" cellpadding="8" cellspacing="0">',
'<tr><th>Type</th><th>Word</th></tr>',
'<tr><td>Verb</td><td>', htmlEscape(word), '</td></tr>',
'<tr><td>Male Adjective</td><td>', htmlEscape(male), '</td></tr>',
'<tr><td>Female Adjective</td><td>', htmlEscape(female), '</td></tr>',
'<tr><td>Plural Adjective</td><td>', htmlEscape(plural), '</td></tr>',
'</table>'
})
end
return p
1nom0r9v8pj9chatturhiua5qtnu15n
Template:Om-adj-v
10
62061
81912
2026-06-26T18:45:19Z
EyobAbebe7
3540
Created page with "{{#invoke:Om-adje-v|generate|verb=gochuu}}"
81912
wikitext
text/x-wiki
{{#invoke:Om-adje-v|generate|verb=gochuu}}
lhcump21dkhjzcf49dxn0001pxqv6wa
81913
81912
2026-06-26T18:47:31Z
EyobAbebe7
3540
81913
wikitext
text/x-wiki
{{#invoke:adjective|generate|verb=gochuu}}
2qyqtd86l2zyut72g4rp07uexsut4a4
81915
81913
2026-06-26T20:48:13Z
EyobAbebe7
3540
/* */
81915
wikitext
text/x-wiki
{{#invoke:adjective|generate}}
fs4kybdxonu2ot9gx9asxda6fbt9z2h
Module:adjective
828
62062
81914
2026-06-26T20:39:14Z
EyobAbebe7
3540
Created page with "local export = {} -- ===================================== -- 1. HELPER: Check for long vowels (aa, ee, ii, uu) -- (JS: /(aa|ee|ii|uu)$/.test) -- ===================================== local function ends_with_long_vowel(str) return mw.ustring.match(str, "aa$") or mw.ustring.match(str, "ee$") or mw.ustring.match(str, "ii$") or mw.ustring.match(str, "uu$") end -- ===================================== -- 2. TOKENIZER (ch, dh, ny, ph..."
81914
Scribunto
text/plain
local export = {}
-- =====================================
-- 1. HELPER: Check for long vowels (aa, ee, ii, uu)
-- (JS: /(aa|ee|ii|uu)$/.test)
-- =====================================
local function ends_with_long_vowel(str)
return mw.ustring.match(str, "aa$") or
mw.ustring.match(str, "ee$") or
mw.ustring.match(str, "ii$") or
mw.ustring.match(str, "uu$")
end
-- =====================================
-- 2. TOKENIZER (ch, dh, ny, ph, sh, ts, zy)
-- =====================================
local function tokenize_oromo(text)
local digraphs = {
["ch"] = true, ["dh"] = true, ["ny"] = true,
["ph"] = true, ["sh"] = true, ["ts"] = true, ["zy"] = true
}
local tokens = {}
local i = 1
local len = mw.ustring.len(text)
while i <= len do
local two = mw.ustring.sub(text, i, i + 1)
if mw.ustring.len(two) == 2 and digraphs[two] then
table.insert(tokens, two)
i = i + 2
else
table.insert(tokens, mw.ustring.sub(text, i, i))
i = i + 1
end
end
return tokens
end
-- =====================================
-- 3. VCC DETECTOR
-- =====================================
local function is_vccuu(word)
local stem = mw.ustring.sub(word, 1, -3) -- removes 'uu'
local tokens = tokenize_oromo(stem)
local vowels = { a=true, e=true, i=true, o=true, u=true }
local consonants_at_end = 0
for i = #tokens, 1, -1 do
if vowels[tokens[i]] then
break
end
consonants_at_end = consonants_at_end + 1
end
return consonants_at_end >= 2
end
-- =====================================
-- 4. LONG VOWEL + CONSONANT CHECK
-- =====================================
local function ends_with_long_vowel_plus_consonant(stem)
local tokens = tokenize_oromo(stem)
local len = #tokens
if len < 2 then return false end
local last = tokens[len]
local prev = tokens[len - 1]
local vowels = { a=true, e=true, i=true, o=true, u=true }
local is_consonant = not vowels[last]
local is_long_vowel = (prev == "aa" or prev == "ee" or prev == "ii" or prev == "oo" or prev == "uu")
-- Fallback yoo tokenizer qubee wal-fakkaataa addaan baase
if not is_long_vowel and len >= 3 then
local prev2 = tokens[len - 2]
if vowels[prev] and prev == prev2 then
is_long_vowel = true
end
end
return is_long_vowel and is_consonant
end
-- =====================================
-- 5. MAIN FUNCTION: Generate Forms
-- =====================================
function export.get_adjective_forms(word)
if not word or word == "" then
return { error = "Verb galchi." }
end
word = mw.ustring.lower(mw.text.trim(word))
if not mw.ustring.match(word, "uu$") then
return { error = "Verb Afaan Oromoo 'uu'n xumuramuu qaba." }
end
local male = ""
local female = ""
local plural = ""
local stem2 = mw.ustring.sub(word, 1, -3) -- Default stem (removes 'uu')
-- =====================================
-- EXACT oochuu, eechuu, ichuu, uchuu
-- =====================================
if mw.ustring.match(word, "eechuu$") or mw.ustring.match(word, "ichuu$") or
mw.ustring.match(word, "uchuu$") or mw.ustring.match(word, "oochuu$") then
local stem_chuu = mw.ustring.sub(word, 1, -5)
male = stem_chuu .. "chaa"
female = stem_chuu .. "chituu"
plural = stem_chuu .. "chitoota"
-- =====================================
-- jjechuu, jechuu, ochuu
-- =====================================
elseif mw.ustring.match(word, "jjechuu$") then
local root = mw.ustring.sub(word, 1, -7)
male = root .. "etaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "jechuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "edhaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "ochuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "odhaa"
female = root .. "ootuu"
plural = root .. "ootota"
-- =====================================
-- ', w, y, h endings ['wyh]uu
-- =====================================
elseif mw.ustring.match(word, "oo['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "ssuu"
plural = root .. "ssota"
elseif mw.ustring.match(word, "o['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
elseif mw.ustring.match(word, "aa['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -4)
male = stem2 .. "aa"
female = root .. "ooftuu"
plural = root .. "ooftota"
elseif mw.ustring.match(word, "[aeio]ta['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "oftuu"
plural = root .. "oftoota"
elseif mw.ustring.match(word, "[aeiou]ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "a'oota"
elseif mw.ustring.match(word, "ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "eessota"
elseif mw.ustring.match(word, "a['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "atuu"
plural = root .. "atota"
elseif mw.ustring.match(word, "ii['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "i['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "toota"
elseif mw.ustring.match(word, "e['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "etuu"
plural = root .. "etota"
elseif mw.ustring.match(word, "u['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
-- =====================================
-- dhuu endings
-- =====================================
elseif mw.ustring.match(word, "[ae]dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "iidhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "idhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "ituu"
plural = root .. "itota"
elseif mw.ustring.match(word, "udhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
elseif mw.ustring.match(word, "dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
-- =====================================
-- nyuu, shuu
-- =====================================
elseif mw.ustring.match(word, "nyuu$") then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
elseif mw.ustring.match(word, "shuu$") then
male = stem2 .. "aa"
female = stem2 .. "tuu"
plural = stem2 .. "toota"
-- =====================================
-- Consonant + chuu
-- =====================================
elseif mw.ustring.match(word, "[bcdfghjklmnpqrstvwxyz]chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "chaa"
female = base .. "chituu"
plural = base .. (is_long and "chitota" or "chitoota")
-- =====================================
-- General chuu
-- =====================================
elseif mw.ustring.match(word, "chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "taa"
female = base .. "ttuu"
plural = base .. (is_long and "ttota" or "ttoota")
-- =====================================
-- V + CC + uu
-- =====================================
elseif is_vccuu(word) then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
-- =====================================
-- cuu
-- =====================================
elseif mw.ustring.match(word, "cuu$") then
local base = mw.ustring.sub(word, 1, -4)
male = base .. "caa"
female = base .. "ccuu"
plural = base .. "ccitoota"
-- =====================================
-- [d j x t]uu
-- =====================================
elseif mw.ustring.match(word, "[djxt]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local c = mw.ustring.sub(word, -3, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. c .. "uu"
plural = base .. c .. (is_long and "ota" or "oota")
-- =====================================
-- [bg]uu
-- =====================================
elseif mw.ustring.match(word, "[bg]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "duu"
plural = base .. (is_long and "dota" or "doota")
-- =====================================
-- [fklmnprsvz]uu
-- =====================================
elseif mw.ustring.match(word, "[fklmnprsvz]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "tuu"
plural = base .. (is_long and "tota" or "toota")
-- =====================================
-- quu / phuu / zyuu
-- =====================================
elseif mw.ustring.match(word, "quu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
elseif mw.ustring.match(word, "phuu$") or mw.ustring.match(word, "zyuu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
-- =====================================
-- RULE NOT FOUND (Fallback)
-- =====================================
else
return { error = "Rule kanaaf hin jiru." }
end
return { male = male, female = female, plural = plural, word = word }
end
-- =====================================
-- 6. TEMPLATE ENTRY POINT (HTML OUPUT)
-- =====================================
function export.generate(frame)
local args = frame.args
if not args[1] and not args.word then
args = frame:getParent().args
end
local word = args[1] or args.word
local results = export.get_adjective_forms(word)
if results.error then
return "<strong class='error'>" .. results.error .. "</strong>"
end
-- HTML Gabatee Uumuu
local html = mw.html.create('table')
:attr('border', '1')
:attr('cellpadding', '8')
:attr('cellspacing', '0')
:tag('tr')
:tag('th'):wikitext('Type'):done()
:tag('th'):wikitext('Word'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Verb'):done()
:tag('td'):wikitext(results.word):done()
:done()
:tag('tr')
:tag('td'):wikitext('Male Adjective'):done()
:tag('td'):wikitext(results.male):done()
:done()
:tag('tr')
:tag('td'):wikitext('Female Adjective'):done()
:tag('td'):wikitext(results.female):done()
:done()
:tag('tr')
:tag('td'):wikitext('Plural Adjective'):done()
:tag('td'):wikitext(results.plural):done()
:done()
return tostring(html)
end
khhl11q25f2szefg6fzr04yz9rzix1r
81916
81914
2026-06-26T20:58:36Z
EyobAbebe7
3540
81916
Scribunto
text/plain
local export = {}
-- =====================================
-- 1. HELPER: Check for long vowels (aa, ee, ii, uu)
-- (JS: /(aa|ee|ii|uu)$/.test)
-- =====================================
local function ends_with_long_vowel(str)
return mw.ustring.match(str, "aa$") or
mw.ustring.match(str, "ee$") or
mw.ustring.match(str, "ii$") or
mw.ustring.match(str, "uu$")
end
-- =====================================
-- 2. TOKENIZER (ch, dh, ny, ph, sh, ts, zy)
-- =====================================
local function tokenize_oromo(text)
local digraphs = {
["ch"] = true, ["dh"] = true, ["ny"] = true,
["ph"] = true, ["sh"] = true, ["ts"] = true, ["zy"] = true
}
local tokens = {}
local i = 1
local len = mw.ustring.len(text)
while i <= len do
local two = mw.ustring.sub(text, i, i + 1)
if mw.ustring.len(two) == 2 and digraphs[two] then
table.insert(tokens, two)
i = i + 2
else
table.insert(tokens, mw.ustring.sub(text, i, i))
i = i + 1
end
end
return tokens
end
-- =====================================
-- 3. VCC DETECTOR
-- =====================================
local function is_vccuu(word)
local stem = mw.ustring.sub(word, 1, -3) -- removes 'uu'
local tokens = tokenize_oromo(stem)
local vowels = { a=true, e=true, i=true, o=true, u=true }
local consonants_at_end = 0
for i = #tokens, 1, -1 do
if vowels[tokens[i]] then
break
end
consonants_at_end = consonants_at_end + 1
end
return consonants_at_end >= 2
end
-- =====================================
-- 4. LONG VOWEL + CONSONANT CHECK
-- =====================================
local function ends_with_long_vowel_plus_consonant(stem)
local tokens = tokenize_oromo(stem)
local len = #tokens
if len < 2 then return false end
local last = tokens[len]
local prev = tokens[len - 1]
local vowels = { a=true, e=true, i=true, o=true, u=true }
local is_consonant = not vowels[last]
local is_long_vowel = (prev == "aa" or prev == "ee" or prev == "ii" or prev == "oo" or prev == "uu")
-- Fallback yoo tokenizer qubee wal-fakkaataa addaan baase
if not is_long_vowel and len >= 3 then
local prev2 = tokens[len - 2]
if vowels[prev] and prev == prev2 then
is_long_vowel = true
end
end
return is_long_vowel and is_consonant
end
-- =====================================
-- 5. MAIN FUNCTION: Generate Forms
-- =====================================
function export.get_adjective_forms(word)
if not word or word == "" then
return { error = "Verb galchi." }
end
word = mw.ustring.lower(mw.text.trim(word))
if not mw.ustring.match(word, "uu$") then
return { error = "Verb Afaan Oromoo 'uu'n xumuramuu qaba." }
end
local male = ""
local female = ""
local plural = ""
local stem2 = mw.ustring.sub(word, 1, -3) -- Default stem (removes 'uu')
-- =====================================
-- EXACT oochuu, eechuu, ichuu, uchuu
-- =====================================
if mw.ustring.match(word, "eechuu$") or mw.ustring.match(word, "ichuu$") or
mw.ustring.match(word, "uchuu$") or mw.ustring.match(word, "oochuu$") then
local stem_chuu = mw.ustring.sub(word, 1, -5)
male = stem_chuu .. "chaa"
female = stem_chuu .. "chituu"
plural = stem_chuu .. "chitoota"
-- =====================================
-- jjechuu, jechuu, ochuu
-- =====================================
elseif mw.ustring.match(word, "jjechuu$") then
local root = mw.ustring.sub(word, 1, -7)
male = root .. "etaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "jechuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "edhaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "ochuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "odhaa"
female = root .. "ootuu"
plural = root .. "ootota"
-- =====================================
-- ', w, y, h endings ['wyh]uu
-- =====================================
elseif mw.ustring.match(word, "oo['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "ssuu"
plural = root .. "ssota"
elseif mw.ustring.match(word, "o['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
elseif mw.ustring.match(word, "aa['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -4)
male = stem2 .. "aa"
female = root .. "ooftuu"
plural = root .. "ooftota"
elseif mw.ustring.match(word, "[aeio]ta['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "oftuu"
plural = root .. "oftoota"
elseif mw.ustring.match(word, "[aeiou]ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "a'oota"
elseif mw.ustring.match(word, "ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "eessota"
elseif mw.ustring.match(word, "a['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "atuu"
plural = root .. "atota"
elseif mw.ustring.match(word, "ii['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "i['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "toota"
elseif mw.ustring.match(word, "e['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "etuu"
plural = root .. "etota"
elseif mw.ustring.match(word, "u['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
-- =====================================
-- dhuu endings
-- =====================================
elseif mw.ustring.match(word, "[ae]dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "iidhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "idhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "ituu"
plural = root .. "itota"
elseif mw.ustring.match(word, "udhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
elseif mw.ustring.match(word, "dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
-- =====================================
-- nyuu, shuu
-- =====================================
elseif mw.ustring.match(word, "nyuu$") then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
elseif mw.ustring.match(word, "shuu$") then
male = stem2 .. "aa"
female = stem2 .. "tuu"
plural = stem2 .. "toota"
-- =====================================
-- Consonant + chuu
-- =====================================
elseif mw.ustring.match(word, "[bcdfghjklmnpqrstvwxyz]chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "chaa"
female = base .. "chituu"
plural = base .. (is_long and "chitota" or "chitoota")
-- =====================================
-- General chuu
-- =====================================
elseif mw.ustring.match(word, "chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "taa"
female = base .. "ttuu"
plural = base .. (is_long and "ttota" or "ttoota")
-- =====================================
-- V + CC + uu
-- =====================================
elseif is_vccuu(word) then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
-- =====================================
-- cuu
-- =====================================
elseif mw.ustring.match(word, "cuu$") then
local base = mw.ustring.sub(word, 1, -4)
male = base .. "caa"
female = base .. "ccuu"
plural = base .. "ccitoota"
-- =====================================
-- [d j x t]uu
-- =====================================
elseif mw.ustring.match(word, "[djxt]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local c = mw.ustring.sub(word, -3, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. c .. "uu"
plural = base .. c .. (is_long and "ota" or "oota")
-- =====================================
-- [bg]uu
-- =====================================
elseif mw.ustring.match(word, "[bg]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "duu"
plural = base .. (is_long and "dota" or "doota")
-- =====================================
-- [fklmnprsvz]uu
-- =====================================
elseif mw.ustring.match(word, "[fklmnprsvz]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "tuu"
plural = base .. (is_long and "tota" or "toota")
-- =====================================
-- quu / phuu / zyuu
-- =====================================
elseif mw.ustring.match(word, "quu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
elseif mw.ustring.match(word, "phuu$") or mw.ustring.match(word, "zyuu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
-- =====================================
-- RULE NOT FOUND (Fallback)
-- =====================================
else
return { error = "Rule kanaaf hin jiru." }
end
return { male = male, female = female, plural = plural, word = word }
end
-- =====================================
-- 6. TEMPLATE ENTRY POINT (HTML OUPUT)
-- =====================================
function export.generate(frame)
local args = frame.args
if not args[1] and not args.word then
args = frame:getParent().args
end
local word = args[1] or args.word
local results = export.get_adjective_forms(word)
if results.error then
return "<strong class='error'>" .. results.error .. "</strong>"
end
-- HTML Gabatee Uumuu
local html = mw.html.create('table')
:attr('border', '1')
:attr('cellpadding', '8')
:attr('cellspacing', '0')
:tag('tr')
:tag('th'):wikitext('Type'):done()
:tag('th'):wikitext('Word'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Verb'):done()
:tag('td'):wikitext(results.word):done()
:done()
:tag('tr')
:tag('td'):wikitext('Male Adjective'):done()
:tag('td'):wikitext(results.male):done()
:done()
:tag('tr')
:tag('td'):wikitext('Female Adjective'):done()
:tag('td'):wikitext(results.female):done()
:done()
:tag('tr')
:tag('td'):wikitext('Plural Adjective'):done()
:tag('td'):wikitext(results.plural):done()
:done()
return tostring(html)
end
return export
th4fydgrel0c0f2zarkik2lz6gpzb3e
81919
81916
2026-06-27T03:34:22Z
EyobAbebe7
3540
81919
Scribunto
text/plain
local export = {}
-- =====================================
-- 1. HELPER: Check for long vowels (aa, ee, ii, uu)
-- (JS: /(aa|ee|ii|uu)$/.test)
-- =====================================
local function ends_with_long_vowel(str)
return mw.ustring.match(str, "aa$") or
mw.ustring.match(str, "ee$") or
mw.ustring.match(str, "ii$") or
mw.ustring.match(str, "uu$")
end
-- =====================================
-- 2. TOKENIZER (ch, dh, ny, ph, sh, ts, zy)
-- =====================================
local function tokenize_oromo(text)
local digraphs = {
["ch"] = true, ["dh"] = true, ["ny"] = true,
["ph"] = true, ["sh"] = true, ["ts"] = true, ["zy"] = true
}
local tokens = {}
local i = 1
local len = mw.ustring.len(text)
while i <= len do
local two = mw.ustring.sub(text, i, i + 1)
if mw.ustring.len(two) == 2 and digraphs[two] then
table.insert(tokens, two)
i = i + 2
else
table.insert(tokens, mw.ustring.sub(text, i, i))
i = i + 1
end
end
return tokens
end
-- =====================================
-- 3. VCC DETECTOR
-- =====================================
local function is_vccuu(word)
local stem = mw.ustring.sub(word, 1, -3) -- removes 'uu'
local tokens = tokenize_oromo(stem)
local vowels = { a=true, e=true, i=true, o=true, u=true }
local consonants_at_end = 0
for i = #tokens, 1, -1 do
if vowels[tokens[i]] then
break
end
consonants_at_end = consonants_at_end + 1
end
return consonants_at_end >= 2
end
-- =====================================
-- 4. LONG VOWEL + CONSONANT CHECK
-- =====================================
local function ends_with_long_vowel_plus_consonant(stem)
local tokens = tokenize_oromo(stem)
local len = #tokens
if len < 2 then return false end
local last = tokens[len]
local prev = tokens[len - 1]
local vowels = { a=true, e=true, i=true, o=true, u=true }
local is_consonant = not vowels[last]
local is_long_vowel = (prev == "aa" or prev == "ee" or prev == "ii" or prev == "oo" or prev == "uu")
-- Fallback yoo tokenizer qubee wal-fakkaataa addaan baase
if not is_long_vowel and len >= 3 then
local prev2 = tokens[len - 2]
if vowels[prev] and prev == prev2 then
is_long_vowel = true
end
end
return is_long_vowel and is_consonant
end
-- =====================================
-- 5. MAIN FUNCTION: Generate Forms
-- =====================================
function export.get_adjective_forms(word)
if not word or word == "" then
return { error = "Verb galchi." }
end
word = mw.ustring.lower(mw.text.trim(word))
if not mw.ustring.match(word, "uu$") then
return { error = "Verb Afaan Oromoo 'uu'n xumuramuu qaba." }
end
local male = ""
local female = ""
local plural = ""
local stem2 = mw.ustring.sub(word, 1, -3) -- Default stem (removes 'uu')
-- =====================================
-- EXACT oochuu, eechuu, ichuu, uchuu
-- =====================================
if mw.ustring.match(word, "eechuu$") or mw.ustring.match(word, "ichuu$") or
mw.ustring.match(word, "uchuu$") or mw.ustring.match(word, "oochuu$") then
local stem_chuu = mw.ustring.sub(word, 1, -5)
male = stem_chuu .. "chaa"
female = stem_chuu .. "chituu"
plural = stem_chuu .. "chitoota"
-- =====================================
-- jjechuu, jechuu, ochuu
-- =====================================
elseif mw.ustring.match(word, "jjechuu$") then
local root = mw.ustring.sub(word, 1, -7)
male = root .. "etaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "jechuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "edhaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "ochuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "odhaa"
female = root .. "ootuu"
plural = root .. "ootota"
-- =====================================
-- ', w, y, h endings ['wyh]uu
-- =====================================
elseif mw.ustring.match(word, "oo['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "ssuu"
plural = root .. "ssota"
elseif mw.ustring.match(word, "o['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
elseif mw.ustring.match(word, "aa['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -4)
male = stem2 .. "aa"
female = root .. "ooftuu"
plural = root .. "ooftota"
elseif mw.ustring.match(word, "[aeio]ta['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "oftuu"
plural = root .. "oftoota"
elseif mw.ustring.match(word, "[aeiou]ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "a'oota"
elseif mw.ustring.match(word, "ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "eessota"
elseif mw.ustring.match(word, "a['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "atuu"
plural = root .. "atota"
elseif mw.ustring.match(word, "ii['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "i['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "toota"
elseif mw.ustring.match(word, "e['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "etuu"
plural = root .. "etota"
elseif mw.ustring.match(word, "u['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
-- =====================================
-- dhuu endings
-- =====================================
elseif mw.ustring.match(word, "[ae]dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "iidhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "idhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "ituu"
plural = root .. "itota"
elseif mw.ustring.match(word, "udhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
elseif mw.ustring.match(word, "dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
-- =====================================
-- nyuu, shuu
-- =====================================
elseif mw.ustring.match(word, "nyuu$") then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
elseif mw.ustring.match(word, "shuu$") then
male = stem2 .. "aa"
female = stem2 .. "tuu"
plural = stem2 .. "toota"
-- =====================================
-- Consonant + chuu
-- =====================================
elseif mw.ustring.match(word, "[bcdfghjklmnpqrstvwxyz]chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "chaa"
female = base .. "chituu"
plural = base .. (is_long and "chitota" or "chitoota")
-- =====================================
-- General chuu
-- =====================================
elseif mw.ustring.match(word, "chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "taa"
female = base .. "ttuu"
plural = base .. (is_long and "ttota" or "ttoota")
-- =====================================
-- V + CC + uu
-- =====================================
elseif is_vccuu(word) then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
-- =====================================
-- cuu
-- =====================================
elseif mw.ustring.match(word, "cuu$") then
local base = mw.ustring.sub(word, 1, -4)
male = base .. "caa"
female = base .. "ccuu"
plural = base .. "ccitoota"
-- =====================================
-- [d j x t]uu
-- =====================================
elseif mw.ustring.match(word, "[djxt]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local c = mw.ustring.sub(word, -3, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. c .. "uu"
plural = base .. c .. (is_long and "ota" or "oota")
-- =====================================
-- [bg]uu
-- =====================================
elseif mw.ustring.match(word, "[bg]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "duu"
plural = base .. (is_long and "dota" or "doota")
-- =====================================
-- [fklmnprsvz]uu
-- =====================================
elseif mw.ustring.match(word, "[fklmnprsvz]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "tuu"
plural = base .. (is_long and "tota" or "toota")
-- =====================================
-- quu / phuu / zyuu
-- =====================================
elseif mw.ustring.match(word, "quu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
elseif mw.ustring.match(word, "phuu$") or mw.ustring.match(word, "zyuu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
-- =====================================
-- RULE NOT FOUND (Fallback)
-- =====================================
else
return { error = "Rule kanaaf hin jiru." }
end
return { male = male, female = female, plural = plural, word = word }
end
-- =====================================
-- 6. TEMPLATE ENTRY POINT (HTML OUPUT)
-- =====================================
function export.generate(frame)
local args = frame.args
if not args[1] and not args.word and not args.verb then
args = frame:getParent().args
end
-- Parameter irraa jecha fudhachuu yaala
local word = args[1] or args.word or args.verb
-- Yoo parameter'n hin kennamne, ofumaan maqaa fuula sanaa (PAGENAME) fudhata
if not word or word == "" then
word = mw.title.getCurrentTitle().text
end
-- HTML Gabatee Uumuu
local html = mw.html.create('table')
:attr('border', '1')
:attr('cellpadding', '8')
:attr('cellspacing', '0')
:tag('tr')
:tag('th'):wikitext('Type'):done()
:tag('th'):wikitext('Word'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Verb'):done()
:tag('td'):wikitext(results.word):done()
:done()
:tag('tr')
:tag('td'):wikitext('Male Adjective'):done()
:tag('td'):wikitext(results.male):done()
:done()
:tag('tr')
:tag('td'):wikitext('Female Adjective'):done()
:tag('td'):wikitext(results.female):done()
:done()
:tag('tr')
:tag('td'):wikitext('Plural Adjective'):done()
:tag('td'):wikitext(results.plural):done()
:done()
return tostring(html)
end
return export
ijjo997jn74822zxut0dwz2fwp01k5u
81920
81919
2026-06-27T03:42:29Z
EyobAbebe7
3540
81920
Scribunto
text/plain
local export = {}
-- =====================================
-- 1. HELPER: Check for long vowels (aa, ee, ii, uu)
-- (JS: /(aa|ee|ii|uu)$/.test)
-- =====================================
local function ends_with_long_vowel(str)
return mw.ustring.match(str, "aa$") or
mw.ustring.match(str, "ee$") or
mw.ustring.match(str, "ii$") or
mw.ustring.match(str, "uu$")
end
-- =====================================
-- 2. TOKENIZER (ch, dh, ny, ph, sh, ts, zy)
-- =====================================
local function tokenize_oromo(text)
local digraphs = {
["ch"] = true, ["dh"] = true, ["ny"] = true,
["ph"] = true, ["sh"] = true, ["ts"] = true, ["zy"] = true
}
local tokens = {}
local i = 1
local len = mw.ustring.len(text)
while i <= len do
local two = mw.ustring.sub(text, i, i + 1)
if mw.ustring.len(two) == 2 and digraphs[two] then
table.insert(tokens, two)
i = i + 2
else
table.insert(tokens, mw.ustring.sub(text, i, i))
i = i + 1
end
end
return tokens
end
-- =====================================
-- 3. VCC DETECTOR
-- =====================================
local function is_vccuu(word)
local stem = mw.ustring.sub(word, 1, -3) -- removes 'uu'
local tokens = tokenize_oromo(stem)
local vowels = { a=true, e=true, i=true, o=true, u=true }
local consonants_at_end = 0
for i = #tokens, 1, -1 do
if vowels[tokens[i]] then
break
end
consonants_at_end = consonants_at_end + 1
end
return consonants_at_end >= 2
end
-- =====================================
-- 4. LONG VOWEL + CONSONANT CHECK
-- =====================================
local function ends_with_long_vowel_plus_consonant(stem)
local tokens = tokenize_oromo(stem)
local len = #tokens
if len < 2 then return false end
local last = tokens[len]
local prev = tokens[len - 1]
local vowels = { a=true, e=true, i=true, o=true, u=true }
local is_consonant = not vowels[last]
local is_long_vowel = (prev == "aa" or prev == "ee" or prev == "ii" or prev == "oo" or prev == "uu")
-- Fallback yoo tokenizer qubee wal-fakkaataa addaan baase
if not is_long_vowel and len >= 3 then
local prev2 = tokens[len - 2]
if vowels[prev] and prev == prev2 then
is_long_vowel = true
end
end
return is_long_vowel and is_consonant
end
-- =====================================
-- 5. MAIN FUNCTION: Generate Forms
-- =====================================
function export.get_adjective_forms(word)
if not word or word == "" then
return { error = "Verb galchi." }
end
word = mw.ustring.lower(mw.text.trim(word))
if not mw.ustring.match(word, "uu$") then
return { error = "Verb Afaan Oromoo 'uu'n xumuramuu qaba." }
end
local male = ""
local female = ""
local plural = ""
local stem2 = mw.ustring.sub(word, 1, -3) -- Default stem (removes 'uu')
-- =====================================
-- EXACT oochuu, eechuu, ichuu, uchuu
-- =====================================
if mw.ustring.match(word, "eechuu$") or mw.ustring.match(word, "ichuu$") or
mw.ustring.match(word, "uchuu$") or mw.ustring.match(word, "oochuu$") then
local stem_chuu = mw.ustring.sub(word, 1, -5)
male = stem_chuu .. "chaa"
female = stem_chuu .. "chituu"
plural = stem_chuu .. "chitoota"
-- =====================================
-- jjechuu, jechuu, ochuu
-- =====================================
elseif mw.ustring.match(word, "jjechuu$") then
local root = mw.ustring.sub(word, 1, -7)
male = root .. "etaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "jechuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "edhaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "ochuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "odhaa"
female = root .. "ootuu"
plural = root .. "ootota"
-- =====================================
-- ', w, y, h endings ['wyh]uu
-- =====================================
elseif mw.ustring.match(word, "oo['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "ssuu"
plural = root .. "ssota"
elseif mw.ustring.match(word, "o['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
elseif mw.ustring.match(word, "aa['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -4)
male = stem2 .. "aa"
female = root .. "ooftuu"
plural = root .. "ooftota"
elseif mw.ustring.match(word, "[aeio]ta['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "oftuu"
plural = root .. "oftoota"
elseif mw.ustring.match(word, "[aeiou]ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "a'oota"
elseif mw.ustring.match(word, "ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "eessota"
elseif mw.ustring.match(word, "a['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "atuu"
plural = root .. "atota"
elseif mw.ustring.match(word, "ii['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "i['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "toota"
elseif mw.ustring.match(word, "e['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "etuu"
plural = root .. "etota"
elseif mw.ustring.match(word, "u['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
-- =====================================
-- dhuu endings
-- =====================================
elseif mw.ustring.match(word, "[ae]dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "iidhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "idhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "ituu"
plural = root .. "itota"
elseif mw.ustring.match(word, "udhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
elseif mw.ustring.match(word, "dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
-- =====================================
-- nyuu, shuu
-- =====================================
elseif mw.ustring.match(word, "nyuu$") then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
elseif mw.ustring.match(word, "shuu$") then
male = stem2 .. "aa"
female = stem2 .. "tuu"
plural = stem2 .. "toota"
-- =====================================
-- Consonant + chuu
-- =====================================
elseif mw.ustring.match(word, "[bcdfghjklmnpqrstvwxyz]chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "chaa"
female = base .. "chituu"
plural = base .. (is_long and "chitota" or "chitoota")
-- =====================================
-- General chuu
-- =====================================
elseif mw.ustring.match(word, "chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "taa"
female = base .. "ttuu"
plural = base .. (is_long and "ttota" or "ttoota")
-- =====================================
-- V + CC + uu
-- =====================================
elseif is_vccuu(word) then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
-- =====================================
-- cuu
-- =====================================
elseif mw.ustring.match(word, "cuu$") then
local base = mw.ustring.sub(word, 1, -4)
male = base .. "caa"
female = base .. "ccuu"
plural = base .. "ccitoota"
-- =====================================
-- [d j x t]uu
-- =====================================
elseif mw.ustring.match(word, "[djxt]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local c = mw.ustring.sub(word, -3, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. c .. "uu"
plural = base .. c .. (is_long and "ota" or "oota")
-- =====================================
-- [bg]uu
-- =====================================
elseif mw.ustring.match(word, "[bg]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "duu"
plural = base .. (is_long and "dota" or "doota")
-- =====================================
-- [fklmnprsvz]uu
-- =====================================
elseif mw.ustring.match(word, "[fklmnprsvz]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "tuu"
plural = base .. (is_long and "tota" or "toota")
-- =====================================
-- quu / phuu / zyuu
-- =====================================
elseif mw.ustring.match(word, "quu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
elseif mw.ustring.match(word, "phuu$") or mw.ustring.match(word, "zyuu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
-- =====================================
-- RULE NOT FOUND (Fallback)
-- =====================================
else
return { error = "Rule kanaaf hin jiru." }
end
return { male = male, female = female, plural = plural, word = word }
end
-- =====================================
-- 6. TEMPLATE ENTRY POINT (HTML OUPUT)
-- =====================================
function export.generate(frame)
local args = frame.args
if not args[1] and not args.word and not args.verb then
args = frame:getParent().args
end
-- Parameter irraa jecha fudhachuu yaala
local word = args[1] or args.word or args.verb
-- Yoo parameter'n hin kennamne, ofumaan maqaa fuula sanaa (PAGENAME) fudhata
if not word or word == "" then
word = mw.title.getCurrentTitle().text
end
-- HTML Gabatee Uumuu (Jechoota hunda Link gochuu: [[jechicha]])
local html = mw.html.create('table')
:attr('border', '1')
:attr('cellpadding', '8')
:attr('cellspacing', '0')
:tag('tr')
:tag('th'):wikitext('Type'):done()
:tag('th'):wikitext('Word'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Verb'):done()
:tag('td'):wikitext('[[' .. results.word .. ']]'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Male Adjective'):done()
:tag('td'):wikitext('[[' .. results.male .. ']]'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Female Adjective'):done()
:tag('td'):wikitext('[[' .. results.female .. ']]'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Plural Adjective'):done()
:tag('td'):wikitext('[[' .. results.plural .. ']]'):done()
:done()
return tostring(html)
end
return export
jot5c7tssa7myqeqc9k63l2zd4v1rf2
81921
81920
2026-06-27T03:44:44Z
EyobAbebe7
3540
Undid revision [[Special:Diff/81920|81920]] by [[Special:Contributions/EyobAbebe7|EyobAbebe7]] ([[User talk:EyobAbebe7|talk]])
81921
Scribunto
text/plain
local export = {}
-- =====================================
-- 1. HELPER: Check for long vowels (aa, ee, ii, uu)
-- (JS: /(aa|ee|ii|uu)$/.test)
-- =====================================
local function ends_with_long_vowel(str)
return mw.ustring.match(str, "aa$") or
mw.ustring.match(str, "ee$") or
mw.ustring.match(str, "ii$") or
mw.ustring.match(str, "uu$")
end
-- =====================================
-- 2. TOKENIZER (ch, dh, ny, ph, sh, ts, zy)
-- =====================================
local function tokenize_oromo(text)
local digraphs = {
["ch"] = true, ["dh"] = true, ["ny"] = true,
["ph"] = true, ["sh"] = true, ["ts"] = true, ["zy"] = true
}
local tokens = {}
local i = 1
local len = mw.ustring.len(text)
while i <= len do
local two = mw.ustring.sub(text, i, i + 1)
if mw.ustring.len(two) == 2 and digraphs[two] then
table.insert(tokens, two)
i = i + 2
else
table.insert(tokens, mw.ustring.sub(text, i, i))
i = i + 1
end
end
return tokens
end
-- =====================================
-- 3. VCC DETECTOR
-- =====================================
local function is_vccuu(word)
local stem = mw.ustring.sub(word, 1, -3) -- removes 'uu'
local tokens = tokenize_oromo(stem)
local vowels = { a=true, e=true, i=true, o=true, u=true }
local consonants_at_end = 0
for i = #tokens, 1, -1 do
if vowels[tokens[i]] then
break
end
consonants_at_end = consonants_at_end + 1
end
return consonants_at_end >= 2
end
-- =====================================
-- 4. LONG VOWEL + CONSONANT CHECK
-- =====================================
local function ends_with_long_vowel_plus_consonant(stem)
local tokens = tokenize_oromo(stem)
local len = #tokens
if len < 2 then return false end
local last = tokens[len]
local prev = tokens[len - 1]
local vowels = { a=true, e=true, i=true, o=true, u=true }
local is_consonant = not vowels[last]
local is_long_vowel = (prev == "aa" or prev == "ee" or prev == "ii" or prev == "oo" or prev == "uu")
-- Fallback yoo tokenizer qubee wal-fakkaataa addaan baase
if not is_long_vowel and len >= 3 then
local prev2 = tokens[len - 2]
if vowels[prev] and prev == prev2 then
is_long_vowel = true
end
end
return is_long_vowel and is_consonant
end
-- =====================================
-- 5. MAIN FUNCTION: Generate Forms
-- =====================================
function export.get_adjective_forms(word)
if not word or word == "" then
return { error = "Verb galchi." }
end
word = mw.ustring.lower(mw.text.trim(word))
if not mw.ustring.match(word, "uu$") then
return { error = "Verb Afaan Oromoo 'uu'n xumuramuu qaba." }
end
local male = ""
local female = ""
local plural = ""
local stem2 = mw.ustring.sub(word, 1, -3) -- Default stem (removes 'uu')
-- =====================================
-- EXACT oochuu, eechuu, ichuu, uchuu
-- =====================================
if mw.ustring.match(word, "eechuu$") or mw.ustring.match(word, "ichuu$") or
mw.ustring.match(word, "uchuu$") or mw.ustring.match(word, "oochuu$") then
local stem_chuu = mw.ustring.sub(word, 1, -5)
male = stem_chuu .. "chaa"
female = stem_chuu .. "chituu"
plural = stem_chuu .. "chitoota"
-- =====================================
-- jjechuu, jechuu, ochuu
-- =====================================
elseif mw.ustring.match(word, "jjechuu$") then
local root = mw.ustring.sub(word, 1, -7)
male = root .. "etaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "jechuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "edhaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "ochuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "odhaa"
female = root .. "ootuu"
plural = root .. "ootota"
-- =====================================
-- ', w, y, h endings ['wyh]uu
-- =====================================
elseif mw.ustring.match(word, "oo['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "ssuu"
plural = root .. "ssota"
elseif mw.ustring.match(word, "o['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
elseif mw.ustring.match(word, "aa['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -4)
male = stem2 .. "aa"
female = root .. "ooftuu"
plural = root .. "ooftota"
elseif mw.ustring.match(word, "[aeio]ta['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "oftuu"
plural = root .. "oftoota"
elseif mw.ustring.match(word, "[aeiou]ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "a'oota"
elseif mw.ustring.match(word, "ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "eessota"
elseif mw.ustring.match(word, "a['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "atuu"
plural = root .. "atota"
elseif mw.ustring.match(word, "ii['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "i['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "toota"
elseif mw.ustring.match(word, "e['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "etuu"
plural = root .. "etota"
elseif mw.ustring.match(word, "u['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
-- =====================================
-- dhuu endings
-- =====================================
elseif mw.ustring.match(word, "[ae]dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "iidhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "idhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "ituu"
plural = root .. "itota"
elseif mw.ustring.match(word, "udhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
elseif mw.ustring.match(word, "dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
-- =====================================
-- nyuu, shuu
-- =====================================
elseif mw.ustring.match(word, "nyuu$") then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
elseif mw.ustring.match(word, "shuu$") then
male = stem2 .. "aa"
female = stem2 .. "tuu"
plural = stem2 .. "toota"
-- =====================================
-- Consonant + chuu
-- =====================================
elseif mw.ustring.match(word, "[bcdfghjklmnpqrstvwxyz]chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "chaa"
female = base .. "chituu"
plural = base .. (is_long and "chitota" or "chitoota")
-- =====================================
-- General chuu
-- =====================================
elseif mw.ustring.match(word, "chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "taa"
female = base .. "ttuu"
plural = base .. (is_long and "ttota" or "ttoota")
-- =====================================
-- V + CC + uu
-- =====================================
elseif is_vccuu(word) then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
-- =====================================
-- cuu
-- =====================================
elseif mw.ustring.match(word, "cuu$") then
local base = mw.ustring.sub(word, 1, -4)
male = base .. "caa"
female = base .. "ccuu"
plural = base .. "ccitoota"
-- =====================================
-- [d j x t]uu
-- =====================================
elseif mw.ustring.match(word, "[djxt]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local c = mw.ustring.sub(word, -3, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. c .. "uu"
plural = base .. c .. (is_long and "ota" or "oota")
-- =====================================
-- [bg]uu
-- =====================================
elseif mw.ustring.match(word, "[bg]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "duu"
plural = base .. (is_long and "dota" or "doota")
-- =====================================
-- [fklmnprsvz]uu
-- =====================================
elseif mw.ustring.match(word, "[fklmnprsvz]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "tuu"
plural = base .. (is_long and "tota" or "toota")
-- =====================================
-- quu / phuu / zyuu
-- =====================================
elseif mw.ustring.match(word, "quu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
elseif mw.ustring.match(word, "phuu$") or mw.ustring.match(word, "zyuu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
-- =====================================
-- RULE NOT FOUND (Fallback)
-- =====================================
else
return { error = "Rule kanaaf hin jiru." }
end
return { male = male, female = female, plural = plural, word = word }
end
-- =====================================
-- 6. TEMPLATE ENTRY POINT (HTML OUPUT)
-- =====================================
function export.generate(frame)
local args = frame.args
if not args[1] and not args.word and not args.verb then
args = frame:getParent().args
end
-- Parameter irraa jecha fudhachuu yaala
local word = args[1] or args.word or args.verb
-- Yoo parameter'n hin kennamne, ofumaan maqaa fuula sanaa (PAGENAME) fudhata
if not word or word == "" then
word = mw.title.getCurrentTitle().text
end
-- HTML Gabatee Uumuu
local html = mw.html.create('table')
:attr('border', '1')
:attr('cellpadding', '8')
:attr('cellspacing', '0')
:tag('tr')
:tag('th'):wikitext('Type'):done()
:tag('th'):wikitext('Word'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Verb'):done()
:tag('td'):wikitext(results.word):done()
:done()
:tag('tr')
:tag('td'):wikitext('Male Adjective'):done()
:tag('td'):wikitext(results.male):done()
:done()
:tag('tr')
:tag('td'):wikitext('Female Adjective'):done()
:tag('td'):wikitext(results.female):done()
:done()
:tag('tr')
:tag('td'):wikitext('Plural Adjective'):done()
:tag('td'):wikitext(results.plural):done()
:done()
return tostring(html)
end
return export
ijjo997jn74822zxut0dwz2fwp01k5u
81922
81921
2026-06-27T03:47:19Z
EyobAbebe7
3540
Undid revision [[Special:Diff/81919|81919]] by [[Special:Contributions/EyobAbebe7|EyobAbebe7]] ([[User talk:EyobAbebe7|talk]])
81922
Scribunto
text/plain
local export = {}
-- =====================================
-- 1. HELPER: Check for long vowels (aa, ee, ii, uu)
-- (JS: /(aa|ee|ii|uu)$/.test)
-- =====================================
local function ends_with_long_vowel(str)
return mw.ustring.match(str, "aa$") or
mw.ustring.match(str, "ee$") or
mw.ustring.match(str, "ii$") or
mw.ustring.match(str, "uu$")
end
-- =====================================
-- 2. TOKENIZER (ch, dh, ny, ph, sh, ts, zy)
-- =====================================
local function tokenize_oromo(text)
local digraphs = {
["ch"] = true, ["dh"] = true, ["ny"] = true,
["ph"] = true, ["sh"] = true, ["ts"] = true, ["zy"] = true
}
local tokens = {}
local i = 1
local len = mw.ustring.len(text)
while i <= len do
local two = mw.ustring.sub(text, i, i + 1)
if mw.ustring.len(two) == 2 and digraphs[two] then
table.insert(tokens, two)
i = i + 2
else
table.insert(tokens, mw.ustring.sub(text, i, i))
i = i + 1
end
end
return tokens
end
-- =====================================
-- 3. VCC DETECTOR
-- =====================================
local function is_vccuu(word)
local stem = mw.ustring.sub(word, 1, -3) -- removes 'uu'
local tokens = tokenize_oromo(stem)
local vowels = { a=true, e=true, i=true, o=true, u=true }
local consonants_at_end = 0
for i = #tokens, 1, -1 do
if vowels[tokens[i]] then
break
end
consonants_at_end = consonants_at_end + 1
end
return consonants_at_end >= 2
end
-- =====================================
-- 4. LONG VOWEL + CONSONANT CHECK
-- =====================================
local function ends_with_long_vowel_plus_consonant(stem)
local tokens = tokenize_oromo(stem)
local len = #tokens
if len < 2 then return false end
local last = tokens[len]
local prev = tokens[len - 1]
local vowels = { a=true, e=true, i=true, o=true, u=true }
local is_consonant = not vowels[last]
local is_long_vowel = (prev == "aa" or prev == "ee" or prev == "ii" or prev == "oo" or prev == "uu")
-- Fallback yoo tokenizer qubee wal-fakkaataa addaan baase
if not is_long_vowel and len >= 3 then
local prev2 = tokens[len - 2]
if vowels[prev] and prev == prev2 then
is_long_vowel = true
end
end
return is_long_vowel and is_consonant
end
-- =====================================
-- 5. MAIN FUNCTION: Generate Forms
-- =====================================
function export.get_adjective_forms(word)
if not word or word == "" then
return { error = "Verb galchi." }
end
word = mw.ustring.lower(mw.text.trim(word))
if not mw.ustring.match(word, "uu$") then
return { error = "Verb Afaan Oromoo 'uu'n xumuramuu qaba." }
end
local male = ""
local female = ""
local plural = ""
local stem2 = mw.ustring.sub(word, 1, -3) -- Default stem (removes 'uu')
-- =====================================
-- EXACT oochuu, eechuu, ichuu, uchuu
-- =====================================
if mw.ustring.match(word, "eechuu$") or mw.ustring.match(word, "ichuu$") or
mw.ustring.match(word, "uchuu$") or mw.ustring.match(word, "oochuu$") then
local stem_chuu = mw.ustring.sub(word, 1, -5)
male = stem_chuu .. "chaa"
female = stem_chuu .. "chituu"
plural = stem_chuu .. "chitoota"
-- =====================================
-- jjechuu, jechuu, ochuu
-- =====================================
elseif mw.ustring.match(word, "jjechuu$") then
local root = mw.ustring.sub(word, 1, -7)
male = root .. "etaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "jechuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "edhaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "ochuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "odhaa"
female = root .. "ootuu"
plural = root .. "ootota"
-- =====================================
-- ', w, y, h endings ['wyh]uu
-- =====================================
elseif mw.ustring.match(word, "oo['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "ssuu"
plural = root .. "ssota"
elseif mw.ustring.match(word, "o['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
elseif mw.ustring.match(word, "aa['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -4)
male = stem2 .. "aa"
female = root .. "ooftuu"
plural = root .. "ooftota"
elseif mw.ustring.match(word, "[aeio]ta['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "oftuu"
plural = root .. "oftoota"
elseif mw.ustring.match(word, "[aeiou]ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "a'oota"
elseif mw.ustring.match(word, "ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "eessota"
elseif mw.ustring.match(word, "a['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "atuu"
plural = root .. "atota"
elseif mw.ustring.match(word, "ii['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "i['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "toota"
elseif mw.ustring.match(word, "e['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "etuu"
plural = root .. "etota"
elseif mw.ustring.match(word, "u['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
-- =====================================
-- dhuu endings
-- =====================================
elseif mw.ustring.match(word, "[ae]dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "iidhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "idhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "ituu"
plural = root .. "itota"
elseif mw.ustring.match(word, "udhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
elseif mw.ustring.match(word, "dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
-- =====================================
-- nyuu, shuu
-- =====================================
elseif mw.ustring.match(word, "nyuu$") then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
elseif mw.ustring.match(word, "shuu$") then
male = stem2 .. "aa"
female = stem2 .. "tuu"
plural = stem2 .. "toota"
-- =====================================
-- Consonant + chuu
-- =====================================
elseif mw.ustring.match(word, "[bcdfghjklmnpqrstvwxyz]chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "chaa"
female = base .. "chituu"
plural = base .. (is_long and "chitota" or "chitoota")
-- =====================================
-- General chuu
-- =====================================
elseif mw.ustring.match(word, "chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "taa"
female = base .. "ttuu"
plural = base .. (is_long and "ttota" or "ttoota")
-- =====================================
-- V + CC + uu
-- =====================================
elseif is_vccuu(word) then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
-- =====================================
-- cuu
-- =====================================
elseif mw.ustring.match(word, "cuu$") then
local base = mw.ustring.sub(word, 1, -4)
male = base .. "caa"
female = base .. "ccuu"
plural = base .. "ccitoota"
-- =====================================
-- [d j x t]uu
-- =====================================
elseif mw.ustring.match(word, "[djxt]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local c = mw.ustring.sub(word, -3, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. c .. "uu"
plural = base .. c .. (is_long and "ota" or "oota")
-- =====================================
-- [bg]uu
-- =====================================
elseif mw.ustring.match(word, "[bg]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "duu"
plural = base .. (is_long and "dota" or "doota")
-- =====================================
-- [fklmnprsvz]uu
-- =====================================
elseif mw.ustring.match(word, "[fklmnprsvz]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "tuu"
plural = base .. (is_long and "tota" or "toota")
-- =====================================
-- quu / phuu / zyuu
-- =====================================
elseif mw.ustring.match(word, "quu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
elseif mw.ustring.match(word, "phuu$") or mw.ustring.match(word, "zyuu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
-- =====================================
-- RULE NOT FOUND (Fallback)
-- =====================================
else
return { error = "Rule kanaaf hin jiru." }
end
return { male = male, female = female, plural = plural, word = word }
end
-- =====================================
-- 6. TEMPLATE ENTRY POINT (HTML OUPUT)
-- =====================================
function export.generate(frame)
local args = frame.args
if not args[1] and not args.word then
args = frame:getParent().args
end
local word = args[1] or args.word
local results = export.get_adjective_forms(word)
if results.error then
return "<strong class='error'>" .. results.error .. "</strong>"
end
-- HTML Gabatee Uumuu
local html = mw.html.create('table')
:attr('border', '1')
:attr('cellpadding', '8')
:attr('cellspacing', '0')
:tag('tr')
:tag('th'):wikitext('Type'):done()
:tag('th'):wikitext('Word'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Verb'):done()
:tag('td'):wikitext(results.word):done()
:done()
:tag('tr')
:tag('td'):wikitext('Male Adjective'):done()
:tag('td'):wikitext(results.male):done()
:done()
:tag('tr')
:tag('td'):wikitext('Female Adjective'):done()
:tag('td'):wikitext(results.female):done()
:done()
:tag('tr')
:tag('td'):wikitext('Plural Adjective'):done()
:tag('td'):wikitext(results.plural):done()
:done()
return tostring(html)
end
return export
th4fydgrel0c0f2zarkik2lz6gpzb3e
81923
81922
2026-06-27T03:49:13Z
EyobAbebe7
3540
81923
Scribunto
text/plain
local export = {}
-- =====================================
-- 1. HELPER: Check for long vowels (aa, ee, ii, uu)
-- (JS: /(aa|ee|ii|uu)$/.test)
-- =====================================
local function ends_with_long_vowel(str)
return mw.ustring.match(str, "aa$") or
mw.ustring.match(str, "ee$") or
mw.ustring.match(str, "ii$") or
mw.ustring.match(str, "uu$")
end
-- =====================================
-- 2. TOKENIZER (ch, dh, ny, ph, sh, ts, zy)
-- =====================================
local function tokenize_oromo(text)
local digraphs = {
["ch"] = true, ["dh"] = true, ["ny"] = true,
["ph"] = true, ["sh"] = true, ["ts"] = true, ["zy"] = true
}
local tokens = {}
local i = 1
local len = mw.ustring.len(text)
while i <= len do
local two = mw.ustring.sub(text, i, i + 1)
if mw.ustring.len(two) == 2 and digraphs[two] then
table.insert(tokens, two)
i = i + 2
else
table.insert(tokens, mw.ustring.sub(text, i, i))
i = i + 1
end
end
return tokens
end
-- =====================================
-- 3. VCC DETECTOR
-- =====================================
local function is_vccuu(word)
local stem = mw.ustring.sub(word, 1, -3) -- removes 'uu'
local tokens = tokenize_oromo(stem)
local vowels = { a=true, e=true, i=true, o=true, u=true }
local consonants_at_end = 0
for i = #tokens, 1, -1 do
if vowels[tokens[i]] then
break
end
consonants_at_end = consonants_at_end + 1
end
return consonants_at_end >= 2
end
-- =====================================
-- 4. LONG VOWEL + CONSONANT CHECK
-- =====================================
local function ends_with_long_vowel_plus_consonant(stem)
local tokens = tokenize_oromo(stem)
local len = #tokens
if len < 2 then return false end
local last = tokens[len]
local prev = tokens[len - 1]
local vowels = { a=true, e=true, i=true, o=true, u=true }
local is_consonant = not vowels[last]
local is_long_vowel = (prev == "aa" or prev == "ee" or prev == "ii" or prev == "oo" or prev == "uu")
-- Fallback yoo tokenizer qubee wal-fakkaataa addaan baase
if not is_long_vowel and len >= 3 then
local prev2 = tokens[len - 2]
if vowels[prev] and prev == prev2 then
is_long_vowel = true
end
end
return is_long_vowel and is_consonant
end
-- =====================================
-- 5. MAIN FUNCTION: Generate Forms
-- =====================================
function export.get_adjective_forms(word)
if not word or word == "" then
return { error = "Verb galchi." }
end
word = mw.ustring.lower(mw.text.trim(word))
if not mw.ustring.match(word, "uu$") then
return { error = "Verb Afaan Oromoo 'uu'n xumuramuu qaba." }
end
local male = ""
local female = ""
local plural = ""
local stem2 = mw.ustring.sub(word, 1, -3) -- Default stem (removes 'uu')
-- =====================================
-- EXACT oochuu, eechuu, ichuu, uchuu
-- =====================================
if mw.ustring.match(word, "eechuu$") or mw.ustring.match(word, "ichuu$") or
mw.ustring.match(word, "uchuu$") or mw.ustring.match(word, "oochuu$") then
local stem_chuu = mw.ustring.sub(word, 1, -5)
male = stem_chuu .. "chaa"
female = stem_chuu .. "chituu"
plural = stem_chuu .. "chitoota"
-- =====================================
-- jjechuu, jechuu, ochuu
-- =====================================
elseif mw.ustring.match(word, "jjechuu$") then
local root = mw.ustring.sub(word, 1, -7)
male = root .. "etaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "jechuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "edhaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "ochuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "odhaa"
female = root .. "ootuu"
plural = root .. "ootota"
-- =====================================
-- ', w, y, h endings ['wyh]uu
-- =====================================
elseif mw.ustring.match(word, "oo['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "ssuu"
plural = root .. "ssota"
elseif mw.ustring.match(word, "o['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
elseif mw.ustring.match(word, "aa['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -4)
male = stem2 .. "aa"
female = root .. "ooftuu"
plural = root .. "ooftota"
elseif mw.ustring.match(word, "[aeio]ta['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "oftuu"
plural = root .. "oftoota"
elseif mw.ustring.match(word, "[aeiou]ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "a'oota"
elseif mw.ustring.match(word, "ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "eessota"
elseif mw.ustring.match(word, "a['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "atuu"
plural = root .. "atota"
elseif mw.ustring.match(word, "ii['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "i['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "toota"
elseif mw.ustring.match(word, "e['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "etuu"
plural = root .. "etota"
elseif mw.ustring.match(word, "u['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
-- =====================================
-- dhuu endings
-- =====================================
elseif mw.ustring.match(word, "[ae]dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "iidhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "idhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "ituu"
plural = root .. "itota"
elseif mw.ustring.match(word, "udhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
elseif mw.ustring.match(word, "dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
-- =====================================
-- nyuu, shuu
-- =====================================
elseif mw.ustring.match(word, "nyuu$") then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
elseif mw.ustring.match(word, "shuu$") then
male = stem2 .. "aa"
female = stem2 .. "tuu"
plural = stem2 .. "toota"
-- =====================================
-- Consonant + chuu
-- =====================================
elseif mw.ustring.match(word, "[bcdfghjklmnpqrstvwxyz]chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "chaa"
female = base .. "chituu"
plural = base .. (is_long and "chitota" or "chitoota")
-- =====================================
-- General chuu
-- =====================================
elseif mw.ustring.match(word, "chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "taa"
female = base .. "ttuu"
plural = base .. (is_long and "ttota" or "ttoota")
-- =====================================
-- V + CC + uu
-- =====================================
elseif is_vccuu(word) then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
-- =====================================
-- cuu
-- =====================================
elseif mw.ustring.match(word, "cuu$") then
local base = mw.ustring.sub(word, 1, -4)
male = base .. "caa"
female = base .. "ccuu"
plural = base .. "ccitoota"
-- =====================================
-- [d j x t]uu
-- =====================================
elseif mw.ustring.match(word, "[djxt]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local c = mw.ustring.sub(word, -3, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. c .. "uu"
plural = base .. c .. (is_long and "ota" or "oota")
-- =====================================
-- [bg]uu
-- =====================================
elseif mw.ustring.match(word, "[bg]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "duu"
plural = base .. (is_long and "dota" or "doota")
-- =====================================
-- [fklmnprsvz]uu
-- =====================================
elseif mw.ustring.match(word, "[fklmnprsvz]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "tuu"
plural = base .. (is_long and "tota" or "toota")
-- =====================================
-- quu / phuu / zyuu
-- =====================================
elseif mw.ustring.match(word, "quu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
elseif mw.ustring.match(word, "phuu$") or mw.ustring.match(word, "zyuu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
-- =====================================
-- RULE NOT FOUND (Fallback)
-- =====================================
else
return { error = "Rule kanaaf hin jiru." }
end
return { male = male, female = female, plural = plural, word = word }
end
-- =====================================
-- 6. TEMPLATE ENTRY POINT (HTML OUPUT)
-- =====================================
function export.generate(frame)
local args = frame.args
if not args[1] and not args.word then
args = frame:getParent().args
end
local word = args[1] or args.word
local results = export.get_adjective_forms(word)
if results.error then
return "<strong class='error'>" .. results.error .. "</strong>"
end
-- HTML Gabatee Uumuu (Jechoota hunda Link gochuu: [[jechicha]])
local html = mw.html.create('table')
:attr('border', '1')
:attr('cellpadding', '8')
:attr('cellspacing', '0')
:tag('tr')
:tag('th'):wikitext('Type'):done()
:tag('th'):wikitext('Word'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Verb'):done()
:tag('td'):wikitext('[[' .. results.word .. ']]'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Male Adjective'):done()
:tag('td'):wikitext('[[' .. results.male .. ']]'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Female Adjective'):done()
:tag('td'):wikitext('[[' .. results.female .. ']]'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Plural Adjective'):done()
:tag('td'):wikitext('[[' .. results.plural .. ']]'):done()
:done()
return tostring(html)
end
return export
bseik2nfjijv2mwbka9pzen4s5ci0ih
81924
81923
2026-06-27T04:00:31Z
EyobAbebe7
3540
81924
Scribunto
text/plain
local export = {}
-- =====================================
-- 1. HELPER: Check for long vowels (aa, ee, ii, uu)
-- (JS: /(aa|ee|ii|uu)$/.test)
-- =====================================
local function ends_with_long_vowel(str)
return mw.ustring.match(str, "aa$") or
mw.ustring.match(str, "ee$") or
mw.ustring.match(str, "ii$") or
mw.ustring.match(str, "uu$")
end
-- =====================================
-- 2. TOKENIZER (ch, dh, ny, ph, sh, ts, zy)
-- =====================================
local function tokenize_oromo(text)
local digraphs = {
["ch"] = true, ["dh"] = true, ["ny"] = true,
["ph"] = true, ["sh"] = true, ["ts"] = true, ["zy"] = true
}
local tokens = {}
local i = 1
local len = mw.ustring.len(text)
while i <= len do
local two = mw.ustring.sub(text, i, i + 1)
if mw.ustring.len(two) == 2 and digraphs[two] then
table.insert(tokens, two)
i = i + 2
else
table.insert(tokens, mw.ustring.sub(text, i, i))
i = i + 1
end
end
return tokens
end
-- =====================================
-- 3. VCC DETECTOR
-- =====================================
local function is_vccuu(word)
local stem = mw.ustring.sub(word, 1, -3) -- removes 'uu'
local tokens = tokenize_oromo(stem)
local vowels = { a=true, e=true, i=true, o=true, u=true }
local consonants_at_end = 0
for i = #tokens, 1, -1 do
if vowels[tokens[i]] then
break
end
consonants_at_end = consonants_at_end + 1
end
return consonants_at_end >= 2
end
-- =====================================
-- 4. LONG VOWEL + CONSONANT CHECK
-- =====================================
local function ends_with_long_vowel_plus_consonant(stem)
local tokens = tokenize_oromo(stem)
local len = #tokens
if len < 2 then return false end
local last = tokens[len]
local prev = tokens[len - 1]
local vowels = { a=true, e=true, i=true, o=true, u=true }
local is_consonant = not vowels[last]
local is_long_vowel = (prev == "aa" or prev == "ee" or prev == "ii" or prev == "oo" or prev == "uu")
-- Fallback yoo tokenizer qubee wal-fakkaataa addaan baase
if not is_long_vowel and len >= 3 then
local prev2 = tokens[len - 2]
if vowels[prev] and prev == prev2 then
is_long_vowel = true
end
end
return is_long_vowel and is_consonant
end
-- =====================================
-- 5. MAIN FUNCTION: Generate Forms
-- =====================================
function export.get_adjective_forms(word)
if not word or word == "" then
return { error = "Verb galchi." }
end
word = mw.ustring.lower(mw.text.trim(word))
if not mw.ustring.match(word, "uu$") then
return { error = "Verb Afaan Oromoo 'uu'n xumuramuu qaba." }
end
local male = ""
local female = ""
local plural = ""
local stem2 = mw.ustring.sub(word, 1, -3) -- Default stem (removes 'uu')
-- =====================================
-- EXACT oochuu, eechuu, ichuu, uchuu
-- =====================================
if mw.ustring.match(word, "eechuu$") or mw.ustring.match(word, "ichuu$") or
mw.ustring.match(word, "uchuu$") or mw.ustring.match(word, "oochuu$") then
local stem_chuu = mw.ustring.sub(word, 1, -5)
male = stem_chuu .. "chaa"
female = stem_chuu .. "chituu"
plural = stem_chuu .. "chitoota"
-- =====================================
-- jjechuu, jechuu, ochuu
-- =====================================
elseif mw.ustring.match(word, "jjechuu$") then
local root = mw.ustring.sub(word, 1, -7)
male = root .. "etaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "jechuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "edhaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "ochuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "odhaa"
female = root .. "ootuu"
plural = root .. "ootota"
-- =====================================
-- ', w, y, h endings ['wyh]uu
-- =====================================
elseif mw.ustring.match(word, "oo['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "ssuu"
plural = root .. "ssota"
elseif mw.ustring.match(word, "o['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
elseif mw.ustring.match(word, "aa['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -4)
male = stem2 .. "aa"
female = root .. "ooftuu"
plural = root .. "ooftota"
elseif mw.ustring.match(word, "[aeio]ta['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "oftuu"
plural = root .. "oftoota"
elseif mw.ustring.match(word, "[aeiou]ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "a'oota"
elseif mw.ustring.match(word, "ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "eessota"
elseif mw.ustring.match(word, "a['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "atuu"
plural = root .. "atota"
elseif mw.ustring.match(word, "ii['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "i['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "toota"
elseif mw.ustring.match(word, "e['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "etuu"
plural = root .. "etota"
elseif mw.ustring.match(word, "u['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
-- =====================================
-- dhuu endings
-- =====================================
elseif mw.ustring.match(word, "[ae]dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "iidhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "idhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "ituu"
plural = root .. "itota"
elseif mw.ustring.match(word, "udhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
elseif mw.ustring.match(word, "dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
-- =====================================
-- nyuu, shuu
-- =====================================
elseif mw.ustring.match(word, "nyuu$") then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
elseif mw.ustring.match(word, "shuu$") then
male = stem2 .. "aa"
female = stem2 .. "tuu"
plural = stem2 .. "toota"
-- =====================================
-- Consonant + chuu
-- =====================================
elseif mw.ustring.match(word, "[bcdfghjklmnpqrstvwxyz]chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "chaa"
female = base .. "chituu"
plural = base .. (is_long and "chitota" or "chitoota")
-- =====================================
-- General chuu
-- =====================================
elseif mw.ustring.match(word, "chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "taa"
female = base .. "ttuu"
plural = base .. (is_long and "ttota" or "ttoota")
-- =====================================
-- V + CC + uu
-- =====================================
elseif is_vccuu(word) then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
-- =====================================
-- cuu
-- =====================================
elseif mw.ustring.match(word, "cuu$") then
local base = mw.ustring.sub(word, 1, -4)
male = base .. "caa"
female = base .. "ccuu"
plural = base .. "ccitoota"
-- =====================================
-- [d j x t]uu
-- =====================================
elseif mw.ustring.match(word, "[djxt]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local c = mw.ustring.sub(word, -3, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. c .. "uu"
plural = base .. c .. (is_long and "ota" or "oota")
-- =====================================
-- [bg]uu
-- =====================================
elseif mw.ustring.match(word, "[bg]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "duu"
plural = base .. (is_long and "dota" or "doota")
-- =====================================
-- [fklmnprsvz]uu
-- =====================================
elseif mw.ustring.match(word, "[fklmnprsvz]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "tuu"
plural = base .. (is_long and "tota" or "toota")
-- =====================================
-- quu / phuu / zyuu
-- =====================================
elseif mw.ustring.match(word, "quu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
elseif mw.ustring.match(word, "phuu$") or mw.ustring.match(word, "zyuu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
-- =====================================
-- RULE NOT FOUND (Fallback)
-- =====================================
else
return { error = "Rule kanaaf hin jiru." }
end
return { male = male, female = female, plural = plural, word = word }
end
-- =====================================
-- 6. TEMPLATE ENTRY POINT (HTML OUPUT)
-- =====================================
function export.generate(frame)
local args = frame.args
if not args[1] and not args.word and not args.verb then
args = frame:getParent().args
end
local word = args[1] or args.word or args.verb
-- Yoo parameter'n hin kennamne maqaa fuulaa irraa fudhachuu yaala
if not word or word == "" then
local pagename = mw.title.getCurrentTitle().text
-- Yoo maqaan fuulichaa sirriitti xumura 'uu' qabaate qofa ofumaan fudhata (Fuula jechootaa)
if mw.ustring.match(pagename, "uu$") then
word = pagename
else
-- Fuula Template fi Module irratti akka dogoggora hin fidneef, fakkeenya kana fayyadama
word = "gochuu"
end
end
local results = export.get_adjective_forms(word)
if results.error then
return "<strong class='error'>" .. results.error .. "</strong>"
end
-- HTML Gabatee Uumuu (Jechoota hunda Link gochuu: [[jechicha]])
local html = mw.html.create('table')
:attr('border', '1')
:attr('cellpadding', '8')
:attr('cellspacing', '0')
:tag('tr')
:tag('th'):wikitext('Type'):done()
:tag('th'):wikitext('Word'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Verb'):done()
:tag('td'):wikitext('[[' .. results.word .. ']]'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Male Adjective'):done()
:tag('td'):wikitext('[[' .. results.male .. ']]'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Female Adjective'):done()
:tag('td'):wikitext('[[' .. results.female .. ']]'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Plural Adjective'):done()
:tag('td'):wikitext('[[' .. results.plural .. ']]'):done()
:done()
return tostring(html)
end
return export
3lx0obkx6vu807l97itpc129la5dimn
81925
81924
2026-06-27T05:38:43Z
EyobAbebe7
3540
81925
Scribunto
text/plain
local export = {}
-- =====================================
-- 1. HELPER: Check for long vowels (aa, ee, ii, uu)
-- (JS: /(aa|ee|ii|uu)$/.test)
-- =====================================
local function ends_with_long_vowel(str)
return mw.ustring.match(str, "aa$") or
mw.ustring.match(str, "ee$") or
mw.ustring.match(str, "ii$") or
mw.ustring.match(str, "uu$")
end
-- =====================================
-- 2. TOKENIZER (ch, dh, ny, ph, sh, ts, zy)
-- =====================================
local function tokenize_oromo(text)
local digraphs = {
["ch"] = true, ["dh"] = true, ["ny"] = true,
["ph"] = true, ["sh"] = true, ["ts"] = true, ["zy"] = true
}
local tokens = {}
local i = 1
local len = mw.ustring.len(text)
while i <= len do
local two = mw.ustring.sub(text, i, i + 1)
if mw.ustring.len(two) == 2 and digraphs[two] then
table.insert(tokens, two)
i = i + 2
else
table.insert(tokens, mw.ustring.sub(text, i, i))
i = i + 1
end
end
return tokens
end
-- =====================================
-- 3. VCC DETECTOR
-- =====================================
local function is_vccuu(word)
local stem = mw.ustring.sub(word, 1, -3) -- removes 'uu'
local tokens = tokenize_oromo(stem)
local vowels = { a=true, e=true, i=true, o=true, u=true }
local consonants_at_end = 0
for i = #tokens, 1, -1 do
if vowels[tokens[i]] then
break
end
consonants_at_end = consonants_at_end + 1
end
return consonants_at_end >= 2
end
-- =====================================
-- 4. LONG VOWEL + CONSONANT CHECK
-- =====================================
local function ends_with_long_vowel_plus_consonant(stem)
local tokens = tokenize_oromo(stem)
local len = #tokens
if len < 2 then return false end
local last = tokens[len]
local prev = tokens[len - 1]
local vowels = { a=true, e=true, i=true, o=true, u=true }
local is_consonant = not vowels[last]
local is_long_vowel = (prev == "aa" or prev == "ee" or prev == "ii" or prev == "oo" or prev == "uu")
-- Fallback yoo tokenizer qubee wal-fakkaataa addaan baase
if not is_long_vowel and len >= 3 then
local prev2 = tokens[len - 2]
if vowels[prev] and prev == prev2 then
is_long_vowel = true
end
end
return is_long_vowel and is_consonant
end
-- =====================================
-- 5. MAIN FUNCTION: Generate Forms
-- =====================================
function export.get_adjective_forms(word)
if not word or word == "" then
return { error = "Verb galchi." }
end
word = mw.ustring.lower(mw.text.trim(word))
if not mw.ustring.match(word, "uu$") then
return { error = "Verb Afaan Oromoo 'uu'n xumuramuu qaba." }
end
local male = ""
local female = ""
local plural = ""
local stem2 = mw.ustring.sub(word, 1, -3) -- Default stem (removes 'uu')
-- =====================================
-- EXACT oochuu, eechuu, ichuu, uchuu
-- =====================================
if mw.ustring.match(word, "eechuu$") or mw.ustring.match(word, "ichuu$") or
mw.ustring.match(word, "uchuu$") or mw.ustring.match(word, "oochuu$") then
local stem_chuu = mw.ustring.sub(word, 1, -5)
male = stem_chuu .. "chaa"
female = stem_chuu .. "chituu"
plural = stem_chuu .. "chitoota"
-- =====================================
-- jjechuu, jechuu, ochuu
-- =====================================
elseif mw.ustring.match(word, "jjechuu$") then
local root = mw.ustring.sub(word, 1, -7)
male = root .. "etaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "jechuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "edhaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "ochuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "odhaa"
female = root .. "ootuu"
plural = root .. "ootota"
-- =====================================
-- ', w, y, h endings ['wyh]uu
-- =====================================
elseif mw.ustring.match(word, "oo['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "ssuu"
plural = root .. "ssota"
elseif mw.ustring.match(word, "o['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
elseif mw.ustring.match(word, "aa['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -4)
male = stem2 .. "aa"
female = root .. "ooftuu"
plural = root .. "ooftota"
elseif mw.ustring.match(word, "[aeio]ta['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "oftuu"
plural = root .. "oftoota"
elseif mw.ustring.match(word, "[aeiou]ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "a'oota"
elseif mw.ustring.match(word, "ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "eessota"
elseif mw.ustring.match(word, "a['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "atuu"
plural = root .. "atota"
elseif mw.ustring.match(word, "ii['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "i['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "toota"
elseif mw.ustring.match(word, "e['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "etuu"
plural = root .. "etota"
elseif mw.ustring.match(word, "u['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
-- =====================================
-- dhuu endings
-- =====================================
elseif mw.ustring.match(word, "[ae]dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "iidhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "idhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "ituu"
plural = root .. "itota"
elseif mw.ustring.match(word, "udhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
-- =====================================
-- nyuu, shuu
-- =====================================
elseif mw.ustring.match(word, "nyuu$") then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
elseif mw.ustring.match(word, "shuu$") then
male = stem2 .. "aa"
female = stem2 .. "tuu"
plural = stem2 .. "toota"
-- =====================================
-- Consonant + chuu
-- =====================================
elseif mw.ustring.match(word, "[bcdfghjklmnpqrstvwxyz]chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "chaa"
female = base .. "chituu"
plural = base .. (is_long and "chitota" or "chitoota")
-- =====================================
-- General chuu
-- =====================================
elseif mw.ustring.match(word, "chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "taa"
female = base .. "ttuu"
plural = base .. (is_long and "ttota" or "ttoota")
-- =====================================
-- V + CC + uu
-- =====================================
elseif is_vccuu(word) then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
-- =====================================
-- cuu
-- =====================================
elseif mw.ustring.match(word, "cuu$") then
local base = mw.ustring.sub(word, 1, -4)
male = base .. "caa"
female = base .. "ccuu"
plural = base .. "ccitoota"
-- =====================================
-- [d j x t]uu
-- =====================================
elseif mw.ustring.match(word, "[djxt]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local c = mw.ustring.sub(word, -3, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. c .. "uu"
plural = base .. c .. (is_long and "ota" or "oota")
-- =====================================
-- [bg]uu
-- =====================================
elseif mw.ustring.match(word, "[bg]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "duu"
plural = base .. (is_long and "dota" or "doota")
-- =====================================
-- [fklmnprsvz]uu
-- =====================================
elseif mw.ustring.match(word, "[fklmnprsvz]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "tuu"
plural = base .. (is_long and "tota" or "toota")
-- =====================================
-- quu / phuu / zyuu
-- =====================================
elseif mw.ustring.match(word, "quu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
elseif mw.ustring.match(word, "phuu$") or mw.ustring.match(word, "zyuu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
-- =====================================
-- RULE NOT FOUND (Fallback)
-- =====================================
else
return { error = "Rule kanaaf hin jiru." }
end
return { male = male, female = female, plural = plural, word = word }
end
-- =====================================
-- 6. TEMPLATE ENTRY POINT (HTML OUPUT)
-- =====================================
function export.generate(frame)
local args = frame.args
if not args[1] and not args.word and not args.verb then
args = frame:getParent().args
end
local word = args[1] or args.word or args.verb
-- Yoo parameter'n hin kennamne maqaa fuulaa irraa fudhachuu yaala
if not word or word == "" then
local pagename = mw.title.getCurrentTitle().text
-- Yoo maqaan fuulichaa sirriitti xumura 'uu' qabaate qofa ofumaan fudhata (Fuula jechootaa)
if mw.ustring.match(pagename, "uu$") then
word = pagename
else
-- Fuula Template fi Module irratti akka dogoggora hin fidneef, fakkeenya kana fayyadama
word = "gochuu"
end
end
local results = export.get_adjective_forms(word)
if results.error then
return "<strong class='error'>" .. results.error .. "</strong>"
end
-- HTML Gabatee Uumuu (Jechoota hunda Link gochuu: [[jechicha]])
local html = mw.html.create('table')
:attr('border', '1')
:attr('cellpadding', '8')
:attr('cellspacing', '0')
:tag('tr')
:tag('th'):wikitext('Type'):done()
:tag('th'):wikitext('Word'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Verb'):done()
:tag('td'):wikitext('[[' .. results.word .. ']]'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Male Adjective'):done()
:tag('td'):wikitext('[[' .. results.male .. ']]'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Female Adjective'):done()
:tag('td'):wikitext('[[' .. results.female .. ']]'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Plural Adjective'):done()
:tag('td'):wikitext('[[' .. results.plural .. ']]'):done()
:done()
return tostring(html)
end
return export
ss86s2o9ql9mry6fc4su8rpuxzgsca8
81926
81925
2026-06-27T05:50:06Z
EyobAbebe7
3540
81926
Scribunto
text/plain
local export = {}
-- =====================================
-- 1. HELPER: Check for long vowels (aa, ee, ii, uu)
-- (JS: /(aa|ee|ii|uu)$/.test)
-- =====================================
local function ends_with_long_vowel(str)
return mw.ustring.match(str, "aa$") or
mw.ustring.match(str, "ee$") or
mw.ustring.match(str, "ii$") or
mw.ustring.match(str, "uu$")
end
-- =====================================
-- 2. TOKENIZER (ch, dh, ny, ph, sh, ts, zy)
-- =====================================
local function tokenize_oromo(text)
local digraphs = {
["ch"] = true, ["dh"] = true, ["ny"] = true,
["ph"] = true, ["sh"] = true, ["ts"] = true, ["zy"] = true
}
local tokens = {}
local i = 1
local len = mw.ustring.len(text)
while i <= len do
local two = mw.ustring.sub(text, i, i + 1)
if mw.ustring.len(two) == 2 and digraphs[two] then
table.insert(tokens, two)
i = i + 2
else
table.insert(tokens, mw.ustring.sub(text, i, i))
i = i + 1
end
end
return tokens
end
-- =====================================
-- 3. VCC DETECTOR
-- =====================================
local function is_vccuu(word)
local stem = mw.ustring.sub(word, 1, -3) -- removes 'uu'
local tokens = tokenize_oromo(stem)
local vowels = { a=true, e=true, i=true, o=true, u=true }
local consonants_at_end = 0
for i = #tokens, 1, -1 do
if vowels[tokens[i]] then
break
end
consonants_at_end = consonants_at_end + 1
end
return consonants_at_end >= 2
end
-- =====================================
-- 4. LONG VOWEL + CONSONANT CHECK
-- =====================================
local function ends_with_long_vowel_plus_consonant(stem)
local tokens = tokenize_oromo(stem)
local len = #tokens
if len < 2 then return false end
local last = tokens[len]
local prev = tokens[len - 1]
local vowels = { a=true, e=true, i=true, o=true, u=true }
local is_consonant = not vowels[last]
local is_long_vowel = (prev == "aa" or prev == "ee" or prev == "ii" or prev == "oo" or prev == "uu")
-- Fallback yoo tokenizer qubee wal-fakkaataa addaan baase
if not is_long_vowel and len >= 3 then
local prev2 = tokens[len - 2]
if vowels[prev] and prev == prev2 then
is_long_vowel = true
end
end
return is_long_vowel and is_consonant
end
-- =====================================
-- 5. MAIN FUNCTION: Generate Forms
-- =====================================
function export.get_adjective_forms(word)
if not word or word == "" then
return { error = "Verb galchi." }
end
word = mw.ustring.lower(mw.text.trim(word))
if not mw.ustring.match(word, "uu$") then
return { error = "Verb Afaan Oromoo 'uu'n xumuramuu qaba." }
end
local male = ""
local female = ""
local plural = ""
local stem2 = mw.ustring.sub(word, 1, -3) -- Default stem (removes 'uu')
-- =====================================
-- EXACT oochuu, eechuu, ichuu, uchuu
-- =====================================
if mw.ustring.match(word, "eechuu$") or mw.ustring.match(word, "ichuu$") or
mw.ustring.match(word, "uchuu$") or mw.ustring.match(word, "oochuu$") then
local stem_chuu = mw.ustring.sub(word, 1, -5)
male = stem_chuu .. "chaa"
female = stem_chuu .. "chituu"
plural = stem_chuu .. "chitoota"
-- =====================================
-- jjechuu, jechuu, ochuu
-- =====================================
elseif mw.ustring.match(word, "jjechuu$") then
local root = mw.ustring.sub(word, 1, -7)
male = root .. "etaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "jechuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "edhaa"
female = root .. "ettuu"
plural = root .. "ettoota"
elseif mw.ustring.match(word, "ochuu$") then
local root = mw.ustring.sub(word, 1, -6)
male = root .. "odhaa"
female = root .. "ootuu"
plural = root .. "ootota"
-- =====================================
-- ', w, y, h endings ['wyh]uu
-- =====================================
elseif mw.ustring.match(word, "oo['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "ssuu"
plural = root .. "ssota"
elseif mw.ustring.match(word, "o['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
elseif mw.ustring.match(word, "aa['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -4)
male = stem2 .. "aa"
female = root .. "ooftuu"
plural = root .. "ooftota"
elseif mw.ustring.match(word, "[aeio]ta['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "oftuu"
plural = root .. "oftoota"
elseif mw.ustring.match(word, "[aeiou]ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "a'oota"
elseif mw.ustring.match(word, "ga['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "eessuu"
plural = root .. "eessota"
elseif mw.ustring.match(word, "a['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "atuu"
plural = root .. "atota"
elseif mw.ustring.match(word, "ii['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "i['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "toota"
elseif mw.ustring.match(word, "e['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "etuu"
plural = root .. "etota"
elseif mw.ustring.match(word, "u['wyh]uu$") then
local root = mw.ustring.sub(stem2, 1, -2)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
-- =====================================
-- dhuu endings
-- =====================================
elseif mw.ustring.match(word, "[ae]dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "iidhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "idhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "ituu"
plural = root .. "itota"
elseif mw.ustring.match(word, "uudhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "tuu"
plural = root .. "tota"
elseif mw.ustring.match(word, "udhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "utuu"
plural = root .. "utota"
elseif mw.ustring.match(word, "dhuu$") then
local root = mw.ustring.sub(stem2, 1, -3)
male = stem2 .. "aa"
female = root .. "otuu"
plural = root .. "otota"
-- =====================================
-- nyuu, shuu
-- =====================================
elseif mw.ustring.match(word, "nyuu$") then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
elseif mw.ustring.match(word, "shuu$") then
male = stem2 .. "aa"
female = stem2 .. "tuu"
plural = stem2 .. "toota"
-- =====================================
-- Consonant + chuu
-- =====================================
elseif mw.ustring.match(word, "[bcdfghjklmnpqrstvwxyz]chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "chaa"
female = base .. "chituu"
plural = base .. (is_long and "chitota" or "chitoota")
-- =====================================
-- General chuu
-- =====================================
elseif mw.ustring.match(word, "chuu$") then
local base = mw.ustring.sub(word, 1, -5)
local is_long = ends_with_long_vowel(base)
male = base .. "taa"
female = base .. "ttuu"
plural = base .. (is_long and "ttota" or "ttoota")
-- =====================================
-- V + CC + uu
-- =====================================
elseif is_vccuu(word) then
male = stem2 .. "aa"
female = stem2 .. "ituu"
plural = stem2 .. "itoota"
-- =====================================
-- cuu
-- =====================================
elseif mw.ustring.match(word, "cuu$") then
local base = mw.ustring.sub(word, 1, -4)
male = base .. "caa"
female = base .. "ccuu"
plural = base .. "ccitoota"
-- =====================================
-- [d j x t]uu
-- =====================================
elseif mw.ustring.match(word, "[djxt]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local c = mw.ustring.sub(word, -3, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. c .. "uu"
plural = base .. c .. (is_long and "ota" or "oota")
-- =====================================
-- [bg]uu
-- =====================================
elseif mw.ustring.match(word, "[bg]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "duu"
plural = base .. (is_long and "dota" or "doota")
-- =====================================
-- [fklmnprsvz]uu
-- =====================================
elseif mw.ustring.match(word, "[fklmnprsvz]uu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "tuu"
plural = base .. (is_long and "tota" or "toota")
-- =====================================
-- quu / phuu / zyuu
-- =====================================
elseif mw.ustring.match(word, "quu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -2)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
elseif mw.ustring.match(word, "phuu$") or mw.ustring.match(word, "zyuu$") then
local base = mw.ustring.sub(word, 1, -3)
local root = mw.ustring.sub(base, 1, -3)
local is_long = ends_with_long_vowel(root)
male = base .. "aa"
female = base .. "xuu"
plural = base .. (is_long and "xota" or "xoota")
-- =====================================
-- RULE NOT FOUND (Fallback)
-- =====================================
else
return { error = "Rule kanaaf hin jiru." }
end
return { male = male, female = female, plural = plural, word = word }
end
-- =====================================
-- 6. TEMPLATE ENTRY POINT (HTML OUPUT)
-- =====================================
function export.generate(frame)
local args = frame.args
if not args[1] and not args.word and not args.verb then
args = frame:getParent().args
end
local word = args[1] or args.word or args.verb
-- Yoo parameter'n hin kennamne maqaa fuulaa irraa fudhachuu yaala
if not word or word == "" then
local pagename = mw.title.getCurrentTitle().text
-- Yoo maqaan fuulichaa sirriitti xumura 'uu' qabaate qofa ofumaan fudhata (Fuula jechootaa)
if mw.ustring.match(pagename, "uu$") then
word = pagename
else
-- Fuula Template fi Module irratti akka dogoggora hin fidneef, fakkeenya kana fayyadama
word = "gochuu"
end
end
local results = export.get_adjective_forms(word)
if results.error then
return "<strong class='error'>" .. results.error .. "</strong>"
end
-- HTML Gabatee Uumuu (Jechoota hunda Link gochuu: [[jechicha]])
local html = mw.html.create('table')
:attr('border', '1')
:attr('cellpadding', '8')
:attr('cellspacing', '0')
:tag('tr')
:tag('th'):wikitext('Type'):done()
:tag('th'):wikitext('Word'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Verb'):done()
:tag('td'):wikitext('[[' .. results.word .. ']]'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Male Adjective'):done()
:tag('td'):wikitext('[[' .. results.male .. ']]'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Female Adjective'):done()
:tag('td'):wikitext('[[' .. results.female .. ']]'):done()
:done()
:tag('tr')
:tag('td'):wikitext('Plural Adjective'):done()
:tag('td'):wikitext('[[' .. results.plural .. ']]'):done()
:done()
return tostring(html)
end
return export
haenz4n3btl6xvcob496rjey2tjpvt5