mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-28 12:26:30 -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:
+91
-25
@@ -4,7 +4,7 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
||||
|
||||
lin
|
||||
UseV = predV ;
|
||||
|
||||
{-
|
||||
ComplVV v vp =
|
||||
let
|
||||
vpi = infVP v.isAux vp ;
|
||||
@@ -14,6 +14,32 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
||||
insertInfExt vpi.p3 (
|
||||
insertInf vpi.p2 (
|
||||
insertObjc vpi.p1 vps))) ;
|
||||
-}
|
||||
-- HL 7/19
|
||||
ComplVV v vp = -- will|wage (es ([]|zu) tun [] | ihn [es tun] ([]|zu) lassen
|
||||
let
|
||||
vps = predVGen v.isAux v ;
|
||||
vpi = infzuVP v.isAux SubjC Simul Pos vp ;
|
||||
-- { objs: ihm ; pred: []/zu versprechen, objInf: sich/es zu tun }
|
||||
-- (ich) vfin:werde (ihm ([]/zu) versprechen) vinf:(wollen/gewagt haben) (, es zu tun)
|
||||
-- (ich) vfin:werde (ihn (es tun) lassen)/[] vinf:(wollen/gewagt haben) []/(, ihn (es tun) zu lassen)
|
||||
extInfzu = case <vp.isAux,vp.inf.isAux> of {<True,False> => (vp.nn!(Ag Masc Sg P3)).p6 ; _ => []} ;
|
||||
comma = case vp.inf.ctrl of { NoC => [] ; _ => bindComma} ; -- es (zu) tun
|
||||
embeddedInf : Agr => Str =
|
||||
case <vp.isAux,vp.inf.isAux> of { -- vv + vp + [embeddedInf]
|
||||
-- will [es lesen] können | will ihn [es lesen] lassen
|
||||
<True,True> => \\agr => (vp.nn!agr).p5 ++ (vp.nn!agr).p6 ++ vpi.inf ;
|
||||
-- will ihn [euch (extInfzu) bitten] lassen
|
||||
<True,False> => \\agr => (vp.nn!agr).p5 ++ vpi.inf ; -- ++ (vp.nn!agr).p6 => extInfzu
|
||||
-- will es lesen [] | will ihn bitten [, es zu lesen] | will ihn bitten [, sie es lesen zu lassen]
|
||||
<False,True> => \\agr => comma ++ (vp.nn!agr).p5 ++ (vp.nn!agr).p6 ++ vpi.inf ;
|
||||
-- will ihn bitten [, ihr zu helfen, es zu lesen]
|
||||
<False,False> => \\agr => comma ++ (vp.nn!agr).p5 ++ vpi.inf ++ (vp.nn!agr).p6 }
|
||||
in
|
||||
insertExtrapos (extInfzu ++ vpi.ext) ( -- vps.ext <- vp's extracted embedded infzu + vp's object-sentence
|
||||
insertInf vpi.pred ( -- vps.inf <- vp's infinite main verb
|
||||
insertInfExtraObj vpi.objs ( -- vps.nn.p5 <- vp's object nps
|
||||
insertInfExtraInf embeddedInf vps))) ;
|
||||
|
||||
ComplVS v s =
|
||||
insertExtrapos (comma ++ conjThat ++ s.s ! Sub) (predV v) ;
|
||||
@@ -21,52 +47,90 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
||||
insertExtrapos (comma ++ q.s ! QIndir) (predV v) ;
|
||||
ComplVA v ap = insertAdj (v.c2.s ++ ap.s ! APred) ap.c ap.ext (predV v) ; -- changed
|
||||
|
||||
SlashV2a v = (predVc v) ** {missingAdv = True} ; -- HL 12/6/2019 for reflexive verbs with objects, rV2:V2, rV3:V3
|
||||
SlashV2a v = (predVc v) ;
|
||||
|
||||
Slash2V3 v np = insertObjNP np v.c2 (predV v) ** {c2 = v.c3 ; missingAdv = True} ;
|
||||
Slash3V3 v np = insertObjNP np v.c3 (predV v) ** {c2 = v.c2 ; missingAdv = True} ;
|
||||
Slash2V3 v np = insertObjNP np v.c2 (predVc v) ** {c2 = v.c3} ;
|
||||
Slash3V3 v np = insertObjNP np v.c3 (predVc v) ;
|
||||
|
||||
SlashV2S v s =
|
||||
insertExtrapos (conjThat ++ s.s ! Sub) (predVc v) ;
|
||||
insertExtrapos (comma ++ conjThat ++ s.s ! Sub) (predVc v) ;
|
||||
SlashV2Q v q =
|
||||
insertExtrapos (q.s ! QIndir) (predVc v) ;
|
||||
insertExtrapos (comma ++ q.s ! QIndir) (predVc v) ;
|
||||
{-
|
||||
SlashV2V v vp =
|
||||
let
|
||||
vpi = infVP v.isAux vp ;
|
||||
vps = predVGen v.isAux v ** {c2 = v.c2} ;
|
||||
in vps **
|
||||
insertExtrapos vpi.p3 (
|
||||
insertInf vpi.p2 (
|
||||
insertObj vpi.p1 vps)) ;
|
||||
in vps **
|
||||
insertExtrapos vpi.p4 ( -- inplace vp; better extract it!
|
||||
insertInfExt vpi.p3 (
|
||||
insertInf vpi.p2 (
|
||||
insertObjc vpi.p1 vps))) ;
|
||||
-}
|
||||
SlashV2V v vp = -- jmdn bitten, (\agr => sich!agr das Buch zu merken) HL 7/19
|
||||
let
|
||||
vps = (predVGen v.isAux v) ** { c2 = v.c2 ; objCtrl = case v.ctrl of {ObjC => True ; _ => False}} ;
|
||||
vpi = infzuVP v.isAux v.ctrl Simul Pos vp ;
|
||||
comma : Str = case <vp.isAux,vp.inf.ctrl> of { <True,_> | <_,NoC> => [] ; _ => bindComma} ;
|
||||
embeddedInf : Agr => Str = case vp.inf.isAux of {
|
||||
True => \\agr => comma ++ (vp.nn!agr).p5 ++ (vp.nn!agr).p6 ++ vpi.inf ; -- ihn es lesen (zu) lassen
|
||||
False => \\agr => comma ++ (vp.nn!agr).p5 ++ vpi.inf ++ (vp.nn!agr).p6 } -- ihn (zu) bitten , es zu lesen
|
||||
in
|
||||
insertExtrapos vpi.ext ( -- vps.ext <- vp's object-sentence ++ extractedInfzu?
|
||||
insertInf vpi.pred ( -- vps.inf <- vp's infinite main verb
|
||||
insertInfExtraObj vpi.objs ( -- vps.nn.p5 <- vp's object nps
|
||||
insertInfExtraInf embeddedInf vps))) ;
|
||||
|
||||
SlashV2A v ap =
|
||||
SlashV2A v ap =
|
||||
insertAdj (ap.s ! APred) ap.c ap.ext (predVc v) ;
|
||||
|
||||
ComplSlash vps np =
|
||||
let vp = insertObjNP np vps.c2 vps ;
|
||||
in case vp.missingAdv of {
|
||||
True => vp ;
|
||||
False => objAgr np vp } ; -- IL 24/04/2018 force reflexive in the VPSlash to take the agreement of the object introduced by ComplSlash.
|
||||
|
||||
-- IL 24/04/2018 force reflexive in the VPSlash to take the agreement of np.
|
||||
in case vps.objCtrl of { True => objAgr np vp ; _ => vp } ;
|
||||
{-
|
||||
SlashVV v vp =
|
||||
let
|
||||
let
|
||||
vpi = infVP v.isAux vp ;
|
||||
vps = predVGen v.isAux v ** {c2 = vp.c2} ;
|
||||
vps = predVGen v.isAux v ** {c2 = vp.c2 } ;
|
||||
in vps **
|
||||
insertExtrapos vpi.p3 (
|
||||
insertInf vpi.p2 (
|
||||
insertInf {s=vpi.p2;isAux=vp.isAux;ctrl=SubjC} ( -- insertInf vpi.p2 (
|
||||
insertObj vpi.p1 vps)) ;
|
||||
-}
|
||||
SlashVV v vp = -- will|hoffe ((zu) lesen | ihr (zu) geben | (zu) bitten, es zu lesen)
|
||||
let
|
||||
vps = (predVGen v.isAux v) ** { c2 = vp.c2 } ;
|
||||
vpi = infzuVP v.isAux SubjC Simul Pos vp ; -- (zu) (lesen | ihr geben | bitten, es zu lesen)
|
||||
comma : Str = case <vp.isAux,vp.inf.ctrl> of { <True,_> | <_,NoC> => [] ; _ => bindComma} ;
|
||||
embeddedInf : Agr => Str = case vp.inf.isAux of {
|
||||
True => \\agr => comma ++ (vp.nn!agr).p5 ++ (vp.nn!agr).p6 ++ vpi.inf ; -- es lesen (zu) lassen
|
||||
False => \\agr => comma ++ (vp.nn!agr).p5 ++ vpi.inf ++ (vp.nn!agr).p6 } -- (zu) bitten, es zu lesen
|
||||
in
|
||||
insertExtrapos vpi.ext ( -- vps.ext <- vp's object-sentence ++ extractedInfzu?
|
||||
insertInf vpi.pred ( -- vps.inf <- vp's infinite main verb
|
||||
insertInfExtraObj vpi.objs ( -- vps.nn.p5 <- vp's object nps
|
||||
insertInfExtraInf embeddedInf vps))) ;
|
||||
|
||||
-- {- HL 8/19: this slightly modified SlashV2VNP is expensive even with NP.w:Weight
|
||||
|
||||
-- order of embedded objects wrong:
|
||||
-- Lang> p "the woman that you beg me to listen to" | l
|
||||
-- the woman that you beg me to listen to
|
||||
-- die Frau , der ihr mich zuzuhören bittet
|
||||
-- better: die Frau , der zuzuhören ihr mich bittet
|
||||
|
||||
SlashV2VNP v np vp =
|
||||
let
|
||||
vpi = infVP v.isAux vp ;
|
||||
vps = predVGen v.isAux v ** {c2 = v.c2} ;
|
||||
vps = predVGen v.isAux v ** {c2 = vp.c2} ; -- objCtrl = ?
|
||||
in vps **
|
||||
insertExtrapos vpi.p3 (
|
||||
insertInf vpi.p2 (
|
||||
insertInf {s=vpi.p2;isAux=v.isAux;ctrl=v.ctrl} ( -- insertInf vpi.p2
|
||||
insertObj vpi.p1 (
|
||||
insertObj (\\_ => appPrepNP v.c2 np) vps))) ;
|
||||
-- insertObjNP v.c2 np vps))) ;
|
||||
|
||||
-- HL: version with infzuVP in tests/german/TestLangGer.gf, too expensive
|
||||
|
||||
UseComp comp =
|
||||
insertExtrapos comp.ext (insertObj comp.s (predV sein_V)) ; -- agr not used
|
||||
@@ -76,7 +140,7 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
||||
UseCopula = predV sein_V ;
|
||||
|
||||
CompAP ap = {s = \\_ => ap.c.p1 ++ ap.s ! APred ++ ap.c.p2 ; ext = ap.ext} ;
|
||||
CompNP np = {s = \\_ => np.s ! NPC Nom ++ np.adv ++ np.rc ; ext = np.ext} ;
|
||||
CompNP np = {s = \\_ => np.s ! NPC Nom ++ np.rc ; ext = np.ext} ;
|
||||
CompAdv a = {s = \\_ => a.s ; ext = []} ;
|
||||
|
||||
CompCN cn = {s = \\a => case numberAgr a of {
|
||||
@@ -112,14 +176,16 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
||||
|
||||
from "we live (in the city : Adv) : Cl"
|
||||
|
||||
But in German we cannot move the NP part of an Adv, we only have the
|
||||
In German we cannot move the NP part of an Adv, we only have the
|
||||
full relative clauses like
|
||||
|
||||
die Stadt, in der wir leben,
|
||||
die Stadt, worin wir leben, --contracted Prep+Rel
|
||||
|
||||
but nothing like "die Stadt wir leben in".
|
||||
But: VPSlashPrep is used to parse "sie ist mit mir verheiratet",
|
||||
(ist verheiratet:VP mit:Prep):VPSlash,
|
||||
ComplA2 is used to parse "sie ist verheiratet mit mir"
|
||||
-}
|
||||
VPSlashPrep vp prep = vp ** {c2 = prep ; missingAdv = True} ;
|
||||
VPSlashPrep vp prep = vp ** {c2 = prep ; objCtrl = False} ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user