(Ger) Shrink Agr = Ag Gender Number Person from 3*2*3 = 18 values to 2+3+1+3+1 = 10 by

Agr = AgSgP1 | AgSgP2 | AgSgP3 Gender | AgSgP3Gen | AgPl Person | AgPlPol ;
      with AgSgP3Gen resp. AgPlPol used for reflexive,possessive forms of "man", "Sie".

      Compiles AllGer from src in 162sec with 15M VerbGer.gfo vs. 380sec with 17M VerbGer.gfo
This commit is contained in:
Hans Leiss
2023-09-30 23:28:42 +02:00
parent 67d1e24761
commit 1cf6496883
25 changed files with 623 additions and 668 deletions
+16 -19
View File
@@ -21,14 +21,13 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
SlashV2a v = (predVc v) ;
Slash2V3 v np = insertObjNP np v.c2 (predVc v) ** {c2 = v.c3} ;
Slash3V3 v np = insertObjNP np v.c3 (predVc v) ;
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 (comma ++ conjThat ++ s.s ! Sub) (predV v) ** {c2 = v.c2; objCtrl = False} ;
SlashV2Q v q =
insertExtrapos (comma ++ q.s ! QIndir) (predV v) ** {c2 = v.c2; objCtrl = False} ;
SlashV2V v vp = -- (jmdn) bitten, sich zu waschen | sich waschen lassen HL 7/19
let
vps = predVGen v.isAux v ; -- e.g. verspricht|bittet.isAux=False | läßt.isAux=True
@@ -40,14 +39,12 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
SlashV2A v ap =
insertAdj (ap.s ! APred) ap.c ap.ext (predV v) ** {c2 = v.c2; objCtrl = False} ;
-- to save (83669 - 67299 = 16370 msec) compile time, comment out:
ComplSlash vps np =
-- IL 24/04/2018 force reflexive in the VPSlash to take the agreement of np.
-- HL 3/22 better before inserting np, using objCtrl
let vp = case vps.objCtrl of { True => objAgr np vps ; _ => vps }
** { c2 = vps.c2 ; objCtrl = vps.objCtrl } ;
in insertObjNP np vps.c2 vp ;
-- compiler: + ComplSlash' 414720 (199680,352)
-- SlashVV v vps is like ComplVV v vp, but infinite vps should not be extracted
SlashVV v vp = -- HL 3/2022
@@ -92,17 +89,18 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
-- expensive: + SlashV2VNP 503.884.800 (2880,540), reaches memory limit with SlashVV
-- does not work for nested uses: the nn-levels are confused HL 3/22
-- to save a lot compile time and memory, avoid insertObjNP with glueing of prep+DefArt:
SlashV2VNP v np vp = -- bitte ihn, zu kaufen | lasse ihn kaufen HL 3/22
-- insertObjNP np v.c2 (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl}) ;
let prep = v.c2 ;
obj = appPrep prep (np.s!False) ; -- simplify: no glueing of prep+DefArt, HL 8/22
b : Bool = case prep.isPrep of {isPrep | isPrepDefArt => True ; _ => False} ;
c = prep.c ;
w = np.w ;
vps = (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl})
in
insertObj' obj b w c vps ;
-- to save a lot compile time and memory, avoid insertObjNP with glueing of prep+DefArt:
-- + SlashV2VNP 110.592.000 (46080,240)
SlashV2VNP v np vp = -- bitte ihn, zu kaufen | lasse ihn kaufen HL 3/22
-- insertObjNP np v.c2 (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl}) ;
let prep = v.c2 ;
obj = appPrep prep (np.s!False) ; -- simplify: no glueing of prep+DefArt, HL 8/22
b : Bool = case prep.isPrep of {isPrep | isPrepDefArt => True ; _ => False} ;
c = prep.c ;
w = np.w ;
vps = (ComplVV v vp ** {c2 = vp.c2 ; objCtrl = vp.objCtrl})
in
insertObj' obj b w c vps ;
UseComp comp =
insertExtrapos comp.ext (insertObj comp.s (predV sein_V)) ; -- agr not used
@@ -130,8 +128,7 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
AdvVPSlash vp adv = vp ** insertAdv adv.s vp ;
AdVVPSlash adv vp = vp ** insertAdv adv.s vp ;
-- ReflVP vp = insertObj (\\a => appPrep vp.c2
-- (\\k => usePrepC k (\c -> reflPron ! a ! c))) vp ;
-- ReflVP vp = insertObj (\\a => appPrep vp.c2 (reflPron ! a)) vp ;
ReflVP vp = insertObjRefl vp ; -- HL, 19/06/2019
PassV2 v = -- acc object -> nom subject; all others: same PCase
@@ -161,6 +158,6 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
(ist verheiratet:VP mit:Prep):VPSlash,
ComplA2 is used to parse "sie ist verheiratet mit mir"
-}
VPSlashPrep vp prep = vp ** {c2 = prep ; objCtrl = False} ;
VPSlashPrep vp prep = vp ** {c2 = prep ; objCtrl = False} ; -- HL 7.8.23
}