mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
(Ger) Changed Quant to remove recently introduced bug that
lead to a metavariable when parsing contracted prepositions
This commit is contained in:
@@ -68,7 +68,8 @@ concrete CatGer of Cat =
|
|||||||
DAP = {s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef,hasDefArt : Bool} ;
|
DAP = {s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef,hasDefArt : Bool} ;
|
||||||
|
|
||||||
Quant = {
|
Quant = {
|
||||||
s,sp : GenNum => Case => Str ;
|
s : Bool => GenNum => Case => Str ; -- True if leading DefArtSg is dropped
|
||||||
|
sp : GenNum => Case => Str ; -- and contracted with preposition
|
||||||
a : Adjf ;
|
a : Adjf ;
|
||||||
isDefArt : Bool ;
|
isDefArt : Bool ;
|
||||||
delCardOne : Bool -- delete following cardinal 1 (IndefArt and no_Quant)
|
delCardOne : Bool -- delete following cardinal 1 (IndefArt and no_Quant)
|
||||||
|
|||||||
@@ -26,11 +26,14 @@ concrete ExtendGer of Extend =
|
|||||||
(P = ParadigmsGer) in {
|
(P = ParadigmsGer) in {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
GenNP np = {
|
GenNP np =
|
||||||
s,sp = \\gn,c => np.s ! False ! Gen ++ np.ext ++ np.rc ;
|
let tab : GenNum => Case => Str =
|
||||||
a = Strong ;
|
\\gn,c => np.s ! False ! Gen ++ np.ext ++ np.rc
|
||||||
isDefArt = False ;
|
in {s = \\_ => tab ;
|
||||||
delCardOne = False
|
sp = tab ;
|
||||||
|
a = Strong ;
|
||||||
|
isDefArt = False ;
|
||||||
|
delCardOne = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
EmptyRelSlash slash = {
|
EmptyRelSlash slash = {
|
||||||
|
|||||||
@@ -27,11 +27,13 @@ oper
|
|||||||
|
|
||||||
-- e.g. das selbe
|
-- e.g. das selbe
|
||||||
mmkQuant : Quant -> A -> Quant = \q,a -> q ** {
|
mmkQuant : Quant -> A -> Quant = \q,a -> q ** {
|
||||||
s,sp = \\gn,c => q.s ! gn ! c ++ a.s ! Posit ! agrAdj q.a gn c
|
s = \\b,gn,c => q.s ! b ! gn ! c ++ a.s ! Posit ! agrAdj q.a gn c ;
|
||||||
|
sp = \\gn,c => q.s ! False ! gn ! c ++ a.s ! Posit ! agrAdj q.a gn c
|
||||||
} ;
|
} ;
|
||||||
-- e.g. derjenige
|
-- e.g. derjenige
|
||||||
mmbQuant : Quant -> A -> Quant = \q,a -> q ** {
|
mmbQuant : Quant -> A -> Quant = \q,a -> q ** {
|
||||||
s,sp = \\gn,c => q.s ! gn ! c + a.s ! Posit ! agrAdj q.a gn c
|
s = \\b,gn,c => q.s ! b ! gn ! c + a.s ! Posit ! agrAdj q.a gn c ;
|
||||||
|
sp = \\gn,c => q.s ! False ! gn ! c + a.s ! Posit ! agrAdj q.a gn c
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,11 +71,6 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
dropDefArtSg : Number -> Bool -> (GenNum => Case => Str) -> (Bool => GenNum => Case => Str) =
|
|
||||||
\n,isDefArt,qnt -> case <n,isDefArt> of {
|
|
||||||
<Sg,True> => table{True => \\gn,c => [] ; False => qnt} ;
|
|
||||||
_ => \\b => qnt
|
|
||||||
} ;
|
|
||||||
einziger : AForm => Str = table{AMod gn c => "einzig" + adjEnding ! gn ! c ; _ => "einziges"} ;
|
einziger : AForm => Str = table{AMod gn c => "einzig" + adjEnding ! gn ! c ; _ => "einziges"} ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
@@ -85,7 +80,6 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
a = quant.a ;
|
a = quant.a ;
|
||||||
d = quant.isDefArt ;
|
d = quant.isDefArt ;
|
||||||
isCardOne = case n of {Sg => num.isNum ; _ => False} ;
|
isCardOne = case n of {Sg => num.isNum ; _ => False} ;
|
||||||
qunt : Bool => GenNum => Case => Str = dropDefArtSg n d quant.s ;
|
|
||||||
nums : AForm => Str = \\af => case af of {
|
nums : AForm => Str = \\af => case af of {
|
||||||
AMod (GSg g) c => case <quant.delCardOne,isCardOne> of {
|
AMod (GSg g) c => case <quant.delCardOne,isCardOne> of {
|
||||||
<True,True> => einziger ! af ; -- (ein,kein) einziger
|
<True,True> => einziger ! af ; -- (ein,kein) einziger
|
||||||
@@ -94,7 +88,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
_ => num.s ! APred}
|
_ => num.s ! APred}
|
||||||
in {
|
in {
|
||||||
s,sp = \\b,g,c => let gn = gennum g n in
|
s,sp = \\b,g,c => let gn = gennum g n in
|
||||||
qunt ! b ! gn ! c ++ nums ! agrAdj a gn c ++ ord.s ! agrAdj a gn c ;
|
quant.s ! b ! gn ! c ++ nums ! agrAdj a gn c ++ ord.s ! agrAdj a gn c ;
|
||||||
n = n ;
|
n = n ;
|
||||||
a = a ;
|
a = a ;
|
||||||
isDef = case a of {Strong => False ; _ => True} ;
|
isDef = case a of {Strong => False ; _ => True} ;
|
||||||
@@ -107,9 +101,8 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
a = quant.a ;
|
a = quant.a ;
|
||||||
d = quant.isDefArt ;
|
d = quant.isDefArt ;
|
||||||
isCardOne = case n of {Sg => num.isNum ; _ => False} ;
|
isCardOne = case n of {Sg => num.isNum ; _ => False} ;
|
||||||
quants = dropDefArtSg n d quant.s ;
|
|
||||||
quantsp : Bool => GenNum => Case => Str =
|
quantsp : Bool => GenNum => Case => Str =
|
||||||
dropDefArtSg n d (case num.isNum of {True => quant.s ; False => quant.sp}) ;
|
case num.isNum of {True => quant.s ; False => \\b => quant.sp} ;
|
||||||
nums : AForm => Str = \\af => case af of {
|
nums : AForm => Str = \\af => case af of {
|
||||||
AMod (GSg g) c => case <quant.delCardOne,isCardOne> of {
|
AMod (GSg g) c => case <quant.delCardOne,isCardOne> of {
|
||||||
<True,True> => einziger ! af ; -- (k)ein einziger, drop cardinal "ein" of num
|
<True,True> => einziger ! af ; -- (k)ein einziger, drop cardinal "ein" of num
|
||||||
@@ -119,7 +112,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
APred => num.s ! APred}
|
APred => num.s ! APred}
|
||||||
in {
|
in {
|
||||||
s = \\b,g,c => let gn = gennum g n in
|
s = \\b,g,c => let gn = gennum g n in
|
||||||
quants ! b ! gn ! c ++ nums ! agrAdj a gn c ;
|
quant.s ! b ! gn ! c ++ nums ! agrAdj a gn c ;
|
||||||
sp = \\b,g,c => let gn = gennum g n in
|
sp = \\b,g,c => let gn = gennum g n in
|
||||||
quantsp ! b ! gn ! c ++ nums ! agrAdj a gn c ;
|
quantsp ! b ! gn ! c ++ nums ! agrAdj a gn c ;
|
||||||
n = n ;
|
n = n ;
|
||||||
@@ -129,8 +122,8 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
PossPron p = {
|
PossPron p = {
|
||||||
s = \\gn,c => p.s ! NPPoss gn c ; -- mein (dritter)
|
s = \\_,gn,c => p.s ! NPPoss gn c ; -- mein (dritter)
|
||||||
sp = \\gn,c => p.sp ! PossF gn c ; -- meiner
|
sp = \\gn,c => p.sp ! PossF gn c ; -- meiner
|
||||||
a = Mixed ;
|
a = Mixed ;
|
||||||
isDefArt = False ;
|
isDefArt = False ;
|
||||||
delCardOne = False ;
|
delCardOne = False ;
|
||||||
@@ -166,7 +159,7 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
af => n.s ! NOrd APred ++ BIND ++ a.s ! Superl ! af} -- drittbeste
|
af => n.s ! NOrd APred ++ BIND ++ a.s ! Superl ! af} -- drittbeste
|
||||||
} ;
|
} ;
|
||||||
DefArt = {
|
DefArt = {
|
||||||
s = \\gn,c => artDef ! gn ! c ;
|
s = \\b,gn,c => case <b,gn> of {<True,GSg _> => [] ; _ => artDef ! gn ! c} ;
|
||||||
sp = \\gn,c => case <gn,c> of {
|
sp = \\gn,c => case <gn,c> of {
|
||||||
<GSg Masc,Gen> => "dessen" ;
|
<GSg Masc,Gen> => "dessen" ;
|
||||||
<GSg Fem, Gen> => "derer" ;
|
<GSg Fem, Gen> => "derer" ;
|
||||||
@@ -180,8 +173,8 @@ concrete NounGer of Noun = CatGer ** open ResGer, MorphoGer, Prelude in {
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
IndefArt = {
|
IndefArt = {
|
||||||
s = table {GSg g => \\c => "ein" + pronEnding ! (GSg g) ! c ;
|
s = \\_ => table {GSg g => \\c => "ein" + pronEnding ! (GSg g) ! c ;
|
||||||
GPl => \\c => []} ;
|
GPl => \\c => []} ;
|
||||||
sp = table {GSg g => \\c => "ein" + detEnding ! (GSg g) ! c ;
|
sp = table {GSg g => \\c => "ein" + detEnding ! (GSg g) ! c ;
|
||||||
GPl => caselist "einige" "einige" "einigen" "einiger"} ;
|
GPl => caselist "einige" "einige" "einigen" "einiger"} ;
|
||||||
a = MixedStrong ; -- Sg Mixed, Pl Strong
|
a = MixedStrong ; -- Sg Mixed, Pl Strong
|
||||||
|
|||||||
@@ -103,17 +103,18 @@ concrete StructuralGer of Structural = CatGer **
|
|||||||
} ;
|
} ;
|
||||||
something_NP = nameNounPhrase Neutr {s = \\_ => "etwas"} ;
|
something_NP = nameNounPhrase Neutr {s = \\_ => "etwas"} ;
|
||||||
somewhere_Adv = ss "irgendwo" ;
|
somewhere_Adv = ss "irgendwo" ;
|
||||||
that_Quant = {
|
that_Quant = let jener : GenNum => Case => Str = \\gn,c => "jen" + detEnding ! gn ! c
|
||||||
s,sp = \\gn,c => "jen" + detEnding ! gn ! c ; a = Weak ; isDefArt,delCardOne = False} ;
|
in {s = \\_ => jener ; sp = jener ; a = Weak ; isDefArt,delCardOne = False} ;
|
||||||
---b that_NP = nameNounPhrase Neutr {s = caselist "das" "das" "dem" "dessen"} ; ----
|
---b that_NP = nameNounPhrase Neutr {s = caselist "das" "das" "dem" "dessen"} ; ----
|
||||||
there_Adv = ss "da" ; --- no variants in the rgl | ss "dort" ;
|
there_Adv = ss "da" ; --- no variants in the rgl | ss "dort" ;
|
||||||
there7to_Adv = ss "dahin" ;
|
there7to_Adv = ss "dahin" ;
|
||||||
there7from_Adv = ss ["daher"] ;
|
there7from_Adv = ss ["daher"] ;
|
||||||
therefore_PConj = ss "deshalb" ;
|
therefore_PConj = ss "deshalb" ;
|
||||||
---b these_NP = {s = caselist "diese" "diese" "diesen" "dieser" ; a = agrP3 Pl} ;
|
---b these_NP = {s = caselist "diese" "diese" "diesen" "dieser" ; a = agrP3 Pl} ;
|
||||||
|
|
||||||
they_Pron = mkPronPers "sie" "sie" "ihnen" "ihrer" "ihr" Fem Pl P3 ;
|
they_Pron = mkPronPers "sie" "sie" "ihnen" "ihrer" "ihr" Fem Pl P3 ;
|
||||||
this_Quant = {
|
this_Quant = let dieser : GenNum => Case => Str = \\gn,c => "dies" + detEnding ! gn ! c
|
||||||
s,sp = \\gn,c => "dies" + detEnding ! gn ! c ; a = Weak ; isDefArt, delCardOne = False} ;
|
in {s = \\_ => dieser ; sp = dieser ; a = Weak ; isDefArt, delCardOne = False} ;
|
||||||
---b this_NP = nameNounPhrase Neutr {s = caselist "dies" "dies" "diesem" "dieses"} ; ----
|
---b this_NP = nameNounPhrase Neutr {s = caselist "dies" "dies" "diesem" "dieses"} ; ----
|
||||||
---b those_NP = {s = caselist "jene" "jene" "jenen" "jener" ; a = agrP3 Pl} ;
|
---b those_NP = {s = caselist "jene" "jene" "jenen" "jener" ; a = agrP3 Pl} ;
|
||||||
through_Prep = mkPrep "durch" P.accusative ;
|
through_Prep = mkPrep "durch" P.accusative ;
|
||||||
@@ -148,8 +149,8 @@ concrete StructuralGer of Structural = CatGer **
|
|||||||
|
|
||||||
not_Predet = {s = \\_,_,_ => "nicht" ; c = noCase ; a = PAgNone} ;
|
not_Predet = {s = \\_,_,_ => "nicht" ; c = noCase ; a = PAgNone} ;
|
||||||
no_Quant = {
|
no_Quant = {
|
||||||
s = table {GSg g => \\c => "kein" + pronEnding ! GSg g ! c ;
|
s = \\_ => table {GSg g => \\c => "kein" + pronEnding ! GSg g ! c ;
|
||||||
GPl => \\c => "kein" + detEnding ! GPl ! c} ;
|
GPl => \\c => "kein" + detEnding ! GPl ! c} ;
|
||||||
sp = \\gn,c => "kein" + detEnding ! gn ! c ;
|
sp = \\gn,c => "kein" + detEnding ! gn ! c ;
|
||||||
a = Mixed ; isDefArt = False ; delCardOne = True} ; -- HL kein+ein(er) => kein(er)
|
a = Mixed ; isDefArt = False ; delCardOne = True} ; -- HL kein+ein(er) => kein(er)
|
||||||
if_then_Conj = {s1 = "wenn" ; s2 = "dann" ; n = Sg ; lock_Conj = <>} ;
|
if_then_Conj = {s1 = "wenn" ; s2 = "dann" ; n = Sg ; lock_Conj = <>} ;
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ concrete VerbGer of Verb = CatGer ** open Prelude, ResGer, Coordination in {
|
|||||||
insertInf inf vps) ** {c2 = v.c2 ; objCtrl = v.objCtrl} ;
|
insertInf inf vps) ** {c2 = v.c2 ; objCtrl = v.objCtrl} ;
|
||||||
|
|
||||||
SlashV2A v ap =
|
SlashV2A v ap =
|
||||||
insertAdj (ap.s ! APred) ap.c ap.ext (predV v) ** {c2 = v.c2; objCtrl = False} ;
|
insertAdj (ap.s ! APred ++ ap.s2 ! Nom) ap.c ap.ext (predV v) ** {c2 = v.c2; objCtrl = False} ;
|
||||||
|
|
||||||
ComplSlash vps np =
|
ComplSlash vps np =
|
||||||
-- IL 24/04/2018 force reflexive in the VPSlash to take the agreement of np.
|
-- IL 24/04/2018 force reflexive in the VPSlash to take the agreement of np.
|
||||||
|
|||||||
Reference in New Issue
Block a user