mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-07-01 11:38:34 -06:00
The glueing of preposition with definite article is now implemented using
NP.s : Bool => Case => Str and NP.w = WDefArt
np.s ! False : Case => Str is the ordinary paradigm; if the np has a
definite article, np.w = WDefArt, and np.s ! True : Case => Str is the
paradigm with definite article omitted, if np.a = Ag g Sg p.
Prepositions now have type
Prep = {s : GenNum => Str ; s2 :Str ; c : Case ; isPrep : PrepType},
and |Prep| = |Case|*|isPrep| = 4 * 3 = 12, independent of |PCase| >= 18.
A preposition p with p.isPrep = isPrepDefArt has in p.s ! (GSg g) : Str
the preposition glued with definite article of a following np in singular.
The modified linearization categories for Prep, NP, Det, DAP, Quant,
Predet are no longer Prep', NP' etc., but Prep, NP etc. in CatGer.
They are now also used in gf-rgl/tests/german/TestLangGer.gf.
The previous auxiliary files abstract/Adjective'.gf etc. are removed.
BUT: for complexitiy reasons,
- the glueing is omitted in SlashV2VNP : V2V -> NP -> VPSlash -> VPSlash,
- SlashVP : NP -> SlashVP -> ClSlash (in SentenceGer and TestLanGer)
are commented out.
SlashVP causes grammar compilation to crash due to memory limits, probably
because mkClause and its modification mkClSlash are too detailed.
This commit is contained in:
+26
-40
@@ -1,5 +1,5 @@
|
||||
--# -path=.:../abstract:../common:../prelude
|
||||
concrete CatGer of Cat' =
|
||||
concrete CatGer of Cat =
|
||||
CommonX - [Tense,Temp] **
|
||||
open ResGer, Prelude in {
|
||||
|
||||
@@ -12,14 +12,14 @@ concrete CatGer of Cat' =
|
||||
S = {s : Order => Str} ;
|
||||
QS = {s : QForm => Str} ;
|
||||
RS = {s : RelGenNum => Str ; c : Case} ;
|
||||
SSlash = {s : Order => Str} ** {c2 : Preposition'} ;
|
||||
SSlash = {s : Order => Str} ** {c2 : Preposition} ;
|
||||
|
||||
-- Sentence
|
||||
|
||||
Cl = {s : Mood => ResGer.Tense => Anteriority => Polarity => Order => Str} ;
|
||||
ClSlash = {
|
||||
s : Mood => ResGer.Tense => Anteriority => Polarity => Order => Str ;
|
||||
c2 : Preposition'
|
||||
c2 : Preposition
|
||||
} ;
|
||||
Imp = {s : Polarity => ImpForm => Str} ;
|
||||
|
||||
@@ -58,35 +58,23 @@ concrete CatGer of Cat' =
|
||||
adv : Str ; -- Haus [adv auf dem Hügel]
|
||||
g : Gender
|
||||
} ;
|
||||
-- NP = ResGer.NP ;
|
||||
Pron = {s : NPForm => Str ; a : Agr} ;
|
||||
{-
|
||||
Det, DAP = {s,sp : Gender => PCase => Str ; n : Number ; a : Adjf ; isDef : Bool} ;
|
||||
Quant = {
|
||||
s : Bool => Number => Gender => PCase => Str ; -- Bool is True if a cardinal number is present
|
||||
sp : Bool => Number => Gender => PCase => Str ;
|
||||
a : Adjf ;
|
||||
aPl : Adjf ; --- to distinguish "meine guten Freunde" / "gute Freunde"
|
||||
} ;
|
||||
Predet = {
|
||||
s : Number => Gender => PCase => Str ;
|
||||
c : {p : Str ; k : PredetCase} ;
|
||||
a : PredetAgr -- if an agr is forced, e.g. jeder von uns ist ...
|
||||
} ;
|
||||
-}
|
||||
-- HL: To reduce PCase to Case:
|
||||
NP' = ResGer.NP' ;
|
||||
Det' = {s,sp : Bool => Gender => Case => Str ; -- True if DefArt is dropped
|
||||
n : Number ; a : Adjf ; isDef, hasDefArt : Bool } ;
|
||||
DAP' = {s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef, hasDefArt : Bool } ;
|
||||
Quant' = { -- HL 7/2022: first Bool = True if used to glue in Sg with preposition
|
||||
s : Bool => Bool => Number => Gender => Case => Str ; -- second Bool is True if a cardinal number is present
|
||||
sp : Bool => Bool => Number => Gender => Case => Str ;
|
||||
|
||||
-- simplified PCase to Case in NP, Det, DAP, Quant, Predet HL 8/22
|
||||
NP = ResGer.NP ;
|
||||
Det = {s,sp : Bool => Gender => Case => Str ; -- True if DefArt is dropped HL 8/22
|
||||
n : Number ; a : Adjf ; isDef, hasDefArt : Bool } ;
|
||||
DAP = {s,sp : Gender => Case => Str ; n : Number ; a : Adjf ; isDef, hasDefArt : Bool } ;
|
||||
|
||||
-- HL 7/2022: first Bool = True if used to glue in Sg with preposition
|
||||
-- second Bool is True if a cardinal number is present
|
||||
Quant = {
|
||||
s, sp : Bool => Bool => Number => Gender => Case => Str ;
|
||||
a : Adjf ;
|
||||
aPl : Adjf ; --- to distinguish "meine guten Freunde" / "gute Freunde"
|
||||
hasDefArt : Bool
|
||||
} ;
|
||||
Predet' = {
|
||||
Predet = {
|
||||
s : Number => Gender => Case => Str ;
|
||||
c : {p : Str ; k : PredetCase'} ;
|
||||
a : PredetAgr -- if an agr is forced, e.g. jeder von uns ist ...
|
||||
@@ -105,23 +93,22 @@ concrete CatGer of Cat' =
|
||||
|
||||
Conj = {s1,s2 : Str ; n : Number} ;
|
||||
Subj = {s : Str} ;
|
||||
-- Prep = Preposition ;
|
||||
Prep' = Preposition' ;
|
||||
Prep = Preposition ;
|
||||
|
||||
-- Open lexical classes, e.g. Lexicon
|
||||
|
||||
V, VA, VS, VQ = ResGer.Verb ; -- = {s : VForm => Str} ;
|
||||
VV = Verb ** {isAux : Bool} ;
|
||||
V2, V2A, V2S, V2Q = Verb ** {c2 : Preposition'} ;
|
||||
V2V = Verb ** {c2 : Preposition' ; isAux : Bool ; objCtrl : Bool} ;
|
||||
V3 = Verb ** {c2, c3 : Preposition'} ;
|
||||
V2, V2A, V2S, V2Q = Verb ** {c2 : Preposition} ;
|
||||
V2V = Verb ** {c2 : Preposition ; isAux : Bool ; objCtrl : Bool} ;
|
||||
V3 = Verb ** {c2, c3 : Preposition} ;
|
||||
|
||||
A = {s : Degree => AForm => Str} ;
|
||||
A2 = {s : Degree => AForm => Str ; c2 : Preposition'} ;
|
||||
A2 = {s : Degree => AForm => Str ; c2 : Preposition} ;
|
||||
|
||||
N = ResGer.Noun ;
|
||||
N2 = ResGer.Noun ** {c2 : Preposition'} ;
|
||||
N3 = ResGer.Noun ** {c2,c3 : Preposition'} ;
|
||||
N2 = ResGer.Noun ** {c2 : Preposition} ;
|
||||
N3 = ResGer.Noun ** {c2,c3 : Preposition} ;
|
||||
PN = {s : Case => Str; g : Gender} ;
|
||||
|
||||
-- tense with possibility to choose conjunctive forms
|
||||
@@ -130,8 +117,7 @@ concrete CatGer of Cat' =
|
||||
Tense = {s : Str ; t : ResGer.Tense ; m : Mood} ;
|
||||
|
||||
linref
|
||||
-- NP = \np -> np.s!(NPC Nom) ++ np.ext ++ np.rc ; -- HL 6/2019
|
||||
NP' = \np -> np.s ! False ! Nom ++ np.ext ++ np.rc ; -- HL 7/2022 Bool added
|
||||
NP = \np -> np.s ! False ! Nom ++ np.ext ++ np.rc ; -- HL 7/2022 Bool added
|
||||
CN = \cn -> cn.s ! Strong ! Pl ! Nom ++ cn.adv ++ cn.ext ++ cn.rc ! Pl ;
|
||||
|
||||
SSlash = \ss -> ss.s ! Main ++ ss.c2.s ! GPl ;
|
||||
@@ -152,7 +138,7 @@ concrete CatGer of Cat' =
|
||||
|
||||
Conj = \c -> c.s1 ++ c.s2 ;
|
||||
|
||||
Det' = \det -> det.s ! False ! Masc ! Nom ;
|
||||
Prep' = \prep -> case prep.isPrep of {isPrepDefArt => prep.s ! GSg Masc ;
|
||||
_ => prep.s ! GPl } ;
|
||||
Det = \det -> det.s ! False ! Masc ! Nom ;
|
||||
Prep = \prep -> case prep.isPrep of {isPrepDefArt => prep.s ! GSg Masc ;
|
||||
_ => prep.s ! GPl } ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user