started a separate module for names

This commit is contained in:
Krasimir Angelov
2023-07-24 17:24:13 +02:00
parent 8b1309c99d
commit 645de9955a
100 changed files with 611 additions and 227 deletions
+1 -1
View File
@@ -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;
-9
View File
@@ -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
} ;
}
+2 -1
View File
@@ -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 ;
+24
View File
@@ -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
} ;
}