mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
(Ger) Implemented QVP in Question, GenIP and GenModIP in Extend
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
concrete ExtendGer of Extend =
|
||||
CatGer ** ExtendFunctor
|
||||
- [ -- remove the default implementations of:
|
||||
GenNP, GenRP, EmptyRelSlash,
|
||||
GenNP, GenRP, EmptyRelSlash, GenIP, GenModIP,
|
||||
VPS, ListVPS, MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
|
||||
VPI, ListVPI, MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
|
||||
ICompAP, IAdvAdv, CompIQuant, PrepCN,
|
||||
@@ -37,11 +37,12 @@ concrete ExtendGer of Extend =
|
||||
} ;
|
||||
|
||||
GenRP nu cn = {
|
||||
s = \\gn,c => relPron ! gn ! Gen ++ cn.s ! Weak ! nu.n ! c ;
|
||||
s = \\gn,c => relPron ! gn ! Gen ++ cn.s ! Strong ! nu.n ! c ;
|
||||
a = RAg nu.n P3
|
||||
} ;
|
||||
|
||||
|
||||
GenIP ip = {s = \\gn,c => ip.s!Gen ; a = Strong} ;
|
||||
GenModIP num ip cn = IdetCN (IdetQuant (GenIP ip) num) cn ;
|
||||
|
||||
EmptyRelSlash slash = {
|
||||
s = \\m,t,a,p,gn =>
|
||||
|
||||
@@ -385,6 +385,4 @@ concrete ExtraGer of ExtraGerAbs = CatGer **
|
||||
|
||||
-- this function is not entirely satisfactory as largely
|
||||
-- though not entirely duplicating mkClause in ResGer
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -105,5 +105,36 @@ concrete QuestionGer of Question = CatGer ** open ResGer, Prelude in {
|
||||
|
||||
CompIP ip = {s = \\_ => ip.s ! Nom ; ext = "" } ;
|
||||
|
||||
-- QVP (added 9/2025, HL)
|
||||
lincat
|
||||
QVP = ResGer.VP ;
|
||||
|
||||
linref
|
||||
QVP = \vp -> useInfVP False vp ;
|
||||
|
||||
lin
|
||||
ComplSlashIP vps ip = -- just as ComplSlash : VPSlash -> NP -> VP
|
||||
let np = lin NP {s = table Bool {_ => ip.s} ;
|
||||
a = agrGenNum ip.a ;
|
||||
w = WLight ; -- guessed
|
||||
rc,ext = []} ;
|
||||
vp = case vps.objCtrl of { True => objAgr np vps ; _ => vps }
|
||||
** { c2 = vps.c2 ; objCtrl = vps.objCtrl } ;
|
||||
in insertObjNP np vps.c2 vp ;
|
||||
|
||||
AdvQVP vp iadv = insertAdv iadv.s vp ;
|
||||
AddAdvQVP qvp iadv = insertAdv iadv.s qvp ;
|
||||
|
||||
QuestQVP ip qvp = { -- just as QuestVP, with qvp as vp
|
||||
s = \\m,t,a,p =>
|
||||
let
|
||||
who = appPrep qvp.c1 ip.s ;
|
||||
cl = (mkClause who (agrGenNum ip.a) qvp).s ! m ! t ! a ! p
|
||||
in table {
|
||||
QDir => cl ! Main ;
|
||||
QIndir => cl ! Sub
|
||||
}
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -18,9 +18,10 @@ concrete RelativeGer of Relative = CatGer ** open ResGer, Prelude in {
|
||||
} ;
|
||||
agr = case rp.a of {
|
||||
RNoAg => agrP3 (numGenNum gn) ;
|
||||
RAg n p => case n of {Sg => AgSgP3 Neutr ; Pl => AgPl p}
|
||||
} ;
|
||||
cl = mkClause (rp.s ! rgn ! Nom) agr vp
|
||||
RAg Sg p => AgSgP3 Neutr ;
|
||||
RAg Pl p => AgPl p
|
||||
} ; -- subject may be non-nom, e.g. an dem gezweifelt wird
|
||||
cl = mkClause (appPrep vp.c1 (rp.s ! rgn)) agr vp
|
||||
in
|
||||
cl.s ! m ! t ! ant ! b ! Sub ;
|
||||
c = Nom
|
||||
|
||||
Reference in New Issue
Block a user