From 7d9f4337d91dc7339816b10937f3972ef7e2016f Mon Sep 17 00:00:00 2001 From: krasimir Date: Sun, 8 Jun 2008 11:06:30 +0000 Subject: [PATCH] add adverbial form to each adjective in bulgarian-1.4 --- lib/resource-1.4/bulgarian/AdjectiveBul.gf | 8 +++++++- lib/resource-1.4/bulgarian/AdverbBul.gf | 2 +- lib/resource-1.4/bulgarian/CatBul.gf | 6 +++--- lib/resource-1.4/bulgarian/LexiconBul.gf | 2 +- lib/resource-1.4/bulgarian/MorphoBul.gf | 1 + lib/resource-1.4/bulgarian/ParadigmsBul.gf | 21 ++++++++++++--------- 6 files changed, 25 insertions(+), 15 deletions(-) diff --git a/lib/resource-1.4/bulgarian/AdjectiveBul.gf b/lib/resource-1.4/bulgarian/AdjectiveBul.gf index c16067a86..2fecd1155 100644 --- a/lib/resource-1.4/bulgarian/AdjectiveBul.gf +++ b/lib/resource-1.4/bulgarian/AdjectiveBul.gf @@ -2,11 +2,13 @@ concrete AdjectiveBul of Adjective = CatBul ** open ResBul, Prelude in { lin PositA a = { s = \\aform => a.s ! aform ; + adv = a.adv ; isPre = True } ; ComparA a np = { s = \\aform => "по" ++ "-" ++ a.s ! aform ++ "от" ++ np.s ! RObj Acc ; + adv = "по" ++ "-" ++ a.adv ++ "от" ++ np.s ! RObj Acc ; isPre = True } ; @@ -14,21 +16,25 @@ concrete AdjectiveBul of Adjective = CatBul ** open ResBul, Prelude in { ComplA2 a np = { s = \\aform => a.s ! aform ++ a.c2 ++ np.s ! RObj Acc ; + adv = a.adv ++ a.c2 ++ np.s ! RObj Acc ; isPre = True } ; ReflA2 a = { s = \\aform => a.s ! aform ++ a.c2 ++ ["себе си"] ; + adv = a.adv ++ a.c2 ++ ["себе си"] ; isPre = False } ; SentAP ap sc = { - s = \\a => ap.s ! a ++ sc.s ; + s = \\a => ap.s ! a ++ sc.s ; + adv = ap.adv ++ sc.s ; isPre = False } ; AdAP ada ap = { s = \\a => ada.s ++ ap.s ! a ; + adv = ada.s ++ ap.adv ; isPre = ap.isPre } ; diff --git a/lib/resource-1.4/bulgarian/AdverbBul.gf b/lib/resource-1.4/bulgarian/AdverbBul.gf index d34907e30..7210ea056 100644 --- a/lib/resource-1.4/bulgarian/AdverbBul.gf +++ b/lib/resource-1.4/bulgarian/AdverbBul.gf @@ -1,6 +1,6 @@ concrete AdverbBul of Adverb = CatBul ** open ResBul, Prelude in { lin - PositAdvAdj a = {s = a.s ! ASg Neut Indef} ; + PositAdvAdj a = {s = a.adv} ; ComparAdvAdj cadv a np = { s = cadv.s ++ "по" ++ "-" ++ a.s ! ASg Neut Indef ++ "от" ++ np.s ! RObj Acc } ; diff --git a/lib/resource-1.4/bulgarian/CatBul.gf b/lib/resource-1.4/bulgarian/CatBul.gf index 8d974d72a..b483be0ae 100644 --- a/lib/resource-1.4/bulgarian/CatBul.gf +++ b/lib/resource-1.4/bulgarian/CatBul.gf @@ -66,7 +66,7 @@ concrete CatBul of Cat = open ResBul, Prelude, (R = ParamX) in { -- Adjective - AP = {s : AForm => Str; isPre : Bool} ; + AP = {s : AForm => Str; adv : Str; isPre : Bool} ; -- Adjective @@ -108,8 +108,8 @@ concrete CatBul of Cat = open ResBul, Prelude, (R = ParamX) in { V3 = Verb ** {c2, c3 : Preposition} ; VV = Verb ; - A = {s : AForm => Str} ; - A2 = {s : AForm => Str ; c2 : Str} ; + A = {s : AForm => Str; adv : Str} ; + A2 = {s : AForm => Str; adv : Str; c2 : Str} ; N = {s : NForm => Str; g : DGender} ; N2 = {s : NForm => Str; g : DGender} ** {c2 : Preposition} ; diff --git a/lib/resource-1.4/bulgarian/LexiconBul.gf b/lib/resource-1.4/bulgarian/LexiconBul.gf index f29f8be3d..44e43b85f 100644 --- a/lib/resource-1.4/bulgarian/LexiconBul.gf +++ b/lib/resource-1.4/bulgarian/LexiconBul.gf @@ -84,7 +84,7 @@ lin girl_N = mkN065 "момиче" ; glove_N = mkN041 "ръкавица" ; gold_N = mkN054 "злато" ; - good_A = mkA080 "добър" ; + good_A = adjAdv (mkA080 "добър") "добре" ; go_V = actionV (mkV186 "отивам") (mkV146 "отида") ; green_A = mkA076 "зелен" ; harbour_N = mkN066 "пристанище" ; diff --git a/lib/resource-1.4/bulgarian/MorphoBul.gf b/lib/resource-1.4/bulgarian/MorphoBul.gf index b37cc57fc..14dc61d5c 100644 --- a/lib/resource-1.4/bulgarian/MorphoBul.gf +++ b/lib/resource-1.4/bulgarian/MorphoBul.gf @@ -171,6 +171,7 @@ oper APl Indef => dobri ; APl Def => dobrite } ; + adv = dobro ; lock_A = <> } ; } \ No newline at end of file diff --git a/lib/resource-1.4/bulgarian/ParadigmsBul.gf b/lib/resource-1.4/bulgarian/ParadigmsBul.gf index 985cfa5f1..731386d3e 100644 --- a/lib/resource-1.4/bulgarian/ParadigmsBul.gf +++ b/lib/resource-1.4/bulgarian/ParadigmsBul.gf @@ -699,15 +699,15 @@ oper (v0+"ите") ; mkA078 : Str -> A ; mkA078 base = let v0 = tk 1 base - in mkAdjective (v0+"и") - (v0+"ия") - (v0+"ият") - (v0+"а") - (v0+"ата") - (v0+"о") - (v0+"ото") - (v0+"и") - (v0+"ите") ; + in adjAdv (mkAdjective (v0+"и") + (v0+"ия") + (v0+"ият") + (v0+"а") + (v0+"ата") + (v0+"о") + (v0+"ото") + (v0+"и") + (v0+"ите")) (v0+"и") ; mkA079 : Str -> A ; mkA079 base = let v0 = tk 2 base in mkAdjective (v0+"ен") @@ -1452,4 +1452,7 @@ oper (v0+"ян") (v0+"ящ") (v0+"яй") ; + + adjAdv : A -> Str -> A = + \a,adv -> {s = a.s; adv = adv; lock_A=<>} ; } \ No newline at end of file