overloaded compoundN

This commit is contained in:
Krasimir Angelov
2024-10-31 12:57:46 +01:00
parent 4de1b64b58
commit 1111ca0fdd
2 changed files with 25 additions and 5 deletions

View File

@@ -1533,11 +1533,25 @@ mkN2 = overload {
mkN2 : N -> Prep -> N2 = \n,p -> lin N2 n ** {c2=p}; mkN2 : N -> Prep -> N2 = \n,p -> lin N2 n ** {c2=p};
} ; } ;
compoundN : A -> N -> N = \a,n -> lin N { compoundN = overload {
s = \\spec,num => a.s ! spec ! genNum n.g num ++ n.s ! Indef ! num ; compoundN : A -> N -> N = \a,n -> lin N {
count_form = a.s ! Indef ! genNum n.g Pl ++ n.count_form ; s = \\spec,num => a.s ! spec ! genNum n.g num ++ n.s ! Indef ! num ;
vocative = \\num => a.s ! Indef ! genNum n.g num ++ n.vocative ! num ; count_form = a.s ! Indef ! genNum n.g Pl ++ n.count_form ;
g = n.g vocative = \\num => a.s ! Indef ! genNum n.g num ++ n.vocative ! num ;
g = n.g
} ;
compoundN : N -> Str -> N = \n,adv -> lin N {
s = \\spec,num => n.s ! spec ! num ++ adv ;
count_form = n.count_form ++ adv ;
vocative = \\num => n.vocative ! num ++ adv ;
g = n.g
} ;
compoundN : Str -> N -> N = \pref,n -> lin N {
s = \\spec,num => pref ++ n.s ! spec ! num ;
count_form = pref ++ n.count_form ;
vocative = \\num => pref ++ n.vocative ! num ;
g = n.g
}
} ; } ;
mkPN : Str -> PN = \s -> lin PN {s=s} ; mkPN : Str -> PN = \s -> lin PN {s=s} ;

View File

@@ -184,4 +184,10 @@ oper mkPron : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Pron =
} }
} ; } ;
genNum : Gender -> Number -> GenNum = \g,n ->
case n of {
Sg => GSg g ;
Pl => GPl
} ;
} }