mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-15 18:10:12 -06:00
the names API in more languages
This commit is contained in:
@@ -1,31 +1,54 @@
|
||||
concrete NamesRus of Names = CatRus ** open ResRus, Prelude in {
|
||||
concrete NamesRus of Names = CatRus ** open ResRus, MorphoRus, Prelude in {
|
||||
|
||||
lin GivenName, MaleSurname, FemaleSurname, PlSurname = \pn ->
|
||||
{ s=\\cas => (nounFormsNoun pn).s ! Sg ! cas ;
|
||||
lin GivenName gn =
|
||||
{ s=gn.s ;
|
||||
pron=False;
|
||||
a=Ag (gennum pn.g Sg) P3
|
||||
a=let g = case gn.g of {
|
||||
Male => Masc ;
|
||||
Female => Fem
|
||||
}
|
||||
in Ag (gennum g Sg) P3
|
||||
} ; -- Does NP need animacy?
|
||||
lin MaleSurname sn =
|
||||
{ s=\\cas => sn.s ! Male ! cas ;
|
||||
pron=False;
|
||||
a=Ag (GSg Masc) P3
|
||||
} ; -- Does NP need animacy?
|
||||
lin FemaleSurname sn =
|
||||
{ s=\\cas => sn.s ! Female ! cas ;
|
||||
pron=False;
|
||||
a=Ag (GSg Fem) P3
|
||||
} ; -- Does NP need animacy?
|
||||
lin PlSurname sn =
|
||||
{ s=sn.p ;
|
||||
pron=False;
|
||||
a=Ag GPl P3
|
||||
} ; -- Does NP need animacy?
|
||||
|
||||
lin FullName gn sn =
|
||||
{ s= table {
|
||||
Nom => gn.snom ++ sn.snom ;
|
||||
Gen => gn.snom ++ sn.sgen ;
|
||||
Dat => gn.snom ++ sn.sdat ;
|
||||
Acc => gn.snom ++ sn.sacc ;
|
||||
Ins => gn.snom ++ sn.sins ;
|
||||
Pre => gn.snom ++ sn.sprep ;
|
||||
Loc => gn.snom ++ sn.sloc ;
|
||||
Ptv => gn.snom ++ sn.sptv ;
|
||||
VocRus => gn.snom ++ sn.svoc
|
||||
} ;
|
||||
{ s=\\cas => gn.s ! Nom ++ sn.s ! gn.g ! cas ;
|
||||
pron=False;
|
||||
a=Ag (gennum gn.g Sg) P3
|
||||
a=let g = case gn.g of {
|
||||
Male => Masc ;
|
||||
Female => Fem
|
||||
}
|
||||
in Ag (GSg g) P3
|
||||
} ;
|
||||
|
||||
UseLN pn = {
|
||||
s=\\cas => (nounFormsNoun pn).s ! Sg ! cas ;
|
||||
UseLN, PlainLN = \ln -> {
|
||||
s=\\cas => ln.s ! cas ;
|
||||
pron=False;
|
||||
a=Ag (gennum pn.g Sg) P3
|
||||
a=Ag (gennum ln.g ln.n) P3
|
||||
} ; -- Does NP need animacy?
|
||||
|
||||
InLN ln = ss (applyPrep {s=v_prep_mod; c=Loc; hasPrep=True} {
|
||||
s=ln.s ;
|
||||
pron=False;
|
||||
a=Ag (gennum ln.g ln.n) P3
|
||||
}) ; -- Does NP need animacy?
|
||||
|
||||
AdjLN ap ln = ln ** {
|
||||
s=\\cas => preOrPost (notB ap.isPost) (ap.s ! (gennum ln.g ln.n) ! ln.anim ! cas) (ln.s ! cas)
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user