1
0
forked from GitHub/gf-core

Added Pol argument to ExtraEng.Unc* to give them the same signatures as the standard (contracted) versions. This makes it easier to use Unc* as a variant without getting meta-variables when parsing,

This commit is contained in:
bjorn
2008-10-31 09:22:09 +00:00
parent b49a021608
commit 6fcfe5d7b7
3 changed files with 23 additions and 21 deletions

View File

@@ -35,20 +35,24 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
ComplVPIVV vv vpi =
insertObj (\\a => (if_then_Str vv.isAux [] "to") ++ vpi.s ! VPIInf ! a) (predVV vv) ;
UncNegCl t cl = {s = t.s ++ cl.s ! t.t ! t.a ! neg ! ODir} ;
UncNegQCl t cl = {s = \\q => t.s ++ cl.s ! t.t ! t.a ! neg !q} ;
UncNegRCl t cl = {
s = \\r => t.s ++ cl.s ! t.t ! t.a ! neg ! r ;
UncNegCl t p cl = {
s = t.s ++ p.s ++ cl.s ! t.t ! t.a ! unc p.p ! ODir
} ;
UncNegQCl t p cl = {
s = \\q => t.s ++ p.s ++ cl.s ! t.t ! t.a ! unc p.p ! q
} ;
UncNegRCl t p cl = {
s = \\r => t.s ++ p.s ++ cl.s ! t.t ! t.a ! unc p.p ! r ;
c = cl.c
} ;
UncNegImpSg imp = {s = imp.s ! neg ! ImpF Sg False} ;
UncNegImpPl imp = {s = imp.s ! neg ! ImpF Pl False} ;
} ;
UncNegImpSg p imp = {s = p.s ++ imp.s ! unc p.p ! ImpF Sg False} ;
UncNegImpPl p imp = {s = p.s ++ imp.s ! unc p.p ! ImpF Pl False} ;
CompoundCN a b = {s = \\n,c => a.s ! Sg ! Nom ++ b.s ! n ! c ; g = b.g} ;
oper
neg = CNeg False ;
unc = contrNeg False ;
lin

View File

@@ -2,12 +2,12 @@ abstract ExtraEngAbs = Extra ** {
-- uncontracted negations; contracted are the default
fun
UncNegCl : Temp -> Cl -> S ;
UncNegQCl : Temp -> QCl -> QS ;
UncNegRCl : Temp -> RCl -> RS ;
UncNegCl : Temp -> Pol -> Cl -> S ;
UncNegQCl : Temp -> Pol -> QCl -> QS ;
UncNegRCl : Temp -> Pol -> RCl -> RS ;
UncNegImpSg : Imp -> Utt; -- do not help yourself
UncNegImpPl : Imp -> Utt; -- do not help yourselves
UncNegImpSg : Pol -> Imp -> Utt; -- do not help yourself
UncNegImpPl : Pol -> Imp -> Utt; -- do not help yourselves
-- freely compounded nouns

View File

@@ -38,33 +38,31 @@ lin ComplVS v s = variants { VerbEng.ComplVS v s; insertObj (\\_ => s.s) (predV
lin UseCl t p cl =
case p.p of {
Pos => SentenceEng.UseCl t p cl;
Neg => variants { SentenceEng.UseCl t p cl; { s = p.s ++ (UncNegCl t cl).s } }
Neg => variants { SentenceEng.UseCl t p cl; UncNegCl t p cl }
} ;
lin UseQCl t p cl =
case p.p of {
Pos => SentenceEng.UseQCl t p cl;
Neg => variants { SentenceEng.UseQCl t p cl; { s = \\qf => p.s ++ (UncNegQCl t cl).s!qf } }
Neg => variants { SentenceEng.UseQCl t p cl; UncNegQCl t p cl }
} ;
lin UseRCl t p cl =
case p.p of {
Pos => SentenceEng.UseRCl t p cl;
Neg => variants { SentenceEng.UseRCl t p cl;
let s = UncNegRCl t cl
in { s = \\agr => p.s ++ s.s!agr; c = s.c } }
Neg => variants { SentenceEng.UseRCl t p cl; UncNegRCl t p cl }
} ;
lin UttImpSg p i =
case p.p of {
Pos => PhraseEng.UttImpSg p i;
Neg => variants { PhraseEng.UttImpSg p i ; { s = p.s ++ (UncNegImpSg i).s } }
Neg => variants { PhraseEng.UttImpSg p i ; UncNegImpSg p i }
} ;
lin UttImpPl p i =
case p.p of {
Pos => PhraseEng.UttImpPl p i;
Neg => variants { PhraseEng.UttImpPl p i ; { s = p.s ++ (UncNegImpPl i).s } }
Neg => variants { PhraseEng.UttImpPl p i ; UncNegImpPl p i }
} ;
-- Allow both "who"/"which" and "that"