mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-24 02:31:10 -06:00
The files for GrammarGer and AllGer (but not Construction, Documentation, Markup)
are edited to allow for glued Prep+DefArt, using new categories NP',Det',Quant',
Predet',DAP'.
The previous NP.s : Case => Str*Str allows parsing
"in dem Meer" = in_Prep ++ (np.s ! Case).p1
"im Meer" = in_Prep ++ (np.s ! Case).p2,
but since only one of the strings of (np.s!Case) is used, the tree
contains a metavariable like ?2 (the grammar is "erasing"). (Similarly, if we used
NP.s : Case => Str and NP.s2 : Case => Str.)
To get rid of the metavariables, we have to choose BY A PARAMETER, say
NP.s : droppedDefArt? => Case => Str
Using np.a = Ag g n p, the preposition can select between preposition
alone or preposition with definite article (glued or not), via
Prep = {s : GenNum => Str ; s2 :Str ; c : Case ; isPrep : PrepType }
The combination is done in appPrepNP' and appPrep'. This is
independent of the number of glued Prep+DefArt. But LangGer compiles
now in 200s using 30% memory (without SlashV2VNP). Can AppPrepNP' (and
insertObjNP') be simplified?
This commit is contained in:
@@ -48,7 +48,7 @@ concrete StructuralGer of Structural' = CatGer **
|
||||
here_Adv = ss "hier" ;
|
||||
how_IAdv = ss "wie" ;
|
||||
how8much_IAdv = ss "wieviel" ;
|
||||
how8many_IDet = {s = \\g,c => (detUnlikeAdj False Pl "wie viel").s ! g ! NPC c ; n = Pl} ;
|
||||
how8many_IDet = {s = \\g,c => (detUnlikeAdj' False Pl "wie viel").s ! g ! c ; n = Pl} ;
|
||||
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 ;
|
||||
@@ -77,9 +77,9 @@ concrete StructuralGer of Structural' = CatGer **
|
||||
on_Prep = P.mkPrep "auf" "auf den" "auf die" "aufs" P.accusative ; -- test HL 7/2022
|
||||
or_Conj = {s1 = [] ; s2 = "oder" ; n = Sg} ;
|
||||
otherwise_PConj = ss "sonst" ;
|
||||
part_Prep = P.von_Prep ; -- mkPrep "von" P.dative ;
|
||||
part_Prep = P.von_Prep ; -- obsolete, use PartNP cn np
|
||||
please_Voc = ss "bitte" ;
|
||||
possess_Prep = P.von_Prep ;-- mkPrep "von" P.dative ;
|
||||
possess_Prep = P.von_Prep ; -- obsolete, use PossNP cn np
|
||||
quite_Adv = ss "ziemlich" ;
|
||||
she_Pron = mkPronPers "sie" "sie" "ihr" "ihrer" "ihr" Fem Sg P3 ;
|
||||
so_AdA = ss "so" ;
|
||||
@@ -97,7 +97,7 @@ concrete StructuralGer of Structural' = CatGer **
|
||||
somewhere_Adv = ss "irgendwo" ;
|
||||
that_Quant = let
|
||||
jener : Number => Gender => Case => Str = \\n => (detUnlikeAdj' True n "jen").s in
|
||||
{s,sp = \\_ => jener ; a,aPl = Weak ; hasDefArt = False} ;
|
||||
{s,sp = \\_,_ => jener ; a,aPl = Weak ; hasDefArt = False} ;
|
||||
---b that_NP = nameNounPhrase {s = caselist "das" "das" "denem" "dessen"} ; ----
|
||||
there_Adv = ss "da" ; --- no variants in the rgl | ss "dort" ;
|
||||
there7to_Adv = ss "dahin" ;
|
||||
@@ -107,7 +107,7 @@ concrete StructuralGer of Structural' = CatGer **
|
||||
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
|
||||
{s,sp = \\_ => dieser ; a,aPl = Weak ; hasDefArt = False} ;
|
||||
{s,sp = \\_,_ => dieser ; a,aPl = Weak ; hasDefArt = False} ;
|
||||
---b this_NP = nameNounPhrase {s = caselist "dies" "dies" "diesem" "dieses"} ; ----
|
||||
---b those_NP = {s = caselist "jene" "jene" "jenen" "jener" ; a = agrP3 Pl} ;
|
||||
through_Prep = mkPrep "durch" P.accusative ;
|
||||
@@ -148,7 +148,7 @@ concrete StructuralGer of Structural' = CatGer **
|
||||
Pl => (detUnlikeAdj' False Pl "kein").s
|
||||
}
|
||||
in
|
||||
{s,sp = \\_ => keiner ; a = Strong ; aPl = Weak ; hasDefArt = False} ; ---- sp
|
||||
{s,sp = \\_,_ => keiner ; a = Strong ; aPl = Weak ; hasDefArt = False} ; ---- sp
|
||||
if_then_Conj = {s1 = "wenn" ; s2 = "dann" ; n = Sg ; lock_Conj = <>} ;
|
||||
nobody_NP =
|
||||
nameNounPhrase' Masc {s = caselist "niemand" "niemanden" "niemandem" "niemands"} ;
|
||||
@@ -165,8 +165,8 @@ concrete StructuralGer of Structural' = CatGer **
|
||||
lin language_title_Utt = ss "Deutsch" ;
|
||||
|
||||
oper
|
||||
asQuant : (Gender => Case => Str) -> (Gender => Case => {quant,num:Str}) =
|
||||
\tab -> \\g,c => {quant = tab ! g ! c; num = []} ;
|
||||
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})
|
||||
|
||||
Reference in New Issue
Block a user