move the exension to the RNP API from WordNet to the RGL

This commit is contained in:
krangelov
2021-03-12 20:42:09 +01:00
parent 9d0555f8b8
commit 9d75eebcc0
4 changed files with 59 additions and 1 deletions

View File

@@ -192,6 +192,15 @@ abstract Extend = Cat ** {
PredetRNP : Predet -> RNP -> RNP ; -- all my brothers
AdvRNP : NP -> Prep -> RNP -> RNP ; -- a dispute with his wife
AdvRVP : VP -> Prep -> RNP -> VP ; -- lectured about her travels
AdvRAP : AP -> Prep -> RNP -> AP ; -- adamant in his refusal
ReflA2RNP : A2 -> RNP -> AP ; -- indifferent to their surroundings
-- NOTE: generalizes ReflA2
PossPronRNP : Pron -> Num -> CN -> RNP -> NP ; -- his abandonment of his wife and children
ConjRNP : Conj -> RNPList -> RNP ; -- my family, John and myself
Base_rr_RNP : RNP -> RNP -> RNPList ; -- my family, myself

View File

@@ -227,6 +227,20 @@ lin
gn = rnp.gn
} ;
AdvRNP np prep rnp = {s = \\role => np.s ! role ++ prep.s ++ rnp.s ! RObj prep.c; gn = np.gn; p = np.p} ;
AdvRVP vp prep rnp = insertObj (\\a => prep.s ++ rnp.s ! RObj prep.c) Pos vp ;
AdvRAP ap prep rnp = {
s = \\aform,p => ap.s ! aform ! p ++ prep.s ++ rnp.s ! RObj prep.c ;
isPre = False
} ;
ReflA2RNP a rnp = {
s = \\aform,_ => a.s ! aform ++ a.c2.s ++ rnp.s ! RObj a.c2.c ;
isPre = False
} ;
PossPronRNP pron num cn rnp = DetCN (DetQuant (PossPron pron) num) (PossNP cn (lin NP {s = rnp.s; gn = rnp.gn; p=NounP3 Pos})) ;
lin
ApposNP np1 np2 = {s = \\role => case role of {
RObj c => linCase c (personPol np1.p) ++ np1.s ! RObj CPrep ;

View File

@@ -331,11 +331,22 @@ lin BaseImp = twoTable2 CPolarity ImpForm ;
RNPList = {s1,s2 : Agr => Str} ;
lin
ReflRNP vps rnp = insertObjPre (\\a => vps.c2 ++ rnp.s ! a) vps ;
ReflRNP vps rnp = insertObj (\\a => vps.c2 ++ rnp.s ! a) vps ;
ReflPron = {s = reflPron} ;
ReflPoss num cn = {s = \\a => possPron ! a ++ num.s ! True ! Nom ++ cn.s ! num.n ! Nom} ;
PredetRNP predet rnp = {s = \\a => predet.s ++ rnp.s ! a} ;
AdvRNP np prep rnp = {s = \\a => np.s ! NPAcc ++ prep.s ++ rnp.s ! a} ;
AdvRVP vp prep rnp = insertObj (\\a => prep.s ++ rnp.s ! a) vp ;
AdvRAP ap prep rnp = {s = \\a => ap.s ! a ++ prep.s ++ rnp.s ! a ; isPre = False} ;
ReflA2RNP a rnp = {
s = \\ag => a.s ! AAdj Posit Nom ++ a.c2 ++ rnp.s ! ag ;
isPre = False
} ;
PossPronRNP pron num cn rnp = DetCN (DetQuant (PossPron pron) num) (PossNP cn (lin NP {s = \\_ => rnp.s ! pron.a; a = pron.a})) ;
ConjRNP conj rpns = conjunctDistrTable Agr conj rpns ;
Base_rr_RNP x y = twoTable Agr x y ;

View File

@@ -216,6 +216,30 @@ lin BaseImp = twoTable2 Polarity Number ;
isPron = False
} ;
AdvRNP np prep rnp = {s = \\a => np.s ! NPAcc ++ prep.s ++ rnp.s ! a; isPron = False} ;
AdvRVP vp prep rnp = insertObjPost (\\a => prep.s ++ rnp.s ! a) vp ;
AdvRAP ap prep rnp = {
s = \\a => let agr = case a of {
Strong (GSg g) => agrP3 g Sg ;
Strong GPl => agrP3 Utr Pl ;
Weak n => agrP3 Utr n
}
in ap.s ! a ++ prep.s ++ rnp.s ! agr ;
isPre = ap.isPre
} ;
ReflA2RNP a rnp = {
s = \\ap => let agr = case ap of {
Strong (GSg g) => agrP3 g Sg ;
Strong GPl => agrP3 Utr Pl ;
Weak n => agrP3 Utr n
}
in a.s ! AF (APosit ap) Nom ++ a.c2.s ++ rnp.s ! agr ;
isPre = False
} ;
PossPronRNP pron num cn rnp = DetCN (DetQuant (PossPron pron) num) (PossNP cn (lin NP {s = \\_ => rnp.s ! pron.a; a = pron.a; isPron=False})) ;
ConjRNP conj rpns = conjunctDistrTable Agr conj rpns ** {isPron = False} ;
Base_rr_RNP x y = twoTable Agr x y ;