mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-28 09:28:54 -06:00
fixed duplication of de in RelativeChi
This commit is contained in:
@@ -28,7 +28,7 @@ concrete CatChi of Cat = CommonX - [Tense, Temp, Ant, Adv] ** open ResChi, Prelu
|
|||||||
-- Relative
|
-- Relative
|
||||||
|
|
||||||
RCl = {s : Polarity => Aspect => Str} ;
|
RCl = {s : Polarity => Aspect => Str} ;
|
||||||
RP = {s : Str} ;
|
RP = {s : Bool => Str} ; -- True = applied to adjectival VP's hence "de" is not repeated
|
||||||
|
|
||||||
-- Verb
|
-- Verb
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ concrete ExtraChi of ExtraChiAbs = CatChi **
|
|||||||
|
|
||||||
GenNP np = {s,pl = np.s ++ possessive_s ; detType = DTPoss} ;
|
GenNP np = {s,pl = np.s ++ possessive_s ; detType = DTPoss} ;
|
||||||
|
|
||||||
GenRP nu cn = {s = cn.s ++ relative_s} ; ---- ??
|
GenRP nu cn = {s = \\_ => cn.s ++ relative_s} ; ---- ??
|
||||||
|
|
||||||
|
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ concrete IdiomChi of Idiom = CatChi ** open Prelude, ResChi in {
|
|||||||
ProgrVP vp = {
|
ProgrVP vp = {
|
||||||
verb = regVerb zai_s ;
|
verb = regVerb zai_s ;
|
||||||
compl = vp.prePart ++ vp.verb.s ++ vp.compl ;
|
compl = vp.prePart ++ vp.verb.s ++ vp.compl ;
|
||||||
prePart, topic = []
|
prePart, topic = [] ;
|
||||||
|
isAdj = False ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ oper
|
|||||||
mkPConj : Str -> PConj
|
mkPConj : Str -> PConj
|
||||||
= \s -> lin PConj {s = word s} ;
|
= \s -> lin PConj {s = word s} ;
|
||||||
mkRP : Str -> RP
|
mkRP : Str -> RP
|
||||||
= \s -> lin RP {s = word s} ;
|
= \s -> lin RP {s = table {True => [] ; False => word s}} ;
|
||||||
|
|
||||||
|
|
||||||
--. auxiliary
|
--. auxiliary
|
||||||
|
|||||||
@@ -3,10 +3,13 @@ concrete RelativeChi of Relative = CatChi ** open ResChi, Prelude in {
|
|||||||
lin
|
lin
|
||||||
RelCl cl = {s = \\p,a => cl.s ! p ! a ++ relative_s} ; ---- ??
|
RelCl cl = {s = \\p,a => cl.s ! p ! a ++ relative_s} ; ---- ??
|
||||||
RelVP rp vp = {
|
RelVP rp vp = {
|
||||||
s = \\p,a => vp.prePart ++ useVerb vp.verb ! p ! a ++ vp.compl ++ rp.s
|
s = \\p,a => case vp.isAdj of {
|
||||||
|
True => vp.prePart ++ vp.compl ++ rp.s ! True ; ---- FunRP also ?
|
||||||
|
_ => vp.prePart ++ useVerb vp.verb ! p ! a ++ vp.compl ++ rp.s ! False
|
||||||
|
} ;
|
||||||
} ; ---- ??
|
} ; ---- ??
|
||||||
RelSlash rp slash = {s = \\p,a => slash.s ! p ! a ++ appPrep slash.c2 rp.s} ;
|
RelSlash rp slash = {s = \\p,a => slash.s ! p ! a ++ appPrep slash.c2 (rp.s ! False)} ;
|
||||||
FunRP p np rp = ss (appPrep p np.s ++ rp.s) ; ---- ??
|
FunRP p np rp = {s = \\a => appPrep p np.s ++ rp.s ! a} ; ---- ??
|
||||||
IdRP = ss relative_s ;
|
IdRP = {s = table {True => [] ; False => relative_s}} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,7 +104,8 @@ oper
|
|||||||
topic : Str ; -- topicalized item, before subject
|
topic : Str ; -- topicalized item, before subject
|
||||||
prePart : Str ; -- between subject and verb
|
prePart : Str ; -- between subject and verb
|
||||||
verb : Verb ;
|
verb : Verb ;
|
||||||
compl : Str -- after verb
|
compl : Str ; -- after verb
|
||||||
|
isAdj : Bool ; -- whether it is an adjectival predication and behaves differently in relative
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
NP = {s : Str} ;
|
NP = {s : Str} ;
|
||||||
@@ -167,47 +168,30 @@ oper
|
|||||||
verb = v ;
|
verb = v ;
|
||||||
compl = part ;
|
compl = part ;
|
||||||
prePart, topic = [] ;
|
prePart, topic = [] ;
|
||||||
|
isAdj = False ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertObj : NP -> VP -> VP = \np,vp -> {
|
insertObj : NP -> VP -> VP = \np,vp -> vp ** {
|
||||||
verb = vp.verb ;
|
|
||||||
compl = np.s ++ vp.compl ;
|
compl = np.s ++ vp.compl ;
|
||||||
prePart = vp.prePart ;
|
|
||||||
topic = vp.topic
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertObjPost : NP -> VP -> VP = \np,vp -> {
|
insertObjPost : NP -> VP -> VP = \np,vp -> vp ** {
|
||||||
verb = vp.verb ;
|
|
||||||
compl = vp.compl ++ np.s ;
|
compl = vp.compl ++ np.s ;
|
||||||
prePart = vp.prePart ;
|
|
||||||
topic = vp.topic
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertAdv : SS -> VP -> VP = \adv,vp -> {
|
insertAdv : SS -> VP -> VP = \adv,vp -> vp ** {
|
||||||
verb = vp.verb ;
|
|
||||||
compl = vp.compl ;
|
|
||||||
prePart = adv.s ++ vp.prePart ;
|
prePart = adv.s ++ vp.prePart ;
|
||||||
topic = vp.topic
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertTopic : SS -> VP -> VP = \adv,vp -> {
|
insertTopic : SS -> VP -> VP = \adv,vp -> vp ** {
|
||||||
verb = vp.verb ;
|
|
||||||
compl = vp.compl ;
|
|
||||||
prePart = vp.prePart ;
|
|
||||||
topic = adv.s ++ vp.topic
|
topic = adv.s ++ vp.topic
|
||||||
} ;
|
} ;
|
||||||
insertAdvPost : SS -> VP -> VP = \adv,vp -> {
|
insertAdvPost : SS -> VP -> VP = \adv,vp -> vp ** {
|
||||||
verb = vp.verb ;
|
|
||||||
compl = vp.compl ;
|
|
||||||
prePart = vp.prePart ++ adv.s ;
|
prePart = vp.prePart ++ adv.s ;
|
||||||
topic = vp.topic
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertPP : SS -> VP -> VP = \pp,vp -> {
|
insertPP : SS -> VP -> VP = \pp,vp -> vp ** {
|
||||||
verb = vp.verb ;
|
|
||||||
compl = vp.compl ;
|
|
||||||
prePart = vp.prePart ++ pp.s ;
|
prePart = vp.prePart ++ pp.s ;
|
||||||
topic = vp.topic
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertExtra : SS -> VP -> VP = \ext,vp ->
|
insertExtra : SS -> VP -> VP = \ext,vp ->
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ concrete VerbChi of Verb = CatChi ** open ResChi, Prelude in {
|
|||||||
ComplVV v vp = {
|
ComplVV v vp = {
|
||||||
verb = v ;
|
verb = v ;
|
||||||
compl = vp.prePart ++ vp.verb.s ++ vp.compl ;
|
compl = vp.prePart ++ vp.verb.s ++ vp.compl ;
|
||||||
prePart, topic = []
|
prePart, topic = [] ;
|
||||||
|
isAdj = False ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
ComplVS v s = insertObj s (predV v []) ;
|
ComplVS v s = insertObj s (predV v []) ;
|
||||||
@@ -61,7 +62,7 @@ concrete VerbChi of Verb = CatChi ** open ResChi, Prelude in {
|
|||||||
|
|
||||||
PassV2 v = insertAdv (mkNP passive_s) (predV v v.part) ; ----
|
PassV2 v = insertAdv (mkNP passive_s) (predV v v.part) ; ----
|
||||||
|
|
||||||
CompAP ap = insertObj (mkNP (ap.s ++ de_s)) (predV copula []) ;
|
CompAP ap = insertObj (mkNP (ap.s ++ de_s)) (predV copula []) ** {isAdj = True} ;
|
||||||
|
|
||||||
{-
|
{-
|
||||||
CompAP ap = case ap.hasAdA of {
|
CompAP ap = case ap.hasAdA of {
|
||||||
|
|||||||
Reference in New Issue
Block a user