mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-25 19:16:28 -06:00
started a separate module for names
This commit is contained in:
@@ -58,7 +58,7 @@ lincat
|
||||
|
||||
GN = {s : Case => Str; g : Sex};
|
||||
SN = {s : Sex => Case => Str};
|
||||
PN = {s : Case => Str; g : AGender; n : Number};
|
||||
LN, PN = {s : Case => Str; g : AGender; n : Number};
|
||||
|
||||
linref
|
||||
V, VA, VS, V2, V3, V2A, V2S, V2Q, V2V = \v -> v.s ! VInf ++ v.refl ++ v.p;
|
||||
|
||||
@@ -57,14 +57,5 @@ lin
|
||||
youPolPl_Pron = youPol_Pron ;
|
||||
youPolPlFem_Pron = youPlFem_Pron ;
|
||||
|
||||
lin GivenName = \n -> {s = n.s; g = sex2agender n.g; n = Sg} ;
|
||||
lin MaleSurname = \n -> {s = n.s ! Male; g = AMasc Animate; n = Sg} ;
|
||||
lin FemaleSurname = \n -> {s = n.s ! Female; g = AFem; n = Sg} ;
|
||||
lin FullName gn sn = {
|
||||
s = \\c => gn.s ! Nom ++ sn.s ! gn.g ! c ;
|
||||
g = sex2agender gn.g ;
|
||||
n = Sg
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ concrete GrammarSlv of Grammar =
|
||||
TextX - [Pol,PPos,PNeg],
|
||||
StructuralSlv,
|
||||
IdiomSlv, ----AR
|
||||
TenseX
|
||||
TenseX,
|
||||
NamesSlv
|
||||
** {
|
||||
|
||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
concrete NamesSlv of Names = CatSlv ** open ResSlv, Prelude in {
|
||||
|
||||
lin GivenName = \n -> {
|
||||
s = n.s;
|
||||
a = {g=agender2gender (sex2agender n.g); n=Sg; p=P3};
|
||||
isPron = False
|
||||
} ;
|
||||
lin MaleSurname = \n -> {
|
||||
s = n.s ! Male;
|
||||
a = {g=Masc; n=Sg; p=P3};
|
||||
isPron = False
|
||||
} ;
|
||||
lin FemaleSurname = \n -> {
|
||||
s = n.s ! Female;
|
||||
a = {g=Fem; n=Sg; p=P3};
|
||||
isPron = False
|
||||
} ;
|
||||
lin FullName gn sn = {
|
||||
s = \\c => gn.s ! Nom ++ sn.s ! gn.g ! c ;
|
||||
a = {g=agender2gender (sex2agender gn.g); n=Sg; p=P3};
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user