1
0
forked from GitHub/gf-rgl

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

@@ -102,7 +102,7 @@ concrete CatGer of Cat =
N3 = ResGer.Noun ** {c2,c3 : Preposition} ;
GN = {s : Case => Str; g : Sex} ;
SN = {s : Sex => Case => Str} ;
PN = {s : Case => Str; g : Gender; n : Number} ;
LN, PN = {s : Case => Str; g : Gender; n : Number} ;
-- tense with possibility to choose conjunctive forms

View File

@@ -142,16 +142,6 @@ lin
n = Pl
} ;
lin GivenName = \n -> { s = n.s; g = sex2gender n.g; n = Sg } ;
lin MaleSurname = \n -> { s = n.s ! Male ; g = Masc; n = Sg } ;
lin FemaleSurname = \n -> { s = n.s ! Female ; g = Fem; n = Sg } ;
lin PlSurname = \n -> { s = n.s ! Male ; g = Masc; n = Pl } ;
lin FullName gn sn = {
s = \\c => gn.s ! Nom ++ sn.s ! gn.g ! c ;
g = sex2gender gn.g ;
n = Sg
} ;
lin PassVPSlash vp =
insertObj (\\_ => (PastPartAP vp).s ! APred) (predV werdenPass) **
{ c1 = subjPrep vp.c2 } ;

View File

@@ -14,7 +14,8 @@ concrete GrammarGer of Grammar =
TextX - [Tense,Temp],
IdiomGer,
StructuralGer,
TenseGer
TenseGer,
NamesGer
** {
flags startcat = Phr ; unlexer = text ; lexer = text ;

38
src/german/NamesGer.gf Normal file
View File

@@ -0,0 +1,38 @@
concrete NamesGer of Names = CatGer ** open ResGer in {
lin GivenName gn = {
s = \\c => usePrepC c (\k -> gn.s ! k) ;
a = agrgP3 (sex2gender gn.g) Sg ;
w = WLight ;
rc, ext = []
} ;
lin MaleSurname sn = {
s = \\c => usePrepC c (\k -> sn.s ! Male ! k) ;
a = agrgP3 Masc Sg ;
w = WLight ;
rc, ext = []
} ;
lin FemaleSurname sn = {
s = \\c => usePrepC c (\k -> sn.s ! Female ! k) ;
a = agrgP3 Fem Sg ;
w = WLight ;
rc, ext = []
} ;
lin PlSurname sn = {
s = \\c => usePrepC c (\k -> sn.s ! Male ! k) ;
a = agrgP3 Masc Pl ;
w = WLight ;
rc, ext = []
} ;
lin FullName gn sn = {
s = \\c => usePrepC c (\k -> gn.s ! Nom ++ sn.s ! gn.g ! k) ;
a = agrgP3 (sex2gender gn.g) Sg ;
w = WLight ;
rc, ext = []
} ;
}