1
0
forked from GitHub/gf-rgl

(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

View File

@@ -9,11 +9,15 @@ concrete ConjunctionGer of Conjunction =
ConjAdv conj ss = conjunctDistrSS conj ss ;
-- ConjNP : Conj -> ListNP' -> NP' ; -- she or we
ConjNP conj ss = { s = \\_ => (conjunctDistrTable Case conj { s1 = ss.s1 ; s2 = ss.s2 }).s } ** {
a = Ag Fem (conjNumber conj.n (numberAgr ss.a)) (personAgr ss.a) ;
w = WHeavy ; ext,rc = [] } ;
ConjNP conj ss = heavyNP (
{s = \\_ => (conjunctDistrTable Case conj ss).s ;
a = let n : Number = (conjNumber conj.n (numberAgr ss.a)) ;
p : Person = personAgr ss.a ;
agr : Agr = case <n,p> of {<Pl,q> => AgPl q ;
<Sg,P3> => AgSgP3 Neutr ;
<Sg,P1> => AgSgP1 ;
<Sg,P2> => AgSgP2 }
in (conjAgr agr ss.a) }) ;
ConjAP conj ss = conjunctDistrTable AForm conj ss ** {
isPre = ss.isPre ; c = ss.c ; ext = ss.ext} ;
@@ -48,13 +52,13 @@ concrete ConjunctionGer of Conjunction =
s1 = \\c => xs.s ! False ! c ++ bigNP xs ++ comma ++ x.s1 ! c ;
s2 = x.s2 ;
a = conjAgr xs.a x.a } ;
BaseAP x y = lin AP {
BaseAP x y = {
s1 = bigAP x ;
s2 = bigAP y ;
isPre = andB x.isPre y.isPre ;
c = <[],[]> ;
ext = []} ;
ConsAP xs x = lin AP {
ConsAP xs x = {
s1 = \\a => (bigAP xs) ! a ++ comma ++ x.s1 ! a ;
s2 = x.s2 ;
isPre = andB x.isPre xs.isPre ;
@@ -62,12 +66,12 @@ concrete ConjunctionGer of Conjunction =
ext = []} ;
BaseRS x y = twoTable RelGenNum x y ** {c = y.c} ;
ConsRS xs x = consrTable RelGenNum comma xs x ** {c = xs.c} ;
BaseCN x y = lin CN {
BaseCN x y = {
s1 = bigCN x ;
s2 = bigCN y ;
g = x.g ; --- gender of first CN, used e.g. in articles
} ;
ConsCN x xs = lin CN {
ConsCN x xs = {
s1 = \\a,n,c => bigCN x ! a ! n ! c ++ comma ++ xs.s1 ! a ! n ! c ;
s2 = xs.s2 ;
g = x.g ; --- gender of first CN, used e.g. in articles