mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-26 11:36:27 -06:00
Ger: improved infinitives (and passives); tests with more verbs in testing/german
- NP: added field isLight in order to push negation behind light nps;
this had been done in gf-3.9 using field isPron, but isPron is now
used to put accusative pronoun before dative pronoun. Removed field
adv: adverbial extensions cannot be extracted (todo: also for CN).
Reduced isLight*isPron to w:Weight with 3 values: WPron, WLight, WHeavy.
- added param Control and field ctrl:Control to classify V2V-verbs into
subject- and object-contol verbs, use ctrl to make reflexives agree
with subject resp. object in VPSlash, and refine ComplSlash.
- Verb: new versions of ComplVV, SlashV2V and SlashVV to give better
(nested) infinitives (extracting infzu and correcting object order).
a) nested SlashVV doesn't work properly;
b) SlashV2VNP may have to be commented out to prevent a stack overflow
when compiling.
Intended change of SlashV2VNP in tests/german/TestLangGer could not
be tested due to size problems with the compiler.
- VP: changed field a1 : Polarity => Str to a1:Str to collect the adverbs
coming before negation, using (negation : Polarity => Str) in mkClause.
Use objCtrl:Bool instead of missingAdv to let reflexives agree with object.
- ResGer: insertObjNP reorganized, infzuVP added
- DictVerbsGer: some corrections (helft -> hilft, *sprecht -> *spricht)
- Some potential passive rules in tests/german/TestLangGer|Eng
- ExtraGer needs to be cleaned up with repect to the modified mkClause.
This commit is contained in:
+35
-23
@@ -13,7 +13,8 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
ConjVPI = conjunctDistrTable Bool ;
|
||||
|
||||
ComplVPIVV v vpi =
|
||||
insertInf (vpi.s ! v.isAux) (
|
||||
-- insertInf (vpi.s ! v.isAux) (
|
||||
insertInf {s=(vpi.s ! v.isAux);isAux=v.isAux;ctrl=SubjC} ( -- HL ??
|
||||
predVGen v.isAux v) ; ----
|
||||
{-
|
||||
insertExtrapos vpi.p3 (
|
||||
@@ -42,15 +43,19 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
DetNPMasc det = {
|
||||
s = \\c => det.sp ! Masc ! c ; ---- genders
|
||||
a = agrP3 det.n ;
|
||||
isPron = False ;
|
||||
ext, adv, rc = []
|
||||
-- isPron = False ;
|
||||
-- isLight = True ;
|
||||
w = WLight ;
|
||||
ext, rc = []
|
||||
} ;
|
||||
|
||||
DetNPFem det = {
|
||||
s = \\c => det.sp ! Fem ! c ; ---- genders
|
||||
a = agrP3 det.n ;
|
||||
isPron = False ;
|
||||
ext, adv, rc = []
|
||||
-- isPron = False ;
|
||||
-- isLight = True ;
|
||||
w = WLight ;
|
||||
ext, rc = []
|
||||
} ;
|
||||
|
||||
EmptyRelSlash slash = {
|
||||
@@ -63,7 +68,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
PassVPSlash vp =
|
||||
let c = case <vp.c2.c,vp.c2.isPrep> of {
|
||||
<NPC Acc,False> => NPC Nom ;
|
||||
_ => vp.c2.c}
|
||||
_ => vp.c2.c}
|
||||
in insertObj (\\_ => (PastPartAP vp).s ! APred) (predV werdenPass) **
|
||||
{subjc = vp.c2 ** {c= c}} ;
|
||||
-- regulates passivised object: accusative objects -> nom; all others: same case
|
||||
@@ -73,8 +78,12 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
PassAgentVPSlash vp np = ---- "von" here, "durch" in StructuralGer
|
||||
insertObj (\\_ => (PastPartAgentAP (lin VPSlash vp) (lin NP np)).s ! APred) (predV werdenPass) ;
|
||||
|
||||
Pass3V3 v = -- HL 7/19
|
||||
let bekommenPass : Verb = P.habenV (P.irregV "bekommen" "bekommt" "bekam" "bekäme" "bekommen")
|
||||
in insertObj (\\_ => (v.s ! VPastPart APred)) (predV bekommenPass) ** { subjc = PrepNom ; c2 = v.c2 } ;
|
||||
|
||||
PastPartAP vp = {
|
||||
s = \\af => (vp.nn ! agrP3 Sg).p1 ++ (vp.nn ! agrP3 Sg).p2 ++ (vp.nn ! agrP3 Sg).p3 ++ vp.a2 ++ vp.inf ++
|
||||
s = \\af => (vp.nn ! agrP3 Sg).p1 ++ (vp.nn ! agrP3 Sg).p2 ++ (vp.nn ! agrP3 Sg).p3 ++ vp.a2 ++ vp.inf.s ++
|
||||
vp.ext ++ vp.infExt ++ vp.s.s ! VPastPart af ;
|
||||
isPre = True ;
|
||||
c = <[],[]> ;
|
||||
@@ -85,7 +94,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
let agent = appPrepNP P.von_Prep np
|
||||
in {
|
||||
s = \\af => (vp.nn ! agrP3 Sg).p1 ++ (vp.nn ! agrP3 Sg).p2 ++ (vp.nn ! agrP3 Sg).p3 ++ vp.a2 ++ agent ++
|
||||
vp.inf ++
|
||||
vp.inf.s ++
|
||||
vp.c2.s ++ --- junk if not TV
|
||||
vp.ext ++ vp.infExt ++ vp.s.s ! VPastPart af ;
|
||||
isPre = True ;
|
||||
@@ -129,7 +138,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
m = tm.m ;
|
||||
subj = [] ;
|
||||
verb = vps.s ! ord ! agr ! VPFinite m t a ;
|
||||
neg = tm.s ++ p.s ++ vp.a1 ! b ;
|
||||
neg = tm.s ++ p.s ++ vp.a1 ++ negation ! b ; -- HL 8/19 ++ vp.a1 ! b ;
|
||||
-- obj1 = (vp.nn ! agr).p1 ;
|
||||
-- obj = (vp.nn ! agr).p2 ;
|
||||
-- compl = obj1 ++ neg ++ obj ++ vp.a2 ; -- from EG 15/5
|
||||
@@ -137,19 +146,19 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
obj2 = (vp.nn ! agr).p3 ; -- pp-objects
|
||||
obj3 = (vp.nn ! agr).p4 ++ vp.adj ++ vp.a2 ; -- pred.AP|CN|Adv, via useComp HL 6/2019
|
||||
compl = obj1 ++ neg ++ obj2 ++ obj3 ;
|
||||
inf = vp.inf ++ verb.inf ++ verb.inf2 ;
|
||||
inf = vp.inf.s ++ verb.inf ++ verb.inf2 ;
|
||||
extra = vp.ext ;
|
||||
infE : Str = -- HL 30/6/2019
|
||||
case <t,a,vp.isAux> of {
|
||||
<Fut|Cond,Simul,True> => inf ; --# notpresent
|
||||
<Fut|Cond,Anter,True> -- Duden 318: kommen wollen haben => haben kommen wollen --# notpresent
|
||||
=> verb.inf2 ++ vp.inf ++ verb.inf ; --# notpresent
|
||||
=> verb.inf2 ++ vp.inf.s ++ verb.inf ; --# notpresent
|
||||
<_,Anter,True> => inf ; --# notpresent
|
||||
_ => verb.inf ++ verb.inf2 ++ vp.inf } ;
|
||||
_ => verb.inf ++ verb.inf2 ++ vp.inf.s } ;
|
||||
inffin : Str =
|
||||
case <t,a,vp.isAux> of {
|
||||
<Fut|Cond,Anter,True> -- ... wird|würde haben kommen wollen --# notpresent
|
||||
=> verb.fin ++ verb.inf2 ++ vp.inf ++ verb.inf ; --# notpresent
|
||||
=> verb.fin ++ verb.inf2 ++ vp.inf.s ++ verb.inf ; --# notpresent
|
||||
<_,Anter,True> --# notpresent
|
||||
=> verb.fin ++ inf ; -- double inf --# notpresent
|
||||
_ => inf ++ verb.fin --- or just auxiliary vp
|
||||
@@ -204,8 +213,8 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
|
||||
lin
|
||||
EsVV vv vp = predV vv ** {
|
||||
nn = \\a => let n = vp.nn ! a in <"es" ++ n.p1 , n.p2 , n.p3, n.p4> ;
|
||||
inf = vp.s.s ! (VInf True) ++ vp.inf ; -- ich genieße es zu versuchen zu gehen; alternative word order could be produced by vp.inf ++ vp.s.s... (zu gehen zu versuchen)
|
||||
nn = \\a => let n = vp.nn ! a in <"es" ++ n.p1, n.p2, n.p3, n.p4, n.p5, n.p6> ;
|
||||
inf = vp.inf ** {s = vp.s.s ! (VInf True) ++ vp.inf.s} ; -- ich genieße es zu versuchen zu gehen; alternative word order could be produced by vp.inf ++ vp.s.s... (zu gehen zu versuchen)
|
||||
a1 = vp.a1 ;
|
||||
a2 = vp.a2 ;
|
||||
ext = vp.ext ;
|
||||
@@ -213,7 +222,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
adj = vp.adj } ;
|
||||
|
||||
EsV2A v2a ap s = predV v2a ** {
|
||||
nn = \\_ => <"es",[],[],[]> ;
|
||||
nn = \\_ => <"es",[],[],[],[],[]> ;
|
||||
adj = ap.s ! APred ;
|
||||
ext = "," ++ "dass" ++ s.s ! Sub} ;
|
||||
|
||||
@@ -228,7 +237,7 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
let vp = predV werdenPass ;
|
||||
in vp ** {
|
||||
subj = esSubj ;
|
||||
inf = v.s ! VPastPart APred } ; -- construct the formal clause
|
||||
inf = vp.inf ** {s = v.s ! VPastPart APred } } ; -- construct the formal clause
|
||||
|
||||
AdvFor adv fcl = fcl ** {a2 = adv.s} ;
|
||||
|
||||
@@ -244,9 +253,12 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
|
||||
esSubj : NP = lin NP {
|
||||
s = \\_ => "es" ;
|
||||
rc, ext, adv = [] ;
|
||||
rc, ext = [] ;
|
||||
a = Ag Neutr Sg P3 ;
|
||||
isPron = True} ;
|
||||
-- isLight = True ;
|
||||
-- isPron = True
|
||||
w = WPron
|
||||
} ;
|
||||
|
||||
DisToCl : Str -> Agr -> FClause -> Clause = \subj,agr,vp ->
|
||||
let vps = useVP vp in {
|
||||
@@ -257,11 +269,11 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
_ => False
|
||||
} ;
|
||||
verb = vps.s ! ord ! agr ! VPFinite m t a ;
|
||||
neg = vp.a1 ! b ;
|
||||
neg = vp.a1 ++ negation ! b ; -- HL 8/19 vp.a1 ! b ;
|
||||
obj1 = (vp.nn ! agr).p1 ;
|
||||
obj2 = (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ;
|
||||
compl = obj1 ++ neg ++ vp.adj ++ obj2 ++ vp.a2 ; -- adj added
|
||||
inf = vp.inf ++ verb.inf ; -- not used for linearisation of Main/Inv
|
||||
inf = vp.inf.s ++ verb.inf ; -- not used for linearisation of Main/Inv
|
||||
extra = vp.ext ;
|
||||
inffin : Str =
|
||||
case <a,vp.isAux> of {
|
||||
@@ -270,8 +282,8 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
}
|
||||
in
|
||||
case o of {
|
||||
Main => subj ++ verb.fin ++ compl ++ vp.infExt ++ verb.inf ++ extra ++ vp.inf ;
|
||||
Inv => verb.fin ++ compl ++ vp.infExt ++ verb.inf ++ extra ++ vp.inf ;
|
||||
Main => subj ++ verb.fin ++ compl ++ vp.infExt ++ verb.inf ++ extra ++ vp.inf.s ;
|
||||
Inv => verb.fin ++ compl ++ vp.infExt ++ verb.inf ++ extra ++ vp.inf.s ;
|
||||
Sub => compl ++ vp.infExt ++ inffin ++ extra }
|
||||
} ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user