From 8ad7c589891880be359332d3e54da165f34b5ca6 Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Wed, 30 May 2018 22:27:36 +0200 Subject: [PATCH] like English, Bulgarian also needs a isSimple flag in VP to correctly place the adjectivial participles --- src/bulgarian/CatBul.gf | 3 ++- src/bulgarian/ExtendBul.gf | 4 ++-- src/bulgarian/IdiomBul.gf | 3 ++- src/bulgarian/ResBul.gf | 21 ++++++++++++++------- src/bulgarian/SentenceBul.gf | 3 ++- src/bulgarian/VerbBul.gf | 22 ++++++++++++++-------- 6 files changed, 36 insertions(+), 20 deletions(-) diff --git a/src/bulgarian/CatBul.gf b/src/bulgarian/CatBul.gf index 0304cb282..ca8435d71 100644 --- a/src/bulgarian/CatBul.gf +++ b/src/bulgarian/CatBul.gf @@ -117,7 +117,8 @@ concrete CatBul of Cat = CommonX - [IAdv,CAdv,SC] ** open ResBul, Prelude, Prede ad = vps.ad ; compl = \\a => vps.compl1 ! a ++ vps.c2.s ++ vps.compl2 ! a ; vtype = vps.vtype ; - p = Pos + p = Pos ; + isSimple = vps.isSimple } in linrefVP vp; diff --git a/src/bulgarian/ExtendBul.gf b/src/bulgarian/ExtendBul.gf index a54f9d4d6..003047a7f 100644 --- a/src/bulgarian/ExtendBul.gf +++ b/src/bulgarian/ExtendBul.gf @@ -30,7 +30,7 @@ lin _ => [] } ++ vp.compl ! {gn=aform2gennum aform; p=p} ; - in {s = ap; adv = ap ! (ASg Neut Indef) ! P3; isPre = True} ; + in {s = ap; adv = ap ! (ASg Neut Indef) ! P3; isPre = vp.isSimple} ; PastPartAP vp = let ap : AForm => Person => Str @@ -38,7 +38,7 @@ lin vp.s ! Perf ! VPassive aform ++ vp.compl1 ! {gn=aform2gennum aform; p=p} ++ vp.compl2 ! {gn=aform2gennum aform; p=p} - in {s = ap; adv = ap ! ASg Neut Indef ! P3; isPre = True} ; + in {s = ap; adv = ap ! ASg Neut Indef ! P3; isPre = vp.isSimple} ; PastPartAgentAP vp np = let ap : AForm => Person => Str diff --git a/src/bulgarian/IdiomBul.gf b/src/bulgarian/IdiomBul.gf index bc0e0747d..fe6ec9474 100644 --- a/src/bulgarian/IdiomBul.gf +++ b/src/bulgarian/IdiomBul.gf @@ -60,7 +60,8 @@ concrete IdiomBul of Idiom = CatBul ** open Prelude, ParadigmsBul, ResBul in { ad = vp.ad ; compl = vp.compl ; vtype = vp.vtype ; - p = vp.p + p = vp.p ; + isSimple = False } ; ImpPl1 vp = {s = "нека" ++ daComplex Simul Pos vp ! Perf ! {gn = GPl ; p = P1}} ; diff --git a/src/bulgarian/ResBul.gf b/src/bulgarian/ResBul.gf index 9b5a6145b..9000c7ae2 100644 --- a/src/bulgarian/ResBul.gf +++ b/src/bulgarian/ResBul.gf @@ -227,9 +227,10 @@ resource ResBul = ParamX ** open Prelude, Predef in { ad : {isEmpty : Bool; s : Str} ; -- sentential adverb compl : Agr => Str ; vtype : VType ; - p : Polarity + p : Polarity ; + isSimple : Bool -- regulates the place of participle used as adjective } ; - + VPSlash = { s : Aspect => VTable ; ad : {isEmpty : Bool; s : Str} ; -- sentential adverb @@ -237,7 +238,8 @@ resource ResBul = ParamX ** open Prelude, Predef in { compl2 : Agr => Str ; vtype : VType ; p : Polarity ; - c2 : Preposition + c2 : Preposition ; + isSimple : Bool -- regulates the place of participle used as adjective } ; predV : Verb -> VP = \verb -> { @@ -245,7 +247,8 @@ resource ResBul = ParamX ** open Prelude, Predef in { ad = {isEmpty=True; s=[]} ; compl = \\_ => [] ; vtype = verb.vtype ; - p = Pos + p = Pos ; + isSimple = True } ; slashV : Verb -> Preposition -> VPSlash = \verb,prep -> { @@ -256,6 +259,7 @@ resource ResBul = ParamX ** open Prelude, Predef in { vtype = verb.vtype ; p = Pos ; c2 = prep ; + isSimple = True } ; insertObj : (Agr => Str) -> Polarity -> VP -> VP = \obj,p,vp -> { @@ -266,7 +270,8 @@ resource ResBul = ParamX ** open Prelude, Predef in { p = case p of { Neg => Neg; _ => vp.p - } + } ; + isSimple = False } ; insertSlashObj1 : (Agr => Str) -> Polarity -> VPSlash -> VPSlash = \obj,p,slash -> { @@ -279,7 +284,8 @@ resource ResBul = ParamX ** open Prelude, Predef in { Neg => Neg ; Pos => slash.p } ; - c2 = slash.c2 + c2 = slash.c2 ; + isSimple = False } ; insertSlashObj2 : (Agr => Str) -> Polarity -> VPSlash -> VPSlash = \obj,p,slash -> { @@ -292,7 +298,8 @@ resource ResBul = ParamX ** open Prelude, Predef in { Neg => Neg ; Pos => slash.p } ; - c2 = slash.c2 + c2 = slash.c2 ; + isSimple = False } ; auxBe : VTable = diff --git a/src/bulgarian/SentenceBul.gf b/src/bulgarian/SentenceBul.gf index d7f2a67b0..8af4a7914 100644 --- a/src/bulgarian/SentenceBul.gf +++ b/src/bulgarian/SentenceBul.gf @@ -32,7 +32,8 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in { ad = slash.ad ; compl = \\_ => slash.compl1 ! np.a ++ slash.compl2 ! agr ; vtype = slash.vtype ; - p = Pos}).s ; + p = Pos ; + isSimple = slash.isSimple}).s ; c2 = slash.c2 } ; diff --git a/src/bulgarian/VerbBul.gf b/src/bulgarian/VerbBul.gf index 5cb8ba190..5df51281a 100644 --- a/src/bulgarian/VerbBul.gf +++ b/src/bulgarian/VerbBul.gf @@ -47,11 +47,12 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in { SlashVV vv slash = { s = vv.s ; ad = {isEmpty=True; s=[]}; - compl1 = daComplex Simul Pos {s=slash.s; ad=slash.ad; compl=slash.compl1; vtype=slash.vtype; p = Pos} ! Perf ; + compl1 = daComplex Simul Pos {s=slash.s; ad=slash.ad; compl=slash.compl1; vtype=slash.vtype; p = Pos; isSimple = slash.isSimple} ! Perf ; compl2 = slash.compl2 ; vtype = vv.vtype ; p = slash.p ; - c2 = slash.c2 + c2 = slash.c2 ; + isSimple = False } ; -- test: I saw a car whom she begged me to buy @@ -59,11 +60,12 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in { s = vv.s ; ad = {isEmpty=True; s=[]}; compl1 = \\agr => vv.c2.s ++ np.s ! RObj vv.c2.c ++ - daComplex Simul np.p {s=slash.s; ad=slash.ad; compl=slash.compl1; vtype=slash.vtype; p=Pos} ! Perf ! np.a ; + daComplex Simul np.p {s=slash.s; ad=slash.ad; compl=slash.compl1; vtype=slash.vtype; p=Pos; isSimple = slash.isSimple} ! Perf ! np.a ; compl2 = slash.compl2 ; vtype = vv.vtype ; p = Pos ; - c2 = slash.c2 + c2 = slash.c2 ; + isSimple = False } ; ComplSlash slash np = { @@ -71,7 +73,8 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in { ad = slash.ad ; compl = \\a => slash.compl1 ! a ++ slash.c2.s ++ np.s ! RObj slash.c2.c ++ slash.compl2 ! np.a ; vtype = slash.vtype ; - p = orPol np.p slash.p + p = orPol np.p slash.p ; + isSimple = False } ; UseComp comp = insertObj comp.s comp.p (predV verbBe) ; @@ -88,7 +91,8 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in { ad = {isEmpty=False; s=vp.ad.s ++ adv.s} ; compl = vp.compl ; vtype = vp.vtype ; - p = vp.p + p = vp.p ; + isSimple = vp.isSimple } ; AdVVPSlash adv vp = { s = vp.s ; @@ -97,7 +101,8 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in { compl2 = vp.compl2 ; vtype = vp.vtype ; p = vp.p ; - c2 = vp.c2 + c2 = vp.c2 ; + isSimple = vp.isSimple } ; ReflVP slash = { @@ -105,7 +110,8 @@ concrete VerbBul of Verb = CatBul ** open Prelude, ResBul, ParadigmsBul in { ad = slash.ad ; compl = \\agr => slash.compl1 ! agr ++ slash.compl2 ! agr ; vtype = VMedial slash.c2.c ; - p = slash.p + p = slash.p ; + isSimple = slash.isSimple } ; PassV2 v = insertObj (\\a => v.s ! Perf ! VPassive (aform a.gn Indef (RObj Acc))) Pos (predV verbBe) ;