forked from GitHub/gf-rgl
(Ara) Fix bug in SlashV2VNP + refactor some related opers
This commit is contained in:
@@ -1546,9 +1546,7 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
||||
} in wordOrder o
|
||||
vp.obj.a.isPron np.a.isPron
|
||||
(vStr vp pgn t p)
|
||||
(case <vp.isPred,vp.obj.a.isPron> of {
|
||||
<False,True> => BIND ++ vp.obj.s ;
|
||||
_ => vp.obj.s })
|
||||
vp.obj.s
|
||||
(pred vp pgn t p)
|
||||
vp.s2
|
||||
subj
|
||||
@@ -1626,11 +1624,18 @@ patHollowImp : (_,_ :Str) -> Gender => Number => Str =\xaf,xAf ->
|
||||
subj2np : Subj -> NP = \su -> su ** {a = {pgn = emptyNP.a.pgn ; isPron = su.isPron} ; empty=[]} ;
|
||||
emptyObj : Obj = emptyNP ** {s=[]} ;
|
||||
|
||||
insertObj : NP -> VPSlash -> VP = \np,vp -> vp **
|
||||
{ obj = {s = vp.obj.s -- old object, if there was one
|
||||
++ vp.c2.s ++ np.s ! vp.c2.c -- new object
|
||||
insertObj : NP -> VPSlash -> VP = \np,vp -> vp ** {
|
||||
obj = {s = vp.obj.s -- old object, if there was one
|
||||
++ bindIfPron np vp -- new object, bind if pronoun and not pred
|
||||
++ vp.agrObj ! np.a.pgn ; -- only used for SlashV2V
|
||||
a = np.a} };
|
||||
a = np.a}
|
||||
} ;
|
||||
|
||||
bindIfPron : NP -> {c2:Preposition; isPred:Bool} -> Str = \np,vp ->
|
||||
let bind = case <vp.isPred,np.a.isPron> of {
|
||||
<False,True> => BIND ;
|
||||
_ => [] }
|
||||
in vp.c2.s ++ bind ++ np.s ! vp.c2.c ;
|
||||
|
||||
insertPred : Comp -> VP -> VP = \p,vp -> vp **
|
||||
{ pred = p;
|
||||
|
||||
@@ -14,17 +14,19 @@ concrete VerbAra of Verb = CatAra ** open Prelude, ResAra, ParamX in {
|
||||
agrObj = \\pgn => v2v.c3.s -- أَنْ
|
||||
++ vp.s ! pgn ! VPImpf Cnj ;
|
||||
isPred = False ;
|
||||
c2 = v2v.c2 ; -- for the direct object
|
||||
c2 = v2v.c2 ; -- preposition for the direct object
|
||||
sc = v2v.sc
|
||||
} ;
|
||||
|
||||
-- : V2V -> NP -> VPSlash -> VPSlash ; -- beg me to buy
|
||||
SlashV2VNP v2v np vps = let v2vVP = predV v2v in -- IL
|
||||
SlashV2VNP v2v np vps = let v2vVP = slashV2 v2v in -- IL
|
||||
vps ** {
|
||||
s = \\pgn,vpf => v2vVP.s ! pgn ! vpf
|
||||
++ v2v.c2.s ++ np.s ! v2v.c2.c
|
||||
s = \\pgn,vpf => v2vVP.s ! pgn ! vpf -- main verb agrees with subject
|
||||
++ bindIfPron np v2vVP
|
||||
++ v2v.c3.s -- أَنْ
|
||||
++ vps.s ! pgn ! VPImpf Cnj ;
|
||||
++ vps.s ! np.a.pgn ! VPImpf Cnj -- verb from old VP agrees with object
|
||||
++ vps.obj.s ; -- otherwise obj appears in a weird place /IL
|
||||
obj = emptyObj ;
|
||||
isPred = False ;
|
||||
-- preposition for the direct object comes from VP
|
||||
sc = v2v.sc
|
||||
|
||||
Reference in New Issue
Block a user