mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-30 02:58:35 -06:00
Extended the new glueing of prepositions with article to {Construction,Markup,Extra}Ger.
Minor edits of param Weight, mkSubject and entries in LexiconGer.
This commit is contained in:
+20
-11
@@ -5,8 +5,8 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in {
|
||||
lin
|
||||
|
||||
PredVP np vp =
|
||||
let subj = mkSubj np vp.c1
|
||||
in mkClause subj.p1 subj.p2 vp ;
|
||||
let subj = mkSubject np vp.c1
|
||||
in mkClause subj.s subj.a vp ;
|
||||
|
||||
{- applies verb's subject case to subject ;
|
||||
forces 3rd person sg agreement for any non-nom subjects -->
|
||||
@@ -26,17 +26,26 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in {
|
||||
} ;
|
||||
agr = Ag Fem (numImp n) ps.p1 ; --- g does not matter
|
||||
verb = vps.s ! False ! agr ! VPImperat ps.p3 ;
|
||||
neg = negation ! pol ;
|
||||
inf = vp.inf.inpl.p2 ++ verb.inf ; -- HL .s/.inpl.p2
|
||||
obj = (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ++ (vp.nn ! agr).p4
|
||||
obj = (vp.nn ! agr).p2 ++ (vp.nn ! agr).p3 ++ (vp.nn ! agr).p4 ++ vp.adj
|
||||
in
|
||||
-- verb.fin ++ ps.p2 ++ (vp.nn ! agr).p1 ++ vp.a1 ! pol ++ obj ++ vp.a2 ++ inf ++ vp.ext
|
||||
verb.fin ++ ps.p2 ++ (vp.nn ! agr).p1 ++ vp.a1 ++ negation ! pol ++ obj ++ vp.a2 ++ inf ++ vp.ext
|
||||
verb.fin ++ ps.p2 ++ (vp.nn ! agr).p1 ++ vp.a1 ++ neg ++ obj ++ vp.a2 ++ inf ++ vp.ext
|
||||
} ;
|
||||
|
||||
AdvImp adv imp = {
|
||||
s = \\pol,impform => adv.s ++ imp.s ! pol ! impform
|
||||
} ;
|
||||
|
||||
-- to save (67299 - 27432 = 39863 msec) compile time: HL 7/22, comment out:
|
||||
{- SlashVP np vp =
|
||||
let subj = mkSubj np vp.c1 ; -- HL 3/2022: need a mkClSlash to prevent
|
||||
in mkClause subj.p1 subj.p2 vp ** { c2 = vp.c2 } ; -- reflexives in vp instantiated to np.a
|
||||
-} -- cf. tests/german/TestLangGer.gf
|
||||
-- resp. 167061 msec without, 159037 msec with this SlashVP, 53 % memory
|
||||
-- + SlashV2VNP 199065600 (46080,240)
|
||||
-- + SlashVP 414720 (28224,204)
|
||||
|
||||
SlashVP np vp =
|
||||
let subj = mkSubject np vp.c1 ; -- HL 3/2022: need a mkClSlash to prevent
|
||||
in mkClause subj.s subj.a vp ** { c2 = vp.c2 } ; -- reflexives in vp instantiated to np.a
|
||||
-- cf. tests/german/TestLangGer.gf
|
||||
AdvSlash slash adv = {
|
||||
s = \\m,t,a,b,o => slash.s ! m ! t ! a ! b ! o ++ adv.s ;
|
||||
c2 = slash.c2
|
||||
@@ -45,9 +54,9 @@ concrete SentenceGer of Sentence = CatGer ** open ResGer, Prelude in {
|
||||
SlashPrep cl prep = cl ** {c2 = prep} ;
|
||||
|
||||
SlashVS np vs slash =
|
||||
let subj = mkSubj np PrepNom ;
|
||||
let subj = mkSubject np PrepNom ;
|
||||
vp = (insertExtrapos (conjThat ++ slash.s ! Sub) (predV vs))
|
||||
in mkClause subj.p1 subj.p2 vp ** {c2 = slash.c2} ;
|
||||
in mkClause subj.s subj.a vp ** {c2 = slash.c2} ;
|
||||
|
||||
EmbedS s = {s = conjThat ++ s.s ! Sub} ; -- no leading comma, if sentence-initial
|
||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||
|
||||
Reference in New Issue
Block a user