1
0
forked from GitHub/gf-rgl

fixed duplication of de in RelativeChi

This commit is contained in:
Aarne Ranta
2018-05-16 10:24:02 +02:00
parent 9544bd8e6b
commit c50360078f
7 changed files with 24 additions and 35 deletions

View File

@@ -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

View File

@@ -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} ; ---- ??
----------------------- -----------------------

View File

@@ -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 ;
} ; } ;

View File

@@ -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

View File

@@ -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}} ;
} }

View File

@@ -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 ->

View File

@@ -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 {