support for compounding nouns

This commit is contained in:
Krasimir Angelov
2024-11-01 09:15:55 +01:00
parent 466c7da532
commit 37e08ad739
4 changed files with 367 additions and 4 deletions
+11
View File
@@ -1534,22 +1534,33 @@ compoundN = overload {
s = \\spec,num => a.s ! spec ! genNum n.g num ++ n.s ! Indef ! num ;
count_form = a.s ! Indef ! genNum n.g Pl ++ n.count_form ;
vocative = \\num => a.s ! Indef ! genNum n.g num ++ n.vocative ! num ;
rel = \\_,_ => a.s ! Indef ! GSg n.g ++ n.s ! Indef ! Sg ;
relType = Pref ;
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 ;
rel = \\_,_ => n.s ! Indef ! Sg ++ adv ;
relType = Pref ;
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 ;
rel = \\_,_ => pref ++ n.s ! Indef ! Sg ;
relType = Pref ;
g = n.g
}
} ;
dualN = overload {
dualN : N -> A -> N = \n,a -> n ** {rel=a.s; relType=AdjMod} ;
dualN : N -> Str -> N = \n,adv -> n ** {rel=\\_,_=>adv; relType=AdvMod} ;
} ;
mkPN : Str -> PN = \s -> lin PN {s=s} ;
mkLN : Str -> LN = \s -> lin LN {s=s} ;
mkGN : Str -> GN = \s -> lin GN {s=s} ;