From 4683e4e0e2dc5013e8682f49d6e20af5665edd73 Mon Sep 17 00:00:00 2001 From: krasimir Date: Thu, 13 Mar 2008 10:45:22 +0000 Subject: [PATCH] fixed the N2 and N3 representation and added constructor functions --- lib/resource/bulgarian/CatBul.gf | 4 ++-- lib/resource/bulgarian/MorphoFunsBul.gf | 29 +++++++++++++++++++++++++ lib/resource/bulgarian/NounBul.gf | 4 ++-- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/lib/resource/bulgarian/CatBul.gf b/lib/resource/bulgarian/CatBul.gf index 5f2347327..2c4ac9098 100644 --- a/lib/resource/bulgarian/CatBul.gf +++ b/lib/resource/bulgarian/CatBul.gf @@ -107,8 +107,8 @@ concrete CatBul of Cat = open ResBul, Prelude, (R = ParamX) in { A2 = {s : AForm => Str ; c2 : Str} ; N = {s : NForm => Str; g : DGender} ; - N2 = {s : NForm => Str; g : DGender} ** {c2 : Str} ; - N3 = {s : NForm => Str; g : DGender} ** {c2,c3 : Str} ; + N2 = {s : NForm => Str; g : DGender} ** {c2 : Preposition} ; + N3 = {s : NForm => Str; g : DGender} ** {c2,c3 : Preposition} ; PN = {s : Str; g : Gender} ; diff --git a/lib/resource/bulgarian/MorphoFunsBul.gf b/lib/resource/bulgarian/MorphoFunsBul.gf index 336f79fe1..2784bee3f 100644 --- a/lib/resource/bulgarian/MorphoFunsBul.gf +++ b/lib/resource/bulgarian/MorphoFunsBul.gf @@ -76,6 +76,35 @@ oper mkVA v = v ** {lock_VA = <>} ; + mkV2Q : V -> Prep -> V2Q ; + mkV2Q v p = prepV2 v p ** {lock_V2 = <>} ; + + +--2 Nouns + +--3 Two-place Nouns +-- + + prepN2 : N -> Prep -> N2 ; + prepN2 n p = {s = n.s; g = n.g; c2 = p; lock_N2 = <>} ; + + dirN2 : N -> N2 ; + dirN2 n = prepN2 n noPrep ; + + +--3 Three-place Nouns +-- + + prepN3 : N -> Prep -> Prep -> N3 ; + prepN3 n p q = {s = n.s; g = n.g; c2 = p; c3 = q; lock_N3 = <>} ; + + dirN3 : N -> Prep -> N3 ; + dirN3 n p = prepN3 n noPrep p ; + + dirdirN3 : N -> N3 ; + dirdirN3 n = dirN3 n noPrep ; + + --2 Prepositions -- -- A preposition as used for rection in the lexicon, as well as to diff --git a/lib/resource/bulgarian/NounBul.gf b/lib/resource/bulgarian/NounBul.gf index 5ddac404c..a2c61eea5 100644 --- a/lib/resource/bulgarian/NounBul.gf +++ b/lib/resource/bulgarian/NounBul.gf @@ -107,8 +107,8 @@ concrete NounBul of Noun = CatBul ** open ResBul, Prelude in { UseN2 noun = noun ; UseN3 noun = noun ; - ComplN2 f x = {s = \\nf => f.s ! nf ++ f.c2 ++ x.s ! RObj Acc; g=f.g} ; - ComplN3 f x = {s = \\nf => f.s ! nf ++ f.c2 ++ x.s ! RObj Acc; c2 = f.c3; g=f.g} ; + ComplN2 f x = {s = \\nf => f.s ! nf ++ f.c2.s ++ x.s ! RObj f.c2.c; g=f.g} ; + ComplN3 f x = {s = \\nf => f.s ! nf ++ f.c2.s ++ x.s ! RObj f.c2.c; c2 = f.c3; g=f.g} ; AdjCN ap cn = { s = \\nf => preOrPost ap.isPre (ap.s ! nform2aform nf cn.g) (cn.s ! (indefNForm nf)) ;