forked from GitHub/gf-rgl
the names API in more languages
This commit is contained in:
@@ -1,8 +1,22 @@
|
||||
concrete NamesEng of Names = CatEng ** open Prelude, ResEng in {
|
||||
|
||||
lin GivenName gn = {s = \\c => gn.s ! npcase2case c ; a = agrgP3 Sg gn.g} ;
|
||||
lin MaleSurname, FemaleSurname = \sn -> {s = \\c => sn.s ! npcase2case c ; a = agrgP3 Sg sn.g} ;
|
||||
lin FullName gn sn = {s = \\c => gn.s ! Nom ++ sn.s ! npcase2case c ; a = agrgP3 Sg gn.g} ;
|
||||
lin GivenName gn = {
|
||||
s = \\c => gn.s ! npcase2case c ;
|
||||
a = case gn.g of {
|
||||
Male => agrgP3 Sg Masc ;
|
||||
Female => agrgP3 Sg Fem
|
||||
}
|
||||
} ;
|
||||
lin MaleSurname = \sn -> {s = \\c => sn.s ! Male ! npcase2case c ; a = agrgP3 Sg Masc} ;
|
||||
lin FemaleSurname = \sn -> {s = \\c => sn.s ! Female ! npcase2case c ; a = agrgP3 Sg Fem} ;
|
||||
lin PlSurname = \sn -> {s = \\c => sn.p ! npcase2case c ; a = agrgP3 Pl Masc} ;
|
||||
lin FullName gn sn = {
|
||||
s = \\c => gn.s ! Nom ++ sn.s ! gn.g ! npcase2case c ;
|
||||
a = case gn.g of {
|
||||
Male => agrgP3 Sg Masc ;
|
||||
Female => agrgP3 Sg Fem
|
||||
}
|
||||
} ;
|
||||
|
||||
lin UseLN n = {
|
||||
s = \\c => case n.art of {
|
||||
@@ -18,10 +32,15 @@ lin PlainLN n = {
|
||||
} ;
|
||||
|
||||
lin InLN n = {
|
||||
s = n.p ++ case n.art of {
|
||||
True => "the" ++ n.s ! Nom ;
|
||||
False => n.s ! Nom
|
||||
} ;
|
||||
s = case n.prep of {
|
||||
InPrep => "in" ;
|
||||
OnPrep => "on" ;
|
||||
AtPrep => "at"
|
||||
} ++
|
||||
case n.art of {
|
||||
True => "the" ++ n.s ! Nom ;
|
||||
False => n.s ! Nom
|
||||
} ;
|
||||
} ;
|
||||
|
||||
lin AdjLN ap n = n ** {
|
||||
|
||||
Reference in New Issue
Block a user