From 87401fcc4d2f0b7c7576eec73b035eb9c531cac9 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Thu, 21 Jun 2012 09:00:21 +0000 Subject: [PATCH] added few missing functions in the Bulgarian RGL --- lib/src/bulgarian/ExtraBul.gf | 25 +++++++++++++++++++++++++ lib/src/bulgarian/ParseEngBul.gf | 16 ++++++++++++++++ lib/src/bulgarian/SentenceBul.gf | 2 ++ 3 files changed, 43 insertions(+) diff --git a/lib/src/bulgarian/ExtraBul.gf b/lib/src/bulgarian/ExtraBul.gf index 9ba0328b3..3d66955fa 100644 --- a/lib/src/bulgarian/ExtraBul.gf +++ b/lib/src/bulgarian/ExtraBul.gf @@ -67,4 +67,29 @@ concrete ExtraBul of ExtraBulAbs = CatBul ** ASgMascDefNom => ASg Masc Indef ; APl _ => APl Indef } ; + + lincat + VPS = {s : Agr => Str} ; + [VPS] = {s : Bool => Bool => Agr => Str} ; + + lin + BaseVPS x y = {s = \\d,t,a=>x.s!a++linCoord!t++y.s!a} ; + ConsVPS x xs = {s = \\d,t,a=>x.s!a++(linCoordSep comma)!d!t++xs.s!d!t!a} ; + + PredVPS np vps = {s = np.s ! RSubj ++ vps.s ! np.a} ; + + MkVPS t p vp = { + s = \\a => + let verb = vpTenses vp ! t.t ! t.a ! p.p ! a ! False ! Perf ; + compl = vp.compl ! a + in t.s ++ p.s ++ verb ++ compl + } ; + + ConjVPS conj vps = { + s = \\a => (linCoordSep [])!conj.distr!conj.conj++vps.s!conj.distr!conj.conj!a; + } ; + + PassVPSlash vp = insertObj (\\a => vp.s ! Perf ! VPassive (aform a.gn Indef (RObj Acc)) ++ + vp.compl1 ! a ++ vp.compl2 ! a) (predV verbBe) ; + } diff --git a/lib/src/bulgarian/ParseEngBul.gf b/lib/src/bulgarian/ParseEngBul.gf index 5e133b86d..3e8d71094 100644 --- a/lib/src/bulgarian/ParseEngBul.gf +++ b/lib/src/bulgarian/ParseEngBul.gf @@ -42,6 +42,12 @@ lin isPre = True } ; + PositAdVAdj a = {s = a.adv} ; + + that_RP = { + s = whichRP + } ; + UseQuantPN q pn = { s = table { RObj Dat => "на" ++ pn.s; _ => pn.s @@ -49,4 +55,14 @@ lin a = {gn = GSg pn.g; p = P3} } ; + PPartNP np vps = { + s = \\c => np.s ! c ++ + vps.s ! Perf ! VPassive (aform np.a.gn Indef c) ++ + vps.compl1 ! np.a ++ vps.compl2 ! np.a; + a = np.a + } ; + + SlashV2V vv p vp = + insertSlashObj2 (daComplex vp ! Perf) (slashV vv vv.c2) ; + } diff --git a/lib/src/bulgarian/SentenceBul.gf b/lib/src/bulgarian/SentenceBul.gf index 1b08b7bb0..26c33a0af 100644 --- a/lib/src/bulgarian/SentenceBul.gf +++ b/lib/src/bulgarian/SentenceBul.gf @@ -69,5 +69,7 @@ concrete SentenceBul of Sentence = CatBul ** open Prelude, ResBul in { ExtAdvS a s = {s = a.s ++ "," ++ s.s} ; AdvS a s = {s = a.s ++ s.s} ; + SSubjS a s b = {s = a.s ++ "," ++ s.s ++ b.s} ; + RelS s r = {s = s.s ++ "," ++ r.s ! {gn=gennum ANeut Sg; p=P3}} ; }