1
0
forked from GitHub/gf-core

German resource grammar: major changes.

This commit is contained in:
scharolta_siencnik
2015-07-23 15:50:05 +00:00
parent 7b26356d35
commit ba14a8a7e5
18 changed files with 447 additions and 256 deletions

View File

@@ -119,7 +119,6 @@ mkN : overload {
mkN3 : N -> Prep -> Prep -> N3 ; -- noun + two prepositions
--3 Proper names and noun phrases
--
-- Proper names, with an "s" genitive and other cases like the
@@ -127,15 +126,15 @@ mkN : overload {
-- taken into account.
mkPN : overload {
mkPN : Str -> PN ; -- regular name with genitive in "s"
mkPN : Str -> Gender -> PN ; -- regular name with genitive in "s"
-- If only the genitive differs, two strings are needed.
mkPN : (nom,gen : Str) -> PN ; -- name with other genitive
mkPN : (nom,gen : Str) -> Gender -> PN ; -- name with other genitive
-- In the worst case, all four forms are needed.
mkPN : (nom,acc,dat,gen : Str) -> PN ; -- name with all case forms
mkPN : (nom,acc,dat,gen : Str) -> Gender -> PN ; -- name with all case forms
-- Inflection can also be inherited from the singular forms of a common noun.
@@ -145,6 +144,8 @@ mkN : overload {
--2 Adjectives
mkA : overload {
@@ -454,21 +455,22 @@ mkV2 : overload {
mkN3 = \n,p,q -> n ** {c2 = p ; c3 = q ; lock_N3 = <>} ;
mk2PN = \karolus, karoli ->
{s = table {Gen => karoli ; _ => karolus} ; lock_PN = <>} ;
regPN = \horst ->
mk2PN horst (ifTok Tok (Predef.dp 1 horst) "s" horst (horst + "s")) ;
mk2PN = \karolus, karoli, g ->
{s = table {Gen => karoli ; _ => karolus} ; g = g ; lock_PN = <>} ;
regPN = \horst, g ->
mk2PN horst (ifTok Tok (Predef.dp 1 horst) "s" horst (horst + "s")) g ;
mkPN = overload {
mkPN : Str -> PN = regPN ;
mkPN : N -> PN = \n -> lin PN {s = n.s ! Sg} ;
mkPN : (nom,gen : Str) -> PN = mk2PN ;
mkPN : (nom,acc,dat,gen : Str) -> PN = \nom,acc,dat,gen ->
{s = table {Nom => nom ; Acc => acc ; Dat => dat ; Gen => gen} ; lock_PN = <>}
mkPN : Str -> Gender -> PN = regPN ;
mkPN : N -> PN = \n -> lin PN {s = n.s ! Sg; g = n.g} ;
mkPN : (nom,gen : Str) -> Gender -> PN = mk2PN ;
mkPN : (nom,acc,dat,gen : Str) -> Gender -> PN = \nom,acc,dat,gen,g ->
{s = table {Nom => nom ; Acc => acc ; Dat => dat ; Gen => gen} ;
g = g ; lock_PN = <>}
} ;
mk2PN : (karolus, karoli : Str) -> PN ; -- karolus, karoli
regPN : (Johann : Str) -> PN ;
mk2PN : (karolus, karoli : Str) -> Gender -> PN ; -- karolus, karoli
regPN : (Johann : Str) -> Gender -> PN ;
-- Johann, Johanns ; Johannes, Johannes
@@ -553,22 +555,17 @@ mkV2 : overload {
seinV v = v ** {aux = VSein} ;
reflV v c = v ** {aux = VHaben ; vtype = VRefl (prepC c).c} ;
no_geV v = let vs = v.s in {
no_geV v = let vs = v.s in v ** {
s = table {
p@(VPastPart _) => Predef.drop 2 (vs ! p) ;
p => vs ! p
} ;
prefix = v.prefix ; particle = v.particle ; lock_V = v.lock_V ; aux = v.aux ; vtype = v.vtype
} ;
p => vs ! p }};
fixprefixV s v = let vs = v.s in {
fixprefixV s v = let vs = v.s in v ** {
s = table {
VInf True => "zu" ++ (s + vs ! VInf False) ;
p@(VPastPart _) => s + Predef.drop 2 (vs ! p) ;
p => s + vs ! p
} ;
prefix = v.prefix ; particle = v.particle ; lock_V = v.lock_V ; aux = v.aux ; vtype = v.vtype
} ;
}} ;
haben_V = MorphoGer.haben_V ** {particle = [] ; lock_V = <>} ;
sein_V = MorphoGer.sein_V ** {particle = [] ; lock_V = <>} ;