diff --git a/lib/resource-1.4/bulgarian/CatBul.gf b/lib/resource-1.4/bulgarian/CatBul.gf index 0ba7ee07e..03068c894 100644 --- a/lib/resource-1.4/bulgarian/CatBul.gf +++ b/lib/resource-1.4/bulgarian/CatBul.gf @@ -96,7 +96,7 @@ concrete CatBul of Cat = open ResBul, Prelude, (R = ParamX) in { -- Structural - Conj = {s1,s2 : Str ; n : Number} ; + Conj = {s : Str; distr : Bool; conj : Bool; n : Number} ; Subj = {s : Str} ; Prep = {s : Str; c : Case} ; diff --git a/lib/resource-1.4/bulgarian/ConjunctionBul.gf b/lib/resource-1.4/bulgarian/ConjunctionBul.gf index 028e3270c..8669e8dfd 100644 --- a/lib/resource-1.4/bulgarian/ConjunctionBul.gf +++ b/lib/resource-1.4/bulgarian/ConjunctionBul.gf @@ -4,46 +4,51 @@ concrete ConjunctionBul of Conjunction = flags optimize=all_subs ; lin + ConjS conj ss = { + s = (linCoordSep [])!conj.distr!conj.conj++ss.s!conj.distr!conj.conj; + } ; - ConjS = conjunctDistrSS ; + ConjAdv conj ss = { + s = (linCoordSep [])!conj.distr!conj.conj++ss.s!conj.distr!conj.conj; + } ; - ConjAdv = conjunctDistrSS ; - - ConjNP conj ss = conjunctDistrTable Role conj ss ** { + ConjNP conj ss = { + s = \\role => (linCoordSep [])!conj.distr!conj.conj++ss.s!conj.distr!conj.conj!role; a = {gn = conjGenNum (gennum DMasc conj.n) ss.a.gn; p = ss.a.p} } ; ConjAP conj ss = { - s = \\aform => conj.s1++ ss.s1.s ! aform ++ conj.s2 ++ ss.s2.s ! aform; - adv = conj.s1++ ss.s1.adv ++ conj.s2 ++ ss.s2.adv; + s = \\aform => (linCoordSep [])!conj.distr!conj.conj++ss.s!conj.distr!conj.conj!aform; + adv = (linCoordSep [])!conj.distr!conj.conj++ss.adv!conj.distr!conj.conj; isPre = ss.isPre } ; -- These fun's are generated from the list cat's. + BaseS x y = {s = \\d,t=>x.s++linCoord!t++ y.s} ; + ConsS x xs = {s = \\d,t=>x.s++(linCoordSep comma)!d!t++xs.s!d!t} ; - BaseS = twoSS ; - ConsS = consrSS comma ; + BaseAdv x y = {s = \\d,t=>x.s++linCoord!t++ y.s} ; + ConsAdv x xs = {s = \\d,t=>x.s++(linCoordSep comma)!d!t++xs.s!d!t} ; - BaseAdv = twoSS ; - ConsAdv = consrSS comma ; - - BaseNP x y = twoTable Role x y ** {a = conjAgr x.a y.a} ; - ConsNP xs x = consrTable Role comma xs x ** {a = conjAgr xs.a x.a} ; + BaseNP x y = + {s = \\d,t,role=>x.s!role++linCoord!t++y.s!role; + a = conjAgr x.a y.a} ; + ConsNP x xs = + {s = \\d,t,role=>x.s!role++(linCoordSep comma)!d!t++xs.s!d!t!role; + a = conjAgr xs.a x.a} ; BaseAP x y = - {s1 = {s=x.s; adv=x.adv}; - s2 = {s=y.s; adv=y.adv}; + {s = \\d,t,aform=>x.s!aform++linCoord!t++y.s!aform; + adv= \\d,t =>x.adv ++linCoord!t++y.adv; isPre = andB x.isPre y.isPre} ; - ConsAP x xs = - {s1 = {s = \\aform => x.s ! aform ++ comma ++ xs.s1.s ! aform; - adv = x.adv ++ comma ++ xs.s1.adv}; - s2 = xs.s2; + {s = \\d,t,aform=>x.s!aform++(linCoordSep comma)!d!t++xs.s!d!t!aform; + adv= \\d,t =>x.adv ++(linCoordSep comma)!d!t++xs.adv!d!t; isPre = andB x.isPre xs.isPre} ; lincat - [S] = {s1,s2 : Str} ; - [Adv] = {s1,s2 : Str} ; - [NP] = {s1,s2 : Role => Str ; a : Agr} ; - [AP] = {s1,s2 : {s : AForm => Str; adv : Str}; isPre : Bool} ; + [S] = {s : Bool => Bool => Str} ; + [Adv] = {s : Bool => Bool => Str} ; + [NP] = {s : Bool => Bool => Role => Str; a : Agr} ; + [AP] = {s : Bool => Bool => AForm => Str; adv : Bool => Bool => Str; isPre : Bool} ; } diff --git a/lib/resource-1.4/bulgarian/PhraseBul.gf b/lib/resource-1.4/bulgarian/PhraseBul.gf index 0dd9e283a..11c6a61f0 100644 --- a/lib/resource-1.4/bulgarian/PhraseBul.gf +++ b/lib/resource-1.4/bulgarian/PhraseBul.gf @@ -19,7 +19,7 @@ concrete PhraseBul of Phrase = CatBul ** open Prelude, ResBul in { UttAdv adv = adv ; NoPConj = {s = []} ; - PConjConj conj = {s = conj.s2} ; ---- AR + PConjConj conj = {s = conj.s ++ linCoord!conj.conj} ; NoVoc = {s = []} ; VocNP np = {s = "," ++ np.s ! RVoc} ; diff --git a/lib/resource-1.4/bulgarian/ResBul.gf b/lib/resource-1.4/bulgarian/ResBul.gf index 00da5227c..1f99ea381 100644 --- a/lib/resource-1.4/bulgarian/ResBul.gf +++ b/lib/resource-1.4/bulgarian/ResBul.gf @@ -578,4 +578,10 @@ resource ResBul = ParamX ** open Prelude in { GSg Neut => "това" ; GPl => "тези" } ; + + linCoord : Bool => Str ; + linCoord = table {True => "и"; False=>"или"} ; + + linCoordSep : Str -> Bool => Bool => Str ; + linCoordSep s = table {True => linCoord; False=> \\_ => s} ; } diff --git a/lib/resource-1.4/bulgarian/StructuralBul.gf b/lib/resource-1.4/bulgarian/StructuralBul.gf index ea6156873..acb461bde 100644 --- a/lib/resource-1.4/bulgarian/StructuralBul.gf +++ b/lib/resource-1.4/bulgarian/StructuralBul.gf @@ -10,18 +10,18 @@ concrete StructuralBul of Structural = CatBul ** almost_AdA, almost_AdN = ss "почти" ; although_Subj = ss ["въпреки че"] ; always_AdV = ss "винаги" ; - and_Conj = {s1 = [] ; s2 = "и" ; n = Pl} ; + and_Conj = {s=[]; conj=True; distr=False; n = Pl} ; because_Subj = ss "защото" ; before_Prep = mkPrep "преди" Acc ; behind_Prep = mkPrep "зад" Acc ; between_Prep = mkPrep "между" Acc ; - both7and_DConj = sd2 "и" "и" ** {n = Pl} ; + both7and_DConj = {s=[]; conj=True; distr=True; n = Pl} ; but_PConj = ss "но" ; by8agent_Prep = mkPrep "чрез" Acc ; by8means_Prep = mkPrep "чрез" Acc ; can8know_VV, can_VV = mkVV (stateV (mkV166 "мога")) ; during_Prep = mkPrep ["по време на"] Acc ; - either7or_DConj = sd2 "или" "или" ** {n = Sg} ; + either7or_DConj = {s=[]; conj=False; distr=True; n = Sg} ; everybody_NP = mkNP "всеки" (GSg Masc) P3 ; every_Det = mkDeterminerSg "всеки" "всяка" "всяко"; everything_NP = mkNP "всичко" (GSg Neut) P3 ; @@ -69,7 +69,7 @@ concrete StructuralBul of Structural = CatBul ** on_Prep = mkPrep "на" Acc ; ---- one_Quant = mkDeterminer Sg "one" ; -- DEPRECATED only_Predet = {s = \\_ => "само"} ; - or_Conj = {s1 = [] ; s2 = "или" ; n = Sg} ; + or_Conj = {s=[]; conj=False; distr=False; n = Sg} ; otherwise_PConj = ss "иначе" ; part_Prep = mkPrep "от" Acc ; please_Voc = ss "моля" ;