Module:siwa-noun/common: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1: Line 1:
local data = {}
local export = {}


data.stressed_vowels = {
function export.lenition(word)
local lenition_patterns = {
[v.."[vųbhḥg]"..v] = "%1%2", ["bb"] = "b", ["dd"] = "d", ["gg"] = "g", ["ɟ"] = "į", ["mm"] = "m", ["ll"] = "l", ["nn"] = "n",
["rr"] = "r", ["bġ"] = "p", ["pr"] = "p", ["dġ"] = "t", ["tr"] = "t", ["ḍb"] = "p", ["ð"] = "hh",
["ḍg"] = "k", ["bm"] = "m", ["dn"] = "n", ["kn"] = "ng", ["([lr])pp"] = "%1p", ["([lr])tt"] = "%1t", ["([lrms])kk"] = "%1k",
["k([lvs])"] = "g%1", ["ps"] = "bs",  ["d[aou]"] = "l", ["ġ[aou]"] = "vv", ["[dġ][eůy]"] = "", ["[rġ]i"] = "ṡi",
["di"] = "", ["ɲi"] = "ɟi", ["ħį"] = "ṡ", ["[ou]ų"] = "ů", ["ɬ"] = "l",
}
for regex, repl in ipairs(lenition_patterns) do
word = mw.ustring.gsub(word, regex, repl)
end
--word = mw.ustring.gsub(word, v.."[vųbhḥg]"..v, "%1%2")
return word
end
 
export.stressed_vowels = {
["a"] = "a", ["ả"] = "a", ["au"] = "a",  ["ai"] = "a", ["oa"] = "a",
["a"] = "a", ["ả"] = "a", ["au"] = "a",  ["ai"] = "a", ["oa"] = "a",
["e"] = "e", ["ẻ"] = "e", ["ę"] = "e", ["ei"] = "e", ["ay"] = "e", ["eu"] = "e",
["e"] = "e", ["ẻ"] = "e", ["ę"] = "e", ["ei"] = "e", ["ay"] = "e", ["eu"] = "e",
Line 10: Line 27:
}
}


data.digraphs_to_single = {
export.digraphs_to_single = {
["ts"] = "ʦ", ["tṡ"] = "ʨ", ["dį"] = "ʥ", ["ng"] = "ŋ", ["nį"] = "ɲ",
["ts"] = "ʦ", ["tṡ"] = "ʨ", ["dį"] = "ʥ", ["ng"] = "ŋ", ["nį"] = "ɲ",
["kį"] = "c", ["gį"] = "ɟ", ["hh"] = "ħ", ["ḍḍ"] = "ð", ["dl"] = "ɬ", ["o̊"] = "ȯ",
["kį"] = "c", ["gį"] = "ɟ", ["hh"] = "ħ", ["ḍḍ"] = "ð", ["dl"] = "ɬ", ["o̊"] = "ȯ",
Line 16: Line 33:
}
}


data.lenition_patterns = {
export.lenition_patterns = {
{"bb", "b"}, {"dd", "d"}, {"gg", "g"}, {"ɟ", "į"}, {"mm", "m"}, {"ll", "l"}, {"nn", "n"},
{"bb", "b"}, {"dd", "d"}, {"gg", "g"}, {"ɟ", "į"}, {"mm", "m"}, {"ll", "l"}, {"nn", "n"},
{"rr", "r"}, {"bġ", "p"}, {"pr", "p"}, {"dġ", "t"}, {"tr", "t"}, {"ḍb", "p"}, {"ð", "hh"},
{"rr", "r"}, {"bġ", "p"}, {"pr", "p"}, {"dġ", "t"}, {"tr", "t"}, {"ḍb", "p"}, {"ð", "hh"},
Line 29: Line 46:
]]
]]


data.endings = {}
export.endings = {}
-- [gender]-[declension]-[subgroup]
-- [gender]-[declension]-[subgroup]
data.endings.a = {
export.endings.a = {
["m"] = "i-a-mV", ["n"] = "i-a-nV", ["p"] = "i-a-pV", ["b"] = "i-a-bV", ["t"] = "i-a-tV",
["m"] = "i-a-mV", ["n"] = "i-a-nV", ["p"] = "i-a-pV", ["b"] = "i-a-bV", ["t"] = "i-a-tV",
["r"] = "i-a-rV", ["vv"] = "i-a-vvV", ["lk"] = "i-a-CkV", ["rk"] = "i-a-CkV", ["sk"] = "i-a-CkV",
["r"] = "i-a-rV", ["vv"] = "i-a-vvV", ["lk"] = "i-a-CkV", ["rk"] = "i-a-CkV", ["sk"] = "i-a-CkV",
Line 37: Line 54:


-- [gender]-[declension]-[final vowel(s)]-[subgroup]
-- [gender]-[declension]-[final vowel(s)]-[subgroup]
data.endings.e = {
export.endings.e = {
["na"] = "i-e-ae-n", ["ne"] = "i-e-ae-n",
["na"] = "i-e-ae-n", ["ne"] = "i-e-ae-n",
["ba"] = "i-e-ae-b", ["be"] = "i-e-ae-b",
["ba"] = "i-e-ae-b", ["be"] = "i-e-ae-b",
Line 65: Line 82:


-- [gender]-[declension]-[subgroup]
-- [gender]-[declension]-[subgroup]
data.endings.i = {
export.endings.i = {
["m"] = "i-i-mV", ["n"] = "i-i-nV", ["um"] = "i-i-uomnV", ["om"] = "i-i-uomnV", ["un"] = "i-i-uomnV", ["on"] = "i-i-uomnV",
["m"] = "i-i-mV", ["n"] = "i-i-nV", ["um"] = "i-i-uomnV", ["om"] = "i-i-uomnV", ["un"] = "i-i-uomnV", ["on"] = "i-i-uomnV",
["v"] = "i-i-vV", ["g"] = "i-i-gV", ["s"] = "i-i-gV", ["r"] = "i-i-rV", ["h"] = "i-i-hV", ["k"] = "i-i-kV",
["v"] = "i-i-vV", ["g"] = "i-i-gV", ["s"] = "i-i-gV", ["r"] = "i-i-rV", ["h"] = "i-i-hV", ["k"] = "i-i-kV",
Line 72: Line 89:


-- [gender]-[declension]-[final vowel(s)]-[subgroup]
-- [gender]-[declension]-[final vowel(s)]-[subgroup]
data.endings.o = {
export.endings.o = {
["ba"] = "i-o-ae-b/t", ["be"] = "i-o-ae-b/t", ["ta"] = "i-o-ae-b/t", ["te"] = "i-o-ae-b/t",
["ba"] = "i-o-ae-b/t", ["be"] = "i-o-ae-b/t", ["ta"] = "i-o-ae-b/t", ["te"] = "i-o-ae-b/t",
["va"] = "i-o-ae-v/m/n", ["ve"] = "i-o-ae-v/m/n", ["ma"] = "i-o-ae-v/m/n", ["me"] = "i-o-ae-v/m/n", ["na"] = "i-o-ae-v/m/n", ["ne"] = "i-o-ae-v/m/n",
["va"] = "i-o-ae-v/m/n", ["ve"] = "i-o-ae-v/m/n", ["ma"] = "i-o-ae-v/m/n", ["me"] = "i-o-ae-v/m/n", ["na"] = "i-o-ae-v/m/n", ["ne"] = "i-o-ae-v/m/n",
Line 94: Line 111:




data.endings.u = {
export.endings.u = {
["ba"] = "i-u-aei-b/p/t/d", ["pa"] = "i-u-aei-b/p/t/d", ["ta"] = "i-u-aei-b/p/t/d", ["da"] = "i-u-aei-b/p/t/d",
["ba"] = "i-u-aei-b/p/t/d", ["pa"] = "i-u-aei-b/p/t/d", ["ta"] = "i-u-aei-b/p/t/d", ["da"] = "i-u-aei-b/p/t/d",
["be"] = "i-u-aei-b/p/t/d", ["pe"] = "i-u-aei-b/p/t/d", ["te"] = "i-u-aei-b/p/t/d", ["de"] = "i-u-aei-b/p/t/d",  
["be"] = "i-u-aei-b/p/t/d", ["pe"] = "i-u-aei-b/p/t/d", ["te"] = "i-u-aei-b/p/t/d", ["de"] = "i-u-aei-b/p/t/d",  
Line 122: Line 139:
}
}


return data
return export