mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
(Kor) Use obj in imp, overriding V2's subject case
This commit is contained in:
@@ -108,6 +108,9 @@ param
|
|||||||
| Imperative
|
| Imperative
|
||||||
| Propositive ;
|
| Propositive ;
|
||||||
|
|
||||||
|
ObjectForm = -- sometimes need to override V2's object case for Imp
|
||||||
|
DeclObj
|
||||||
|
| ImpObj ;
|
||||||
|
|
||||||
-- TODO: include Aspect and SentenceType.
|
-- TODO: include Aspect and SentenceType.
|
||||||
-- These are all Generic and Declarative.
|
-- These are all Generic and Declarative.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ lin
|
|||||||
-- : RP -> VP -> RCl ;
|
-- : RP -> VP -> RCl ;
|
||||||
RelVP rp vp = vp ** { -- TODO no tenses yet in the grammar
|
RelVP rp vp = vp ** { -- TODO no tenses yet in the grammar
|
||||||
s = \\t,a,p,cltyp =>
|
s = \\t,a,p,cltyp =>
|
||||||
rp.s ++ vp.adv ++ vp.nObj ++
|
rp.s ++ vp.adv ++ vp.nObj ! DeclObj ++
|
||||||
case cltyp of {
|
case cltyp of {
|
||||||
WithConj => vp.s ! VStem p ;
|
WithConj => vp.s ! VStem p ;
|
||||||
_ => vp.s ! VAttr p } ;
|
_ => vp.s ! VAttr p } ;
|
||||||
|
|||||||
@@ -320,17 +320,14 @@ oper
|
|||||||
|
|
||||||
BaseVP : Type = {
|
BaseVP : Type = {
|
||||||
adv,
|
adv,
|
||||||
nObj,
|
vComp : Str ;
|
||||||
vComp : Str
|
nObj : ObjectForm => Str ; -- may need diff form for imperative vs. declarative sentences
|
||||||
-- {subjunc : Str ; -- inflected verb complement
|
|
||||||
-- inf : Str ; -- infinitive verb complement
|
|
||||||
-- subcl : Str} -- clause complement
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
baseVP : BaseVP = {
|
baseVP : BaseVP = {
|
||||||
adv,
|
adv,
|
||||||
nObj,
|
|
||||||
vComp = [] ;
|
vComp = [] ;
|
||||||
|
nObj = \\_ => []
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
VerbPhrase : Type = BaseVerb ** Complement ** BaseVP ;
|
VerbPhrase : Type = BaseVerb ** Complement ** BaseVP ;
|
||||||
@@ -342,7 +339,9 @@ oper
|
|||||||
useVc : Verb2 -> VPSlash = \v2 -> baseVP ** v2 ;
|
useVc : Verb2 -> VPSlash = \v2 -> baseVP ** v2 ;
|
||||||
|
|
||||||
insertComp : VPSlash -> NounPhrase -> VerbPhrase = \v2,np -> useV v2 ** {
|
insertComp : VPSlash -> NounPhrase -> VerbPhrase = \v2,np -> useV v2 ** {
|
||||||
nObj = np.s ! v2.c2 ++ v2.p2.s ! np.p
|
nObj = table {
|
||||||
|
DeclObj => np.s ! v2.c2 ++ v2.p2.s ! np.p ;
|
||||||
|
ImpObj => np.s ! Object ++ v2.p2.s ! np.p } -- use 을/를 always for imperative
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertAdv : VerbPhrase -> SS -> VerbPhrase = \vp,adv -> vp ** {adv = adv.s ++ vp.adv} ;
|
insertAdv : VerbPhrase -> SS -> VerbPhrase = \vp,adv -> vp ** {adv = adv.s ++ vp.adv} ;
|
||||||
@@ -378,7 +377,7 @@ oper
|
|||||||
WithConj => VStem p ;
|
WithConj => VStem p ;
|
||||||
Statement st => VF st p } -- TODO: more tenses
|
Statement st => VF st p } -- TODO: more tenses
|
||||||
in np
|
in np
|
||||||
++ vp.nObj -- an object, not copula complement
|
++ vp.nObj ! DeclObj -- an object, not copula complement
|
||||||
++ vp.adv
|
++ vp.adv
|
||||||
++ vp.s ! vf
|
++ vp.s ! vf
|
||||||
} ;
|
} ;
|
||||||
@@ -387,6 +386,11 @@ oper
|
|||||||
-- linrefs
|
-- linrefs
|
||||||
|
|
||||||
linVerb : Verb -> Str = \v -> v.s ! linVF ;
|
linVerb : Verb -> Str = \v -> v.s ! linVF ;
|
||||||
linVP : VForm -> VerbPhrase -> Str = \vf,vp -> vp.nObj ++ vp.adv ++ vp.s ! vf ;
|
linVP : VForm -> VerbPhrase -> Str = \vf,vp -> vp.nObj ! DeclObj ++ vp.adv ++ vp.s ! vf ;
|
||||||
|
linImp : Polarity -> VerbPhrase -> Str = \pol,vp ->
|
||||||
|
let vf : VForm = case pol of {
|
||||||
|
Pos => VF Polite Pos ;
|
||||||
|
Neg => VImpNeg }
|
||||||
|
in vp.nObj ! ImpObj ++ vp.adv ++ vp.s ! vf ;
|
||||||
linAP : AdjPhrase -> Str = \ap -> ap.compar ++ ap.s ! linVF ;
|
linAP : AdjPhrase -> Str = \ap -> ap.compar ++ ap.s ! linVF ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ lin
|
|||||||
-}
|
-}
|
||||||
--2 Imperatives
|
--2 Imperatives
|
||||||
-- : VP -> Imp ;
|
-- : VP -> Imp ;
|
||||||
ImpVP vp = {s = \\pol => linVP (VF Polite pol) vp} ;
|
ImpVP vp = {s = \\pol => linImp pol vp} ;
|
||||||
|
|
||||||
--2 Embedded sentences
|
--2 Embedded sentences
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user