Module:xchc-noun: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 23: Line 23:
local genders = {["a"] = "animate", ["i"] = "inanimate"}
local genders = {["a"] = "animate", ["i"] = "inanimate"}


local function wordpron(w)
local function pron(w)
return m_ipa.crux(w)
return m_ipa.crux(w)
end
end
Line 54: Line 54:
data.g = g
data.g = g
data.sg = ""
data.sg = ""
data.pau = wordpron(word):match("[eiøy]ː?$") and "ч" or wordpron(word):match("[ɛa]ː?$") and "н" or wordpron(word):match("[uoɔ]ː?$") and "ӈ" or gsubh("Bӈ",{["b"]="о̆",["f"]="э̆", ["ab"]="о̆"})
data.pau = pron(word):match("[ɛa]ː?$") and "н" or gsubh("Bӈ",{["b"]="о̆",["f"]="э̆", ["ab"]="о̆"})
data.pl = {
data.pl = {
["i"] = (wordpron(word):match(voiceless .. "ː?$") and "ш" or "ж") .. gsubh("Bд",{["b"]="о̆",["e"]="э̆", ["ab"]="о̆"}),
["i"] = (pron(word):match(voiceless .. "ː?$") and "ш" or "ж") .. gsubh("Bд",{["b"]="о̆",["e"]="э̆", ["ab"]="о̆"}),
["a"] = (wordpron(word):match(voiceless .. "ː?$") and "ф" or "в") .. gsubh("Rд",{["r"]="ө",["u"]="э", ["ar"]="э"}),
["a"] = (pron(word):match(voiceless .. "ː?$") and "ф" or "в") .. gsubh("Rд",{["r"]="ө",["u"]="э", ["ar"]="э"}),
}
}
Line 112: Line 112:
local decl = {
local decl = {
["nom"] = "",
["nom"] = "",
["acc"] = wordpron(w_number[n_sh]):match(vowel .. "ː?$") and "дза" or wordpron(w_number[n_sh]):match(voiced .. "ː?$") and "да" or "та",
["acc"] = pron(w_number[n_sh]):match(vowel .. "ː?$") and "дза" or pron(w_number[n_sh]):match(voiced .. "ː?$") and "да" or "та",
["dat"] = wordpron(w_number[n_sh]):match(vowel .. "ː?$") and "ша" or wordpron(w_number[n_sh]):match(voiced .. "ː?$") and "за" or "са",
["dat"] = pron(w_number[n_sh]):match(vowel .. "ː?$") and "ша" or pron(w_number[n_sh]):match(voiced .. "ː?$") and "за" or "са",
["gen"] = "ля",
["gen"] = "ля",
["ins"] = wordpron(w_number[n_sh]):match(vowel .. "ː?$") and "лза" or gsubh("Rлз",{["r"]="ө",["u"]="э",["ar"]="ө"}),
["ins"] = pron(w_number[n_sh]):match(vowel .. "ː?$") and "лза" or gsubh("Rлз",{["r"]="ө",["u"]="э",["ar"]="ө"}),
["pro"] = gsubh("сRц",{["r"]="ө",["u"]="э", ["ar"]="ө"}),
["pro"] = gsubh("сRц",{["r"]="ө",["u"]="э", ["ar"]="ө"}),
["ade"] = "ляц",
["ade"] = "ляц",