mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-19 16:20:16 -06:00
the names API in more languages
This commit is contained in:
@@ -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) ;
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user