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

View File

@@ -1,7 +1,7 @@
concrete CatRus of Cat = CommonX ** open ResRus, Prelude in {
flags coding=utf8 ; optimize=all ;
lincat
N, GN, SN, PN = ResRus.NounForms ;
N, GN, SN, LN, PN = ResRus.NounForms ;
N2 = ResRus.Noun2Forms ;
N3 = ResRus.Noun3Forms ;

View File

@@ -217,26 +217,4 @@ lin
oper
rus_quoted : Str -> Str = \s -> "«" ++ s ++ "»" ; ---- TODO bind ; move to Prelude?
lin GivenName, MaleSurname, FemaleSurname, PlSurname = \n -> n ;
lin FullName gn sn = {
snom = gn.snom ++ sn.snom ;
sgen = gn.snom ++ sn.sgen ;
sdat = gn.snom ++ sn.sdat ;
sacc = gn.snom ++ sn.sacc ;
sins = gn.snom ++ sn.sins ;
sprep = gn.snom ++ sn.sprep ;
sloc = gn.snom ++ sn.sloc ;
sptv = gn.snom ++ sn.sptv ;
svoc = gn.snom ++ sn.svoc ;
pnom = gn.snom ++ sn.pnom ;
pgen = gn.snom ++ sn.pgen ;
pdat = gn.snom ++ sn.pdat ;
pacc = gn.snom ++ sn.pacc ;
pins = gn.snom ++ sn.pins ;
pprep = gn.snom ++ sn.pprep ;
g = gn.g ;
mayben = gn.mayben ;
anim = gn.anim
} ;
} ;

View File

@@ -14,5 +14,6 @@ concrete GrammarRus of Grammar =
TextX,
StructuralRus,
IdiomRus,
TenseRus
** { flags startcat = Phr ; unlexer = text ; lexer = text ; coding=utf8 ;} ;
TenseRus,
NamesRus
** { flags startcat = Phr ; unlexer = text ; lexer = text ; coding=utf8 ;} ;

25
src/russian/NamesRus.gf Normal file
View File

@@ -0,0 +1,25 @@
concrete NamesRus of Names = CatRus ** open ResRus, Prelude in {
lin GivenName, MaleSurname, FemaleSurname, PlSurname = \pn ->
{ s=\\cas => (nounFormsNoun pn).s ! Sg ! cas ;
pron=False;
a=Ag (gennum pn.g Sg) 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
} ;
pron=False;
a=Ag (gennum gn.g Sg) P3
} ;
}