mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-24 02:31:10 -06:00
(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:
@@ -1,4 +1,4 @@
|
||||
concrete StructuralGer of Structural = CatGer **
|
||||
concrete StructuralGer of Structural = CatGer **
|
||||
|
||||
open MorphoGer, MakeStructuralGer, (X = ConstructX),
|
||||
(P = ParadigmsGer), IrregGer, Prelude, (R = ResGer) in {
|
||||
@@ -52,13 +52,13 @@ concrete StructuralGer of Structural = CatGer **
|
||||
if_Subj = ss "wenn" ; --- no variants in the RGL! | ss "falls" ;
|
||||
in8front_Prep = mkPrep "vor" P.dative ;
|
||||
i_Pron = mkPronPers "ich" "mich" "mir" "meiner" "mein" Masc Sg P1 ;
|
||||
-- in_Prep = mkPrep [] (NPP CInDat) ;
|
||||
in_Prep = P.inDat_Prep ; -- HL 7/2022
|
||||
in_Prep = P.inDat_Prep ;
|
||||
it_Pron = mkPronPers "es" "es" "ihm" "seiner" "sein" Neutr Sg P3 ;
|
||||
less_CAdv = X.mkCAdv "weniger" "als" ;
|
||||
many_Det = let tab = (detLikeAdj False Pl "viel").s
|
||||
in {s,sp = asQuant tab ; n = Pl ; a = Weak ; isDef = False ; hasDefArt = False} ;
|
||||
more_CAdv = X.mkCAdv "mehr" "als" ;
|
||||
-- most_Predet = {s = appAdj (regA "meist") ; c = noCase ; a = PAgNone} ;
|
||||
most_Predet = { -- HL 5/2022
|
||||
s = \\n,g,c => let gn = R.gennum g n ;
|
||||
adj = (P.mkA "viel" "mehr" "meiste").s ! Superl
|
||||
@@ -67,7 +67,7 @@ concrete StructuralGer of Structural = CatGer **
|
||||
c = {p = [] ; k = PredCase Gen} ;
|
||||
a = PAg Pl} ;
|
||||
much_Det = {s = asQuant (\\_,_ => "viel") ; sp = asQuant (\\_,_ => "vieles") ;
|
||||
n = Sg ; a = Weak ; isDef = False ; hasDefArt = False} ;
|
||||
n = Sg ; a = Weak ; isDef = False ; hasDefArt = False} ;
|
||||
must_VV = auxVV
|
||||
(mkV
|
||||
"müssen" "muss" "musst" "muss" "müsst" "müss"
|
||||
@@ -81,26 +81,27 @@ concrete StructuralGer of Structural = CatGer **
|
||||
on_Prep = mkPrep "auf" P.dative ;
|
||||
or_Conj = {s1 = [] ; s2 = "oder" ; n = Sg} ;
|
||||
otherwise_PConj = ss "sonst" ;
|
||||
part_Prep = P.von_Prep ; -- obsolete, use PartNP cn np
|
||||
part_Prep = P.von_Prep ; -- obsolete, better use PartNP cn np
|
||||
please_Voc = ss "bitte" ;
|
||||
possess_Prep = P.von_Prep ; -- obsolete, use PossNP cn np
|
||||
possess_Prep = P.von_Prep ; -- obsolete, better use PossNP cn np
|
||||
quite_Adv = ss "ziemlich" ;
|
||||
she_Pron = mkPronPers "sie" "sie" "ihr" "ihrer" "ihr" Fem Sg P3 ;
|
||||
so_AdA = ss "so" ;
|
||||
somebody_NP = nameNounPhrase Masc {s = caselist "jemand" "jemanden" "jemandem" "jemands"} ;
|
||||
somePl_Det = let tab = (detLikeAdj True Pl "einig").s
|
||||
in {s,sp = asQuant tab ; isDef = True ; n = Pl ; a = Weak ; hasDefArt = False} ;
|
||||
in {s,sp = asQuant tab ; n = Pl ; a = Weak ; isDef = True ; hasDefArt = False} ;
|
||||
someSg_Det = {
|
||||
s,sp = asQuant (\\g,c => "ein" + pronEnding ! GSg g ! c) ; ---- einer,eines
|
||||
n = Sg ;
|
||||
a = Strong ;
|
||||
hasNum = True ;
|
||||
isDef = False ; hasDefArt = False
|
||||
isDef = False ;
|
||||
hasDefArt = False
|
||||
} ;
|
||||
something_NP = nameNounPhrase Neutr {s = \\_ => "etwas"} ;
|
||||
somewhere_Adv = ss "irgendwo" ;
|
||||
that_Quant = let
|
||||
jener : Number => Gender => Case => Str = \\n => (detUnlikeAdj True n "jen").s in
|
||||
jener : Number => Gender => Case => Str = \\n => (detUnlikeAdj True n "jen").s in
|
||||
{s,sp = \\_,_ => jener ; a,aPl = Weak ; hasDefArt = False} ;
|
||||
---b that_NP = nameNounPhrase Neutr {s = caselist "das" "das" "dem" "dessen"} ; ----
|
||||
there_Adv = ss "da" ; --- no variants in the rgl | ss "dort" ;
|
||||
@@ -110,7 +111,7 @@ concrete StructuralGer of Structural = CatGer **
|
||||
---b these_NP = {s = caselist "diese" "diese" "diesen" "dieser" ; a = agrP3 Pl} ;
|
||||
they_Pron = mkPronPers "sie" "sie" "ihnen" "ihrer" "ihr" Fem Pl P3 ;
|
||||
this_Quant = let
|
||||
dieser : Number => Gender => Case => Str = \\n => (detUnlikeAdj True n "dies").s in
|
||||
dieser : Number => Gender => Case => Str = \\n => (detUnlikeAdj True n "dies").s in
|
||||
{s,sp = \\_,_ => dieser ; a,aPl = Weak ; hasDefArt = False} ;
|
||||
---b this_NP = nameNounPhrase Neutr {s = caselist "dies" "dies" "diesem" "dieses"} ; ----
|
||||
---b those_NP = {s = caselist "jene" "jene" "jenen" "jener" ; a = agrP3 Pl} ;
|
||||
@@ -142,7 +143,7 @@ concrete StructuralGer of Structural = CatGer **
|
||||
with_Prep = mkPrep "mit" P.dative ;
|
||||
youSg_Pron = mkPronPers "du" "dich" "dir" "deiner" "dein" Fem Sg P2 ;
|
||||
youPl_Pron = mkPronPers "ihr" "euch" "euch" "eurer" "euer" Fem Pl P2 ; ---- poss
|
||||
youPol_Pron = mkPronPers "Sie" "Sie" "Ihnen" "Ihrer" "Ihr" Fem Pl P3 ;
|
||||
youPol_Pron = mkPronPers "Sie" "Sie" "Ihnen" "Ihrer" "Ihr" Fem Pl P3 ** {a = AgPlPol} ;
|
||||
yes_Utt = ss "ja" ;
|
||||
|
||||
not_Predet = {s = \\_,_,_ => "nicht" ; c = noCase ; a = PAgNone} ;
|
||||
@@ -168,15 +169,14 @@ concrete StructuralGer of Structural = CatGer **
|
||||
|
||||
lin language_title_Utt = ss "Deutsch" ;
|
||||
|
||||
oper
|
||||
asQuant : (Gender => Case => Str) -> (Bool => Gender => Case => Str) =
|
||||
\tab -> \\_,g,c => tab ! g ! c ;
|
||||
asNum : (Gender => Case => Str) -> (Gender => Case => {quant,num:Str}) =
|
||||
\tab -> \\g,c => {quant = []; num = tab ! g ! c} ;
|
||||
pairTable : (Gender => Case => Str) -> (Gender => Case => Str) -> (Gender => Case => {quant,num:Str})
|
||||
= \qt,nt -> \\g,c => {quant = qt ! g ! c; num = nt ! g ! c} ;
|
||||
|
||||
appAdjDegAdjf : Adjective -> Degree -> Adjf -> Number => Gender => Case => Str =
|
||||
\adj,deg,adjf -> \\n,g,c => adj.s ! deg ! (agrAdj g adjf n c) ;
|
||||
oper
|
||||
asQuant : (Gender => Case => Str) -> (Bool => Gender => Case => Str) =
|
||||
\tab -> \\_,g,c => tab ! g ! c ;
|
||||
asNum : (Gender => Case => Str) -> (Gender => Case => {quant,num:Str}) =
|
||||
\tab -> \\g,c => {quant = []; num = tab ! g ! c} ;
|
||||
pairTable : (Gender => Case => Str) -> (Gender => Case => Str) -> (Gender => Case => {quant,num:Str})
|
||||
= \qt,nt -> \\g,c => {quant = qt ! g ! c; num = nt ! g ! c} ;
|
||||
appAdjDegAdjf : Adjective -> Degree -> Adjf -> Number => Gender => Case => Str =
|
||||
\adj,deg,adjf -> \\n,g,c => adj.s ! deg ! (agrAdj g adjf n c) ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user