fixed the N2 and N3 representation and added constructor functions

This commit is contained in:
krasimir
2008-03-13 10:45:22 +00:00
parent 4f0126677b
commit 4683e4e0e2
3 changed files with 33 additions and 4 deletions

View File

@@ -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} ;

View File

@@ -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

View File

@@ -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)) ;