forked from GitHub/gf-rgl
fix copula
This commit is contained in:
@@ -1,4 +1,24 @@
|
|||||||
--# -path=.:../common:../abstract
|
--# -path=.:../common:../abstract
|
||||||
|
|
||||||
concrete ExtendSco of Extend = ExtendEng ** {
|
concrete ExtendSco of Extend = ExtendEng-[passVPSlash,PassVPSlash,PassAgentVPSlash,ProgrVPSlash] ** open ResSco in {
|
||||||
|
|
||||||
|
oper
|
||||||
|
passVPSlash : VPSlash -> Str -> ResEng.VP =
|
||||||
|
\vps,ag ->
|
||||||
|
let
|
||||||
|
be = predAux auxBe ;
|
||||||
|
ppt = vps.ptp
|
||||||
|
in be ** {
|
||||||
|
p = [] ;
|
||||||
|
ad = \\_ => [] ;
|
||||||
|
s2 = \\a => vps.ad ! a ++ ppt ++ vps.p ++ vps.s2 ! a ++ ag ++ vps.c2 ; ---- place of agent
|
||||||
|
isSimple = False ;
|
||||||
|
ext = vps.ext
|
||||||
|
} ;
|
||||||
|
|
||||||
|
lin PassVPSlash vps = passVPSlash (lin VPSlash vps) [] ;
|
||||||
|
PassAgentVPSlash vps np = passVPSlash (lin VPSlash vps) ("by" ++ np.s ! NPAcc) ;
|
||||||
|
ProgrVPSlash vp = insertObjc (\\a => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a)
|
||||||
|
(predAux auxBe ** {c2 = vp.c2; gapInMiddle = vp.gapInMiddle; missingAdv = vp.missingAdv});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1,29 @@
|
|||||||
concrete IdiomSco of Idiom = IdiomEng ** {
|
concrete IdiomSco of Idiom = IdiomEng - [CleftNP,CleftAdv,ExistNP,ExistIP,ExistNPAdv,ExistIPAdv,ProgrVP] ** open Prelude, ResSco in {
|
||||||
|
|
||||||
|
lin CleftNP np rs = mkClause "it" (agrP3 Sg)
|
||||||
|
(insertObj (\\_ => rs.s ! np.a)
|
||||||
|
(insertObj (\\_ => np.s ! rs.c) (predAux auxBe))) ;
|
||||||
|
|
||||||
|
CleftAdv ad s = mkClause "it" (agrP3 Sg)
|
||||||
|
(insertObj (\\_ => conjThat ++ s.s)
|
||||||
|
(insertObj (\\_ => ad.s) (predAux auxBe))) ;
|
||||||
|
|
||||||
|
ExistNP np =
|
||||||
|
mkClause "there" (agrP3 (fromAgr np.a).n)
|
||||||
|
(insertObj (\\_ => np.s ! NPAcc) (predAux auxBe)) ;
|
||||||
|
|
||||||
|
ExistIP ip =
|
||||||
|
mkQuestion (ss (ip.s ! npNom))
|
||||||
|
(mkClause "there" (agrP3 ip.n) (predAux auxBe)) ;
|
||||||
|
|
||||||
|
ExistNPAdv np adv =
|
||||||
|
mkClause "there" (agrP3 (fromAgr np.a).n)
|
||||||
|
(insertObj (\\_ => np.s ! NPAcc ++ adv.s) (predAux auxBe)) ;
|
||||||
|
|
||||||
|
ExistIPAdv ip adv =
|
||||||
|
mkQuestion (ss (ip.s ! npNom))
|
||||||
|
(mkClause "there" (agrP3 ip.n) (insertObj (\\_ => adv.s) (predAux auxBe))) ;
|
||||||
|
|
||||||
|
ProgrVP vp = insertObj (\\a => vp.ad ! a ++ vp.prp ++ vp.p ++ vp.s2 ! a) (predAux auxBe) ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
concrete QuestionSco of Question = QuestionEng ** {
|
concrete QuestionSco of Question = QuestionEng-[QuestIComp] ** open ResSco in {
|
||||||
|
|
||||||
|
lin QuestIComp icomp np =
|
||||||
|
mkQuestion icomp (mkClause (np.s ! npNom) np.a (predAux auxBe)) ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1,29 @@
|
|||||||
resource ResSco = ResEng ** {
|
resource ResSco = ResEng - [auxBe,posneg] ** {
|
||||||
|
|
||||||
|
oper
|
||||||
|
auxBe : Aux = {
|
||||||
|
pres = \\b,a => case <b,a> of {
|
||||||
|
<Pos,AgP1 Sg> => "am" ;
|
||||||
|
<Neg,AgP1 Sg> => "amna" ;
|
||||||
|
_ => agrVerb (posneg b "is") (posneg b "are") a
|
||||||
|
} ;
|
||||||
|
contr = \\b,a => case <b,a> of {
|
||||||
|
<Pos,AgP1 Sg> => cBind "m" ;
|
||||||
|
<Neg,AgP1 Sg> => cBind "m not" ; --- am not I
|
||||||
|
_ => agrVerb (posneg b (cBind "s")) (posneg b (cBind "re")) a
|
||||||
|
} ;
|
||||||
|
past = \\b,a => case a of { --# notpresent
|
||||||
|
AgP1 Sg | AgP3Sg _ => posneg b "wis" ; --# notpresent
|
||||||
|
_ => posneg b "wir" --# notpresent
|
||||||
|
} ; --# notpresent
|
||||||
|
inf = "be" ;
|
||||||
|
ppart = "been" ;
|
||||||
|
prpart = "bein"
|
||||||
|
} ;
|
||||||
|
|
||||||
|
posneg : Polarity -> Str -> Str = \p,s -> case p of {
|
||||||
|
Pos => s ;
|
||||||
|
Neg => s + "na"
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
concrete VerbSco of Verb = VerbEng ** {
|
concrete VerbSco of Verb = VerbEng-[UseComp,UseCopula,PassV2] ** open ResSco in {
|
||||||
|
|
||||||
|
lin UseComp comp = insertObj comp.s (predAux auxBe) ;
|
||||||
|
UseCopula = predAux auxBe ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user