diff --git a/morph/lang-ru.lua b/morph/lang-ru.lua index eeec796..b519e97 100644 --- a/morph/lang-ru.lua +++ b/morph/lang-ru.lua @@ -338,6 +338,7 @@ local function gram_score(an, g) g = gram_norm(g) if an["фам"] then score = score - 0.1 end if an["арх"] then score = score - 0.1 end + if not g["од"] and not g["но"] and an["од"] and not an["но"] then score = score - 0.1 end for _, vv in ipairs(g or {}) do if vv:sub(1, 1) == '~' then vv = vv:sub(2) @@ -400,6 +401,14 @@ lang = { yo = false, "деревьях/пр"; "деревьям/дт"; }; + ["листья/мр,но,мн,С"] = { + "листья/им"; + "листья/вн"; + "листьев/рд"; + "листьями/тв"; + "листьях/пр"; + "листьям/дт"; + }; ["дерево/ср,но,С"] = { "дерево/им", "деревья/им,мн"; "дерево/вн", "деревья/вн,мн"; diff --git a/morph/mrd.lua b/morph/mrd.lua index 58149d4..c7d3402 100644 --- a/morph/mrd.lua +++ b/morph/mrd.lua @@ -605,9 +605,9 @@ end function mrd:dict(dict, word) if not dict then return end local tab = {} - local w, hints = str_hint(word) + local wrd, hints = str_hint(word) hints = str_split(hints, ",") - local tt = dict[w] + local tt = dict[wrd] if not tt then return