1
0
forked from GitHub/gf-rgl

(Ara) Add NP field to CN for apposition, to attach poss.suff. correctly

This commit is contained in:
Inari Listenmaa
2018-10-16 17:46:28 +02:00
parent 3acaaed474
commit b33d260377
2 changed files with 7 additions and 9 deletions

View File

@@ -47,7 +47,7 @@ concrete CatAra of Cat = CommonX - [Utt] ** open ResAra, Prelude, ParamX in {
-- Noun -- Noun
CN = ResAra.Noun ** {adj : NTable}; CN = ResAra.Noun ** {adj : NTable ; np : Case => Str};
NP, Pron = ResAra.NP; --{s : Case => Str ; a : Agr } ; NP, Pron = ResAra.NP; --{s : Case => Str ; a : Agr } ;
Num, Num,
Ord, Ord,

View File

@@ -169,7 +169,9 @@ lin
-- isNum = False; isPron = False} ; -- isNum = False; isPron = False} ;
UseN, UseN,
UseN2 = \n -> n ** {adj = \\_,_,_ => []}; UseN2 = \n -> n ** {
adj = \\_,_,_ => [];
np = \\_ => []};
Use2N3 n3 = n3 ; Use2N3 n3 = n3 ;
Use3N3 n3 = n3 ** {c2 = n3.c3} ; Use3N3 n3 = n3 ** {c2 = n3.c3} ;
@@ -179,16 +181,12 @@ lin
ComplN3 n3 np = ComplN2 n3 np ** {c2 = n3.c3} ; ComplN3 n3 np = ComplN2 n3 np ** {c2 = n3.c3} ;
AdjCN ap cn = { AdjCN ap cn = cn ** {
s = \\n,d,c => cn.s ! n ! d ! c; adj = \\n,d,c => ap.s ! cn.h ! cn.g ! n ! (definite ! d) ! c
adj = \\n,d,c => ap.s ! cn.h ! cn.g ! n ! (definite ! d) ! c ;
g = cn.g;
h = cn.h
}; };
-- RelCN cn rs = {s = \\n,c => cn.s ! n ! c ++ rs.s ! {n = n ; p = P3}} ; -- RelCN cn rs = {s = \\n,c => cn.s ! n ! c ++ rs.s ! {n = n ; p = P3}} ;
-- AdvCN cn ad = {s = \\n,c => cn.s ! n ! c ++ ad.s} ; -- AdvCN cn ad = {s = \\n,c => cn.s ! n ! c ++ ad.s} ;
-- --
-- SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s} ; -- SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s} ;
ApposCN cn np = cn ** { ApposCN cn np = cn ** { np = np.s } ;
s = \\n,d,c => cn.s ! n ! d ! c ++ np.s ! c } ;
} }