forked from GitHub/gf-rgl
(Kor) Use obj in imp, overriding V2's subject case
This commit is contained in:
@@ -108,6 +108,9 @@ param
|
||||
| Imperative
|
||||
| Propositive ;
|
||||
|
||||
ObjectForm = -- sometimes need to override V2's object case for Imp
|
||||
DeclObj
|
||||
| ImpObj ;
|
||||
|
||||
-- TODO: include Aspect and SentenceType.
|
||||
-- These are all Generic and Declarative.
|
||||
|
||||
@@ -8,7 +8,7 @@ lin
|
||||
-- : RP -> VP -> RCl ;
|
||||
RelVP rp vp = vp ** { -- TODO no tenses yet in the grammar
|
||||
s = \\t,a,p,cltyp =>
|
||||
rp.s ++ vp.adv ++ vp.nObj ++
|
||||
rp.s ++ vp.adv ++ vp.nObj ! DeclObj ++
|
||||
case cltyp of {
|
||||
WithConj => vp.s ! VStem p ;
|
||||
_ => vp.s ! VAttr p } ;
|
||||
|
||||
@@ -320,17 +320,14 @@ oper
|
||||
|
||||
BaseVP : Type = {
|
||||
adv,
|
||||
nObj,
|
||||
vComp : Str
|
||||
-- {subjunc : Str ; -- inflected verb complement
|
||||
-- inf : Str ; -- infinitive verb complement
|
||||
-- subcl : Str} -- clause complement
|
||||
vComp : Str ;
|
||||
nObj : ObjectForm => Str ; -- may need diff form for imperative vs. declarative sentences
|
||||
} ;
|
||||
|
||||
baseVP : BaseVP = {
|
||||
adv,
|
||||
nObj,
|
||||
vComp = [] ;
|
||||
nObj = \\_ => []
|
||||
} ;
|
||||
|
||||
VerbPhrase : Type = BaseVerb ** Complement ** BaseVP ;
|
||||
@@ -342,7 +339,9 @@ oper
|
||||
useVc : Verb2 -> VPSlash = \v2 -> baseVP ** 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} ;
|
||||
@@ -378,7 +377,7 @@ oper
|
||||
WithConj => VStem p ;
|
||||
Statement st => VF st p } -- TODO: more tenses
|
||||
in np
|
||||
++ vp.nObj -- an object, not copula complement
|
||||
++ vp.nObj ! DeclObj -- an object, not copula complement
|
||||
++ vp.adv
|
||||
++ vp.s ! vf
|
||||
} ;
|
||||
@@ -387,6 +386,11 @@ oper
|
||||
-- linrefs
|
||||
|
||||
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 ;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ lin
|
||||
-}
|
||||
--2 Imperatives
|
||||
-- : VP -> Imp ;
|
||||
ImpVP vp = {s = \\pol => linVP (VF Polite pol) vp} ;
|
||||
ImpVP vp = {s = \\pol => linImp pol vp} ;
|
||||
|
||||
--2 Embedded sentences
|
||||
|
||||
|
||||
Reference in New Issue
Block a user