mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 01:18:57 -06:00
(Pes) Merge isVV and isDef into one parameter
This commit is contained in:
@@ -56,6 +56,7 @@ resource ResPes = MorphoPes ** open Prelude,Predef in {
|
|||||||
--- Verb Phrase
|
--- Verb Phrase
|
||||||
-----------------------
|
-----------------------
|
||||||
param
|
param
|
||||||
|
VVType = NoVV | FullVV | DefVV ;
|
||||||
VVForm = Indic | Subj ;
|
VVForm = Indic | Subj ;
|
||||||
VVTense = VVPres | VVPerf | VVPast ; -- VVPast Anteriority ???
|
VVTense = VVPres | VVPerf | VVPast ; -- VVPast Anteriority ???
|
||||||
TAnt = TA Tense Anteriority ;
|
TAnt = TA Tense Anteriority ;
|
||||||
@@ -80,8 +81,7 @@ oper
|
|||||||
obj : Str ; -- object of a verb; so far only used for A ("paint it black")
|
obj : Str ; -- object of a verb; so far only used for A ("paint it black")
|
||||||
ad : Str ;
|
ad : Str ;
|
||||||
embComp : Str ; -- when a declarative or interrogative sentence is used as a complement of a verb.
|
embComp : Str ; -- when a declarative or interrogative sentence is used as a complement of a verb.
|
||||||
vvtype : Bool ; -- whether a VV has been added
|
vvtype : VVType ; -- no VV, fully inflecting VV or defective VV
|
||||||
isDef : Bool ; -- whether a the VV is defective
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
showVPH = overload {
|
showVPH = overload {
|
||||||
@@ -103,7 +103,7 @@ oper
|
|||||||
ad,
|
ad,
|
||||||
obj,
|
obj,
|
||||||
embComp = [];
|
embComp = [];
|
||||||
isDef,isVV = False ;
|
vvtype = NoVV ;
|
||||||
comp = \\_ => [] ;
|
comp = \\_ => [] ;
|
||||||
vComp = \\_,_ => [] } ;
|
vComp = \\_,_ => [] } ;
|
||||||
|
|
||||||
@@ -126,8 +126,7 @@ oper
|
|||||||
|
|
||||||
insertVV : VV -> VPH -> VPH = \vv,vp -> predV vv ** {
|
insertVV : VV -> VPH -> VPH = \vv,vp -> predV vv ** {
|
||||||
vComp = \\a,t => vp.vComp ! a ! t ++ complVV vv vp ! a ! t ;
|
vComp = \\a,t => vp.vComp ! a ! t ++ complVV vv vp ! a ! t ;
|
||||||
isVV = True ;
|
vvType = case vv.isDef of {True => DefVV ; _ => FullVV} ;
|
||||||
isDef = vv.isDef ;
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
embComp : Str -> VPH -> VPH = \str,vp -> vp ** {
|
embComp : Str -> VPH -> VPH = \str,vp -> vp ** {
|
||||||
@@ -146,16 +145,16 @@ oper
|
|||||||
---- but don't know yet how False should be affect
|
---- but don't know yet how False should be affect
|
||||||
complVV : VV -> VPH -> (Agr => VVTense => Str) = \vv,vp ->
|
complVV : VV -> VPH -> (Agr => VVTense => Str) = \vv,vp ->
|
||||||
\\agr,ant => if_then_Str vv.isAux conjThat [] ++
|
\\agr,ant => if_then_Str vv.isAux conjThat [] ++
|
||||||
case <ant,vv.compl,vv.isDef> of {
|
case <ant,vv.isDef,vv.compl> of {
|
||||||
-- Auxiliaries with full inflection: complement in subjunctive
|
|
||||||
<_,_,False> => showVPH (VSubj Pos agr) agr vp ; --
|
|
||||||
|
|
||||||
-- Auxiliaries with defective inflection: complement inflects in tense
|
-- Auxiliaries with defective inflection: complement inflects in tense
|
||||||
<VVPres,Subj,True> => showVPH (VSubj Pos agr) agr vp ;
|
<VVPast,True,_> => showVPH (VPast Pos agr) agr vp ;
|
||||||
<VVPres,Indic,True> => showVPH (VAor Pos agr) agr vp ;
|
|
||||||
<VVPast,_,True> => showVPH (VPast Pos agr) agr vp ;
|
|
||||||
-- <VVPast Anter> => showVPH PerfStem agr vp ++ pluperfAux Pos agr ; -- TODO do we need this?
|
-- <VVPast Anter> => showVPH PerfStem agr vp ++ pluperfAux Pos agr ; -- TODO do we need this?
|
||||||
<VVPerf,_,True> => showVPH PerfStem agr vp ++ subjAux Pos agr ;
|
<VVPerf,True,_> => showVPH PerfStem agr vp ++ subjAux Pos agr ;
|
||||||
|
|
||||||
|
-- Auxiliaries that take indicative (full or defective inflection)
|
||||||
|
<VVPres,_,Indic> => showVPH (VAor Pos agr) agr vp ;
|
||||||
|
|
||||||
|
-- Default: complement in subjunctive
|
||||||
_ => showVPH (VSubj Pos agr) agr vp ---- TODO more forms ?
|
_ => showVPH (VSubj Pos agr) agr vp ---- TODO more forms ?
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -179,24 +178,24 @@ oper
|
|||||||
TA Pres Anter => vp.s ! VPerf pol agr ;
|
TA Pres Anter => vp.s ! VPerf pol agr ;
|
||||||
TA Past Simul => vp.s ! VPast pol agr ;
|
TA Past Simul => vp.s ! VPast pol agr ;
|
||||||
TA Past Anter =>
|
TA Past Anter =>
|
||||||
case vp.isDef of {
|
case vp.vvtype of {
|
||||||
True => vp.s ! ImpPrefix pol ++ vp.s ! VAor pol agr ;
|
DefVV => vp.s ! ImpPrefix pol ++ vp.s ! VAor pol agr ;
|
||||||
False => vp.s ! PerfStem ++ pluperfAux pol agr } ;
|
_ => vp.s ! PerfStem ++ pluperfAux pol agr } ;
|
||||||
TA Fut Simul =>
|
TA Fut Simul =>
|
||||||
case vp.isDef of {
|
case vp.vvtype of {
|
||||||
True => vp.s ! ImpPrefix pol ++ vp.s ! VAor pol agr ;
|
DefVV => vp.s ! ImpPrefix pol ++ vp.s ! VAor pol agr ;
|
||||||
False => futAux pol agr ++ vp.s ! PastStem
|
_ => futAux pol agr ++ vp.s ! PastStem
|
||||||
} ; -- PastStem is, despite the name, used for future too. /IL
|
} ; -- PastStem is, despite the name, used for future too. /IL
|
||||||
TA Fut Anter =>
|
TA Fut Anter =>
|
||||||
case vp.isDef of {
|
case vp.vvtype of {
|
||||||
True => vp.s ! VPerf pol agr ;
|
DefVV => vp.s ! VPerf pol agr ;
|
||||||
False => "خواسته" ++ pluperfAux pol agr ++ vp.s ! PastStem
|
_ => "خواسته" ++ pluperfAux pol agr ++ vp.s ! PastStem
|
||||||
} ; -- verb form need to be confirmed
|
} ; -- verb form need to be confirmed
|
||||||
TA Cond Simul => vp.s ! VSubj pol agr ;
|
TA Cond Simul => vp.s ! VSubj pol agr ;
|
||||||
TA Cond Anter =>
|
TA Cond Anter =>
|
||||||
case vp.isDef of {
|
case vp.vvtype of {
|
||||||
True => vp.s ! VSubj pol agr ;
|
DefVV => vp.s ! VSubj pol agr ;
|
||||||
False => vp.s ! PerfStem ++ subjAux pol agr } -- verb form to be confirmed
|
_ => vp.s ! PerfStem ++ subjAux pol agr } -- verb form to be confirmed
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkClause : NP -> VPH -> Clause = \np,vp ->
|
mkClause : NP -> VPH -> Clause = \np,vp ->
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ concrete SentencePes of Sentence = CatPes ** open Prelude, ResPes,Predef in {
|
|||||||
s = \\pol,n =>
|
s = \\pol,n =>
|
||||||
let agr = Ag (numImp n) P2 ;
|
let agr = Ag (numImp n) P2 ;
|
||||||
vps = vp.prefix ++ vp.s ! VImp pol (numImp n)
|
vps = vp.prefix ++ vp.s ! VImp pol (numImp n)
|
||||||
in case vp.isVV of {
|
in case vp.vvtype of {
|
||||||
True => vps ++ vp.ad ++ vp.comp ! agr ++ vp.obj ++ vp.vComp ! agr ! VVPres ++ vp.embComp ;
|
NoVV => vp.ad ++ vp.comp ! agr ++ vp.obj ++ vp.vComp ! agr ! VVPres ++ vps ++ vp.embComp ;
|
||||||
False => vp.ad ++ vp.comp ! agr ++ vp.obj ++ vp.vComp ! agr ! VVPres ++ vps ++ vp.embComp }
|
_ => vps ++ vp.ad ++ vp.comp ! agr ++ vp.obj ++ vp.vComp ! agr ! VVPres ++ vp.embComp }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
SlashVP np vp =
|
SlashVP np vp =
|
||||||
|
|||||||
Reference in New Issue
Block a user