the names API in more languages

This commit is contained in:
Krasimir Angelov
2023-08-16 19:39:22 +02:00
parent d25d648134
commit 6bc965f6c2
69 changed files with 1584 additions and 270 deletions

View File

@@ -1,4 +1,4 @@
concrete NamesGer of Names = CatGer ** open ResGer in {
concrete NamesGer of Names = CatGer ** open ResGer, Prelude in {
lin GivenName gn = {
s = \\c => usePrepC c (\k -> gn.s ! k) ;
@@ -31,15 +31,40 @@ lin PlSurname sn = {
lin FullName gn sn = {
s = \\c => usePrepC c (\k -> gn.s ! Nom ++ sn.s ! gn.g ! k) ;
a = agrgP3 (sex2gender gn.g) Sg ;
w = WLight ;
rc, ext = []
} ;
lin UseLN ln = {
s = \\c => case ln.hasArt of {
True => artDefContr (gennum ln.g ln.n) c ++ usePrepC c (\k -> ln.s ! Weak ! k) ;
False => usePrepC c (\k -> ln.s ! adjfCase Strong k ! k)
} ;
a = agrgP3 ln.g ln.n ;
w = WLight ;
rc, ext = []
} ;
lin UseLN pn = {
s = \\c => usePrepC c (\k -> pn.s ! k) ;
a = agrgP3 pn.g pn.n ;
lin PlainLN ln = {
s = \\c => usePrepC c (\k -> ln.s ! adjfCase Strong k ! k) ;
a = agrgP3 ln.g ln.n ;
w = WLight ;
rc, ext = []
} ;
lin InLN ln = {
s = let c = NPP CInDat
in case ln.hasArt of {
True => artDefContr (gennum ln.g ln.n) c ++ usePrepC c (\k -> ln.s ! Weak ! k) ;
False => usePrepC c (\k -> ln.s ! adjfCase Strong k ! k)
} ;
} ;
lin AdjLN ap ln = ln ** {
s = \\a,c =>
preOrPost ap.isPre
(ap.c.p1 ++ ap.c.p2 ++ ap.s ! agrAdj ln.g a ln.n c ++ ap.ext)
(ln.s ! a ! c) ;
} ;
}