forked from GitHub/gf-core
added some VP constructions to Pred: without/after/before/when doing, in order to do
This commit is contained in:
@@ -140,8 +140,11 @@ fun
|
|||||||
UseCN_none : Ant -> Tense -> Pol -> PrCN_none -> PrVP_none ;
|
UseCN_none : Ant -> Tense -> Pol -> PrCN_none -> PrVP_none ;
|
||||||
UseCN_np : Ant -> Tense -> Pol -> PrCN_np -> PrVP_np ;
|
UseCN_np : Ant -> Tense -> Pol -> PrCN_np -> PrVP_np ;
|
||||||
|
|
||||||
--< UseNP : Ant -> Tense -> Pol -> NP -> PrVP aNone ; -- she is the person
|
-- the following are only for aNone
|
||||||
UseNP_none : Ant -> Tense -> Pol -> NP -> PrVP_none ;
|
UseNP_none : Ant -> Tense -> Pol -> NP -> PrVP_none ;
|
||||||
|
UseS_none : Ant -> Tense -> Pol -> PrCl_none -> PrVP_none ; -- the fact is that she sleeps
|
||||||
|
UseQ_none : Ant -> Tense -> Pol -> PrQCl_none -> PrVP_none ; -- the question is who sleeps
|
||||||
|
UseVP_none : Ant -> Tense -> Pol -> PrVPI_none -> PrVP_none ; -- the goal is to sleep
|
||||||
|
|
||||||
--< InfVP : (a : Arg) -> PrVP a -> PrVPI a ;
|
--< InfVP : (a : Arg) -> PrVP a -> PrVPI a ;
|
||||||
InfVP_none : PrVP_none -> PrVPI_none ;
|
InfVP_none : PrVP_none -> PrVPI_none ;
|
||||||
@@ -223,6 +226,28 @@ fun
|
|||||||
--< AgentPastPartAP : (a : Arg) -> PrV (aNP a) -> NP -> PrAP a ;
|
--< AgentPastPartAP : (a : Arg) -> PrV (aNP a) -> NP -> PrAP a ;
|
||||||
AgentPastPartAP_none : PrV_np -> NP -> PrAP_none ;
|
AgentPastPartAP_none : PrV_np -> NP -> PrAP_none ;
|
||||||
|
|
||||||
|
-- for aNone only
|
||||||
|
NomVPNP_none : PrVPI_none -> NP ; -- translating a document
|
||||||
|
|
||||||
|
--< ByVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- by translating a document
|
||||||
|
ByVP_none : PrVP_none -> PrVPI_none -> PrVP_none ;
|
||||||
|
|
||||||
|
--< WhenVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- when translating a document
|
||||||
|
WhenVP_none : PrVP_none -> PrVPI_none -> PrVP_none ;
|
||||||
|
|
||||||
|
--< BeforeVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- before translating a document
|
||||||
|
BeforeVP_none : PrVP_none -> PrVPI_none -> PrVP_none ;
|
||||||
|
|
||||||
|
--< AfterVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- after translating a document
|
||||||
|
AfterVP_none : PrVP_none -> PrVPI_none -> PrVP_none ;
|
||||||
|
|
||||||
|
--< InOrderVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- in order to translate a document
|
||||||
|
InOrderVP_none : PrVP_none -> PrVPI_none -> PrVP_none ;
|
||||||
|
|
||||||
|
--< WithoutVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- without translating a document
|
||||||
|
WithoutVP_none : PrVP_none -> PrVPI_none -> PrVP_none ;
|
||||||
|
|
||||||
|
|
||||||
-- PrVP coordination
|
-- PrVP coordination
|
||||||
|
|
||||||
--< StartVPC : (a : Arg) -> Conj -> PrVP a -> PrVP a -> VPC a ;
|
--< StartVPC : (a : Arg) -> Conj -> PrVP a -> PrVP a -> VPC a ;
|
||||||
|
|||||||
@@ -84,6 +84,12 @@ lin
|
|||||||
= Pred.UseAdv Pred.aNone ;
|
= Pred.UseAdv Pred.aNone ;
|
||||||
UseNP_none
|
UseNP_none
|
||||||
= Pred.UseNP ;
|
= Pred.UseNP ;
|
||||||
|
UseS_none
|
||||||
|
= Pred.UseS ;
|
||||||
|
UseQ_none
|
||||||
|
= Pred.UseQ ;
|
||||||
|
UseVP_none
|
||||||
|
= Pred.UseVP ;
|
||||||
|
|
||||||
ComplV2_none
|
ComplV2_none
|
||||||
= Pred.ComplV2 Pred.aNone ;
|
= Pred.ComplV2 Pred.aNone ;
|
||||||
@@ -177,6 +183,22 @@ lin
|
|||||||
AgentPastPartAP_none
|
AgentPastPartAP_none
|
||||||
= Pred.AgentPastPartAP Pred.aNone ;
|
= Pred.AgentPastPartAP Pred.aNone ;
|
||||||
|
|
||||||
|
NomVPNP_none
|
||||||
|
= Pred.NomVPNP ;
|
||||||
|
|
||||||
|
ByVP_none
|
||||||
|
= Pred.ByVP Pred.aNone ;
|
||||||
|
WhenVP_none
|
||||||
|
= Pred.WhenVP Pred.aNone ;
|
||||||
|
BeforeVP_none
|
||||||
|
= Pred.BeforeVP Pred.aNone ;
|
||||||
|
AfterVP_none
|
||||||
|
= Pred.AfterVP Pred.aNone ;
|
||||||
|
InOrderVP_none
|
||||||
|
= Pred.InOrderVP Pred.aNone ;
|
||||||
|
WithoutVP_none
|
||||||
|
= Pred.WithoutVP Pred.aNone ;
|
||||||
|
|
||||||
StartVPC_none, StartVPC_np
|
StartVPC_none, StartVPC_np
|
||||||
= Pred.StartVPC Pred.aNone ;
|
= Pred.StartVPC Pred.aNone ;
|
||||||
ContVPC_none, ContVPC_np
|
ContVPC_none, ContVPC_np
|
||||||
|
|||||||
@@ -42,10 +42,13 @@ fun
|
|||||||
|
|
||||||
InfVP : (a : Arg) -> PrVP a -> PrVPI a ; -- to love X
|
InfVP : (a : Arg) -> PrVP a -> PrVPI a ; -- to love X
|
||||||
|
|
||||||
UseAP : (a : Arg) -> Ant -> Tense -> Pol -> PrAP a -> PrVP a ; -- she is married to X
|
UseAP : (a : Arg) -> Ant -> Tense -> Pol -> PrAP a -> PrVP a ; -- she is married to X
|
||||||
UseAdv : (a : Arg) -> Ant -> Tense -> Pol -> PrAdv a -> PrVP a ; -- she is in X
|
UseAdv : (a : Arg) -> Ant -> Tense -> Pol -> PrAdv a -> PrVP a ; -- she is in X
|
||||||
UseCN : (a : Arg) -> Ant -> Tense -> Pol -> PrCN a -> PrVP a ; -- she is a member of X
|
UseCN : (a : Arg) -> Ant -> Tense -> Pol -> PrCN a -> PrVP a ; -- she is a member of X
|
||||||
UseNP : Ant -> Tense -> Pol -> NP -> PrVP aNone ; -- she is the person
|
UseNP : Ant -> Tense -> Pol -> NP -> PrVP aNone ; -- she is the person
|
||||||
|
UseS : Ant -> Tense -> Pol -> PrCl aNone -> PrVP aNone ; -- the fact is that she sleeps
|
||||||
|
UseQ : Ant -> Tense -> Pol -> PrQCl aNone -> PrVP aNone ; -- the question is who sleeps
|
||||||
|
UseVP : Ant -> Tense -> Pol -> PrVPI aNone -> PrVP aNone ; -- the goal is to sleep
|
||||||
|
|
||||||
PredVP : (a : Arg) -> NP -> PrVP a -> PrCl a ;
|
PredVP : (a : Arg) -> NP -> PrVP a -> PrCl a ;
|
||||||
|
|
||||||
@@ -87,6 +90,17 @@ fun
|
|||||||
PastPartAP : (a : Arg) -> PrV (aNP a) -> PrAP a ;
|
PastPartAP : (a : Arg) -> PrV (aNP a) -> PrAP a ;
|
||||||
AgentPastPartAP : (a : Arg) -> PrV (aNP a) -> NP -> PrAP a ;
|
AgentPastPartAP : (a : Arg) -> PrV (aNP a) -> NP -> PrAP a ;
|
||||||
|
|
||||||
|
-- nominalization
|
||||||
|
NomVPNP : PrVPI aNone -> NP ; -- translating a document
|
||||||
|
|
||||||
|
-- other uses of VP's
|
||||||
|
ByVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- by translating a document
|
||||||
|
WhenVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- when translating a document
|
||||||
|
BeforeVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- before translating a document
|
||||||
|
AfterVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- after translating a document
|
||||||
|
InOrderVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- in order to translate a document
|
||||||
|
WithoutVP : (a : Arg) -> PrVP a -> PrVPI aNone -> PrVP a ; -- without translating a document
|
||||||
|
|
||||||
-- PrVP coordination
|
-- PrVP coordination
|
||||||
|
|
||||||
StartVPC : (a : Arg) -> Conj -> PrVP a -> PrVP a -> VPC a ;
|
StartVPC : (a : Arg) -> Conj -> PrVP a -> PrVP a -> VPC a ;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ concrete PredEng of Pred =
|
|||||||
with
|
with
|
||||||
(PredInterface = PredInstanceEng)
|
(PredInterface = PredInstanceEng)
|
||||||
|
|
||||||
** open PredInstanceEng in {
|
** open PredInstanceEng, (R = ResEng) in {
|
||||||
|
|
||||||
lin
|
lin
|
||||||
QuestIComp a t p icomp np =
|
QuestIComp a t p icomp np =
|
||||||
@@ -17,4 +17,17 @@ lin
|
|||||||
qforms = qformsCopula (a.s ++ t.s ++ p.s) t.t a.a p.p vagr ;
|
qforms = qformsCopula (a.s ++ t.s ++ p.s) t.t a.a p.p vagr ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
NomVPNP vpi = {
|
||||||
|
s = \\c => vpi.s ! R.VVPresPart ! defaultAgr ;
|
||||||
|
a = defaultAgr
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
ByVP x vp vpi = vp ** {adv = "by" ++ vpi.s ! R.VVPresPart ! defaultAgr} ; ---- agr
|
||||||
|
WhenVP x vp vpi = vp ** {adv = "when" ++ vpi.s ! R.VVPresPart ! defaultAgr} ; ---- agr
|
||||||
|
BeforeVP x vp vpi = vp ** {adv = "before" ++ vpi.s ! R.VVPresPart ! defaultAgr} ; ---- agr
|
||||||
|
AfterVP x vp vpi = vp ** {adv = "after" ++ vpi.s ! R.VVPresPart ! defaultAgr} ; ---- agr
|
||||||
|
InOrderVP x vp vpi = vp ** {adv = "in order" ++ vpi.s ! R.VVInf ! defaultAgr} ; ---- agr
|
||||||
|
WithoutVP x vp vpi = vp ** {adv = "without" ++ vpi.s ! R.VVPresPart ! defaultAgr} ; ---- agr
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,6 +122,10 @@ lin
|
|||||||
adj = \\a => np.s ! subjCase ;
|
adj = \\a => np.s ! subjCase ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
UseS a t p cl = addExtVP (useCopula a t p) (that_Compl ++ declSubordCl cl) ; ---- sentence form
|
||||||
|
UseQ a t p cl = addExtVP (useCopula a t p) (questSubordCl cl) ;
|
||||||
|
UseVP a t p vp = addExtVP (useCopula a t p) (vp.s ! vvInfinitive ! defaultAgr) ;
|
||||||
|
|
||||||
ComplV2 x vp np = vp ** {
|
ComplV2 x vp np = vp ** {
|
||||||
obj1 = <\\a => np.s ! objCase, np.a> -- np.a for object control
|
obj1 = <\\a => np.s ! objCase, np.a> -- np.a for object control
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -142,6 +142,8 @@ oper
|
|||||||
be_Aux s t a p agr ;
|
be_Aux s t a p agr ;
|
||||||
tenseInfCopula : Str -> Anteriority -> Polarity -> VVType -> Str = \s,a,p,vt ->
|
tenseInfCopula : Str -> Anteriority -> Polarity -> VVType -> Str = \s,a,p,vt ->
|
||||||
tenseInfV s a p Act be_V vt ;
|
tenseInfV s a p Act be_V vt ;
|
||||||
|
tenseImpCopula : Str -> Polarity -> ImpType -> Str = \s,p,n ->
|
||||||
|
imperativeV s p n be_V ;
|
||||||
|
|
||||||
tenseV : Str -> STense -> Anteriority -> Polarity -> SVoice -> VAgr -> PrVerb -> Str * Str * Str =
|
tenseV : Str -> STense -> Anteriority -> Polarity -> SVoice -> VAgr -> PrVerb -> Str * Str * Str =
|
||||||
\sta,t,a,p,o,agr,v ->
|
\sta,t,a,p,o,agr,v ->
|
||||||
|
|||||||
@@ -161,6 +161,8 @@ oper
|
|||||||
\s,t,a,p,_ -> tenseV s t a p CommonScand.Act UUnit (liftV be_V) ;
|
\s,t,a,p,_ -> tenseV s t a p CommonScand.Act UUnit (liftV be_V) ;
|
||||||
tenseInfCopula : Str -> Anteriority -> Polarity -> VVType -> Str =
|
tenseInfCopula : Str -> Anteriority -> Polarity -> VVType -> Str =
|
||||||
\s,a,p,vt -> tenseInfV s a p CommonScand.Act (liftV be_V) vt ;
|
\s,a,p,vt -> tenseInfV s a p CommonScand.Act (liftV be_V) vt ;
|
||||||
|
tenseImpCopula : Str -> Polarity -> ImpType -> Str =
|
||||||
|
\s,p,n -> imperativeV s p n (liftV be_V) ;
|
||||||
|
|
||||||
hava_V : Verb = P.mkV "ha" "har" "ha" "hade" "haft" "havd" ; -- havd not used
|
hava_V : Verb = P.mkV "ha" "har" "ha" "hade" "haft" "havd" ; -- havd not used
|
||||||
be_V : Verb = P.mkV "vara" "är" "var" "var" "varit" "varen" ; -- varen not used
|
be_V : Verb = P.mkV "vara" "är" "var" "var" "varit" "varen" ; -- varen not used
|
||||||
|
|||||||
@@ -240,6 +240,7 @@ oper
|
|||||||
|
|
||||||
tenseCopula : Str -> STense -> Anteriority -> Polarity -> VAgr -> Str * Str * Str ;
|
tenseCopula : Str -> STense -> Anteriority -> Polarity -> VAgr -> Str * Str * Str ;
|
||||||
tenseInfCopula : Str -> Anteriority -> Polarity -> VVType -> Str ;
|
tenseInfCopula : Str -> Anteriority -> Polarity -> VVType -> Str ;
|
||||||
|
tenseImpCopula : Str -> Polarity -> ImpType -> Str ;
|
||||||
|
|
||||||
declCl : PrClause -> Str ;
|
declCl : PrClause -> Str ;
|
||||||
declSubordCl : PrClause -> Str ;
|
declSubordCl : PrClause -> Str ;
|
||||||
@@ -264,6 +265,7 @@ oper
|
|||||||
\a,t,p -> initPrVerbPhrase ** {
|
\a,t,p -> initPrVerbPhrase ** {
|
||||||
v = \\agr => tenseCopula (a.s ++ t.s ++ p.s) t.t a.a p.p agr ;
|
v = \\agr => tenseCopula (a.s ++ t.s ++ p.s) t.t a.a p.p agr ;
|
||||||
inf = \\vt => tenseInfCopula a.s a.a p.p vt ;
|
inf = \\vt => tenseInfCopula a.s a.a p.p vt ;
|
||||||
|
imp = \\n => tenseImpCopula p.s p.p n ;
|
||||||
adV = negAdV p ;
|
adV = negAdV p ;
|
||||||
qforms = \\agr => qformsCopula (a.s ++ t.s ++ p.s) t.t a.a p.p agr ;
|
qforms = \\agr => qformsCopula (a.s ++ t.s ++ p.s) t.t a.a p.p agr ;
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
@@ -28,4 +28,16 @@ lin
|
|||||||
c = objCase
|
c = objCase
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
NomVPNP vpi = {
|
||||||
|
s = \\c => "att" ++ vpi.s ! vvInfinitive ! defaultAgr ;
|
||||||
|
a = defaultAgr ** {g = Neutr} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
ByVP x vp vpi = vp ** {adv = "genom att" ++ vpi.s ! vvInfinitive ! defaultAgr} ; ---- agr
|
||||||
|
WhenVP x vp vpi = vp ** {adv = "vid att" ++ vpi.s ! vvInfinitive ! defaultAgr} ; ---- agr ----
|
||||||
|
BeforeVP x vp vpi = vp ** {adv = "innan att" ++ vpi.s ! vvInfinitive ! defaultAgr} ; ---- agr ----
|
||||||
|
AfterVP x vp vpi = vp ** {adv = "efter att" ++ vpi.s ! vvInfinitive ! defaultAgr} ; ---- agr
|
||||||
|
InOrderVP x vp vpi = vp ** {adv = "för att" ++ vpi.s ! vvInfinitive ! defaultAgr} ; ---- agr
|
||||||
|
WithoutVP x vp vpi = vp ** {adv = "utan att" ++ vpi.s ! vvInfinitive ! defaultAgr} ; ---- agr
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user