fix copula

This commit is contained in:
Krasimir Angelov
2026-02-18 09:00:26 +01:00
parent 090a6ea33d
commit e9ecb1a8d6
5 changed files with 87 additions and 5 deletions

View File

@@ -1,4 +1,24 @@
--# -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});
}

View File

@@ -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) ;
}

View File

@@ -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)) ;
}

View File

@@ -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"
} ;
}

View File

@@ -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 ;
}