Module:xchc-noun: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 27: Line 27:
end
end


local function gsubh(pat, repl, def)
local function gsubh(word, pat, repl, def)
local word = data.word
local harmony = m_ipa.harmony(word)
local harmony = m_ipa.harmony(word)
Line 57: Line 56:
local lastipa = match(pron(word), ".ː?$")
local lastipa = match(pron(word), ".ː?$")
local pautable = {["a"] = "н", ["e"] = "ч", ["ɛ"] = "н", ["i"] = "ч", ["o"] = "ӈ", ["ɔ"] = "ӈ", ["ø"] = "ч", ["u"] = "ӈ", ["y"] = "ч"}
local pautable = {["a"] = "н", ["e"] = "ч", ["ɛ"] = "н", ["i"] = "ч", ["o"] = "ӈ", ["ɔ"] = "ӈ", ["ø"] = "ч", ["u"] = "ӈ", ["y"] = "ч"}
data.pau = pautable[lastipa] or gsubh("Bӈ",{["b"]="о̆",["f"]="э̆", ["ab"]="о̆"})
data.pau = pautable[lastipa] or gsubh(word, "Bӈ",{["b"]="о̆",["f"]="э̆", ["ab"]="о̆"})
data.pl = {
data.pl = {
["i"] = (match(pron(word), voiceless .. "ː?$") and "ш" or "ж") .. gsubh("Bд",{["b"]="о̆",["e"]="э̆", ["ab"]="о̆"}),
["i"] = (match(pron(word), voiceless .. "ː?$") and "ш" or "ж") .. gsubh(word, "Bд",{["b"]="о̆",["e"]="э̆", ["ab"]="о̆"}),
["a"] = (match(pron(word), voiceless .. "ː?$") and "ф" or "в") .. gsubh("Rд",{["r"]="ө",["u"]="э", ["ar"]="э"}),
["a"] = (match(pron(word), voiceless .. "ː?$") and "ф" or "в") .. gsubh(word, "Rд",{["r"]="ө",["u"]="э", ["ar"]="э"}),
}
}
Line 115: Line 114:
local decl = {
local decl = {
["nom"] = "",
["nom"] = "",
["acc"] = match(pron(w_number[n_sh]), vowel .. "ː?$") and "дза" or match(pron(w_number[n_sh]), voiced .. "ː?$") and "да" or "та",
["acc"] = match(pron(w_number[n_sh]), vowel .. "ː?$") and "дза"
["dat"] = match(pron(w_number[n_sh]), vowel .. "ː?$") and "ша" or match(pron(w_number[n_sh]), voiced .. "ː?$") and "за" or "са",
      or match(pron(w_number[n_sh]), voiced .. "ː?$") and "да"
      or "та",
["dat"] = match(pron(w_number[n_sh]), vowel .. "ː?$") and "ша"
  or match(pron(w_number[n_sh]), voiced .. "ː?$") and "за"
  or "са",
["gen"] = "ля",
["gen"] = "ля",
["ins"] = match(pron(w_number[n_sh]), vowel .. "ː?$") and "лза" or gsubh("Rлз",{["r"]="ө",["u"]="э",["ar"]="ө"}),
["ins"] = match(pron(w_number[n_sh]), vowel .. "ː?$") and "лза"
["pro"] = gsubh("сRц",{["r"]="ө",["u"]="э", ["ar"]="ө"}),
  or gsubh(w_number[n_sh], "Rлз",{["r"]="ө",["u"]="э",["ar"]="ө"}),
["pro"] = gsubh(w_number[n_sh], "сRц",{["r"]="ө",["u"]="э", ["ar"]="ө"}),
["ade"] = "ляц",
["ade"] = "ляц",
["abl"] = gsubh("сRшB",{["r"]="у",["u"]="ы",["b"]="о̄̆",["f"]="э̄̆",["ar"]="у",["ab"]="э̄̆"}),
["abl"] = gsubh(w_number[n_sh], "сRшB",{["r"]="у",["u"]="ы",["b"]="о̄̆",["f"]="э̄̆",["ar"]="у",["ab"]="э̄̆"}),
["ill"] = gsubh("кRб",{["r"]="ү",["u"]="ы",["ar"]="ы"}),
["ill"] = gsubh(w_number[n_sh], "кRб",{["r"]="ү",["u"]="ы",["ar"]="ы"}),
}
}
table.insert(ret, "| " .. show_form(w_number[n_sh] .. decl[c_sh]) .. "\n")
table.insert(ret, "| " .. show_form(w_number[n_sh] .. decl[c_sh]) .. "\n")

Navigation menu