added compoundN, compoundV, genNum

This commit is contained in:
Krasimir Angelov
2026-04-28 11:09:29 +02:00
parent 56e97ebfff
commit f497b4a63a
2 changed files with 30 additions and 0 deletions

View File

@@ -1148,6 +1148,19 @@ oper
_ => regN form1
} ;
compoundN = overload {
compoundN : A -> N -> N = \a,n -> {
s = \\c,num => a.s ! c ! genNum n.g num ++ n.s ! c ! num ;
Voc = \\num => a.s ! Nom ! genNum n.g num ++ n.Voc ! num ;
g = n.g
} ;
compoundN : N -> Str -> N = \n,adv -> {
s = \\c,num => n.s ! c ! num ++ adv ;
Voc = \\num => n.Voc ! num ++ adv ;
g = n.g
}
} ;
regV : Str -> V -- Active;Imperf;Pres;P1;Sg
= \form -> case form of {
_ + "вати" => mkV036 form;
@@ -1213,6 +1226,17 @@ oper
_ => regV form1
} ;
compoundV : V -> Str -> V = \v,adv -> {
active = \\a => {Past=(v.active ! a).Past ++ adv ;
Pres=\\p,num=>(v.active ! a).Pres ! p ! num ++ adv
} ;
imperative1 = v.imperative1 ++ adv ;
imperative2 = \\num => v.imperative2 ! num ++ adv ;
infinitive = v.infinitive ++ adv ;
participle = \\g,num => v.participle ! g ! num ++ adv ;
passive = \\a,t => v.passive ! a ! t ++ adv
} ;
regA : Str -> A -- s;Nom;('GSg', Masc)
= \form -> case form of {
_ + "ій" => mkA003 form;

View File

@@ -113,6 +113,12 @@ oper mkV : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> V
} ;
param GenNum = GSg Gender | GPl ;
oper genNum : Gender -> Number -> GenNum = \g,n ->
case n of {
Sg => GSg g ;
Pl => GPl
} ;
oper A = {s: Case => GenNum => Str} ; -- 4394
oper mkA : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> A =
\f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13,f14,f15,f16,f17,f18,f19,f20,f21,f22,f23,f24 ->