mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-12 08:30:12 -06:00
51 lines
1.4 KiB
Plaintext
51 lines
1.4 KiB
Plaintext
concrete NamesSpa of Names = CatSpa ** open Prelude, ResSpa, CommonRomance in {
|
|
|
|
lin GivenName = \n -> pn2np n ;
|
|
lin MaleSurname = \n -> pn2np {s = n.s ! Masc; g = Masc} ;
|
|
lin FemaleSurname = \n -> pn2np {s = n.s ! Fem; g = Fem} ;
|
|
lin PlSurname = \n -> heavyNPpol False {
|
|
s = \\c => prepCase c ++ n.pl ;
|
|
a = agrP3 Masc Pl
|
|
} ;
|
|
lin FullName gn sn = pn2np {
|
|
s = gn.s ++ sn.s ! gn.g ;
|
|
g = gn.g
|
|
} ;
|
|
|
|
lin PlainLN n = heavyNP {
|
|
s = \\c => prepCase c ++ n.s;
|
|
a = {g = n.g ; n = n.num ; p = P3}
|
|
} ;
|
|
|
|
|
|
lin UseLN n = heavyNP {
|
|
s = \\c => case n.art of {
|
|
UseArt => artDef False n.g n.num c ++ n.s;
|
|
NoArt => prepCase c ++ n.s
|
|
} ;
|
|
a = {g = n.g ; n = n.num ; p = P3}
|
|
} ;
|
|
|
|
lin InLN n = {
|
|
s = "en" ++
|
|
case n.art of {
|
|
UseArt => case n.g of {
|
|
Fem => case n.num of {
|
|
Sg => "la" ++ n.s;
|
|
Pl => "las" ++ n.s} ;
|
|
Masc => case n.num of {
|
|
Sg => "el" ++ n.s;
|
|
Pl => "los" ++ n.s
|
|
}
|
|
} ;
|
|
NoArt => n.s
|
|
} ;
|
|
} ;
|
|
|
|
|
|
lin AdjLN ap n = n ** {
|
|
s = preOrPost ap.isPre (ap.s ! AF n.g n.num) n.s ;
|
|
} ;
|
|
|
|
}
|