better treatment of variant relative pronouns in Eng, based on suggestions by DrBean in gf-dev

This commit is contained in:
aarne
2016-05-20 17:13:06 +00:00
parent 694cdffa72
commit e87adc42a4
5 changed files with 50 additions and 34 deletions

View File

@@ -48,16 +48,6 @@ concrete ExtraEng of ExtraEngAbs = CatEng **
insertObj (\\a => vpi.s ! vv.typ ! a) (predVV vv) ; insertObj (\\a => vpi.s ! vv.typ ! a) (predVV vv) ;
lin lin
that_RP =
{ s = table {
RC _ (NCase Gen) => "whose" ;
RC _ _ => "that" ;
_ => "that" ---- "in that" ?
-- RPrep Neutr => "which" ;
-- RPrep _ => "whom"
} ;
a = RNoAg
} ;
each_Det = mkDeterminer Sg "each" ; each_Det = mkDeterminer Sg "each" ;
any_Quant = mkQuant "any" "any" ; any_Quant = mkQuant "any" "any" ;
@@ -283,4 +273,44 @@ lin
g = cn.g g = cn.g
} ; } ;
} that_RP =
{ s = table {
RC _ (NCase Gen) | RC _ NPNomPoss => "whose" ;
RC Neutr _ => "that" ;
RC _ NPAcc => "that" ;
RC _ (NCase Nom) => "that" ;
RPrep Neutr => "which" ;
RPrep _ => "who"
} ;
a = RNoAg
} ;
who_RP =
{ s = table {
RC _ (NCase Gen) | RC _ NPNomPoss => "whose" ;
_ => "who"
} ;
a = RNoAg
} ;
which_RP =
{ s = table {
RC _ (NCase Gen) | RC _ NPNomPoss => "whose" ;
_ => "which"
} ;
a = RNoAg
} ;
emptyRP =
{ s = table {
RC _ (NCase Gen) | RC _ NPNomPoss => "whose" ;
RC _ NPAcc => [] ;
RC _ (NCase Nom) => "that" ;
RPrep Neutr => "which" ;
RPrep _ => "who"
} ;
a = RNoAg
} ;
}

View File

@@ -8,7 +8,10 @@ abstract ExtraEngAbs = Extra - [ProDrop] ** {
CompoundCN : CN -> CN -> CN ; -- rock album CompoundCN : CN -> CN -> CN ; -- rock album
that_RP : RP ; -- "that" as a relational pronoun (IdRP is "which" / "who") that_RP : RP ; -- "that" as a relational pronoun (IdRP is "which" / "who")
which_RP : RP ; -- force "which"
who_RP : RP ; -- force "who" ; in Acc, also "who": "the girl who I saw"
emptyRP : RP ; -- empty RP in Acc position: "the girl I saw"
each_Det : Det ; each_Det : Det ;
any_Quant : Quant ; any_Quant : Quant ;

View File

@@ -37,7 +37,7 @@ resource ResEng = ParamX ** open Prelude in {
-- for "himself"/"herself"/"itself". -- for "himself"/"herself"/"itself".
param param
Agr = AgP1 Number | AgP2 Number | AgP3Sg Gender | AgP3Pl ; Agr = AgP1 Number | AgP2 Number | AgP3Sg Gender | AgP3Pl Gender ;
param param
Gender = Neutr | Masc | Fem ; Gender = Neutr | Masc | Fem ;
@@ -101,14 +101,14 @@ param
P2 => AgP2 n ; P2 => AgP2 n ;
P3 => case n of { P3 => case n of {
Sg => AgP3Sg g ; Sg => AgP3Sg g ;
Pl => AgP3Pl Pl => AgP3Pl g
} }
} ; } ;
fromAgr : Agr -> {n : Number ; p : Person ; g : Gender} = \a -> case a of { fromAgr : Agr -> {n : Number ; p : Person ; g : Gender} = \a -> case a of {
AgP1 n => {n = n ; p = P1 ; g = Masc} ; AgP1 n => {n = n ; p = P1 ; g = Masc} ;
AgP2 n => {n = n ; p = P2 ; g = Masc} ; AgP2 n => {n = n ; p = P2 ; g = Masc} ;
AgP3Pl => {n = Pl ; p = P3 ; g = Masc} ; AgP3Pl g => {n = Pl ; p = P3 ; g = g} ;
AgP3Sg g => {n = Sg ; p = P3 ; g = g} AgP3Sg g => {n = Sg ; p = P3 ; g = g}
} ; } ;
@@ -523,7 +523,7 @@ param
AgP3Sg Neutr => "itself" ; AgP3Sg Neutr => "itself" ;
AgP1 Pl => "ourselves" ; AgP1 Pl => "ourselves" ;
AgP2 Pl => "yourselves" ; AgP2 Pl => "yourselves" ;
AgP3Pl => "themselves" AgP3Pl _ => "themselves"
} ; } ;
-- For $Sentence$. -- For $Sentence$.

View File

@@ -122,16 +122,6 @@ lin
s = s.s ! QDir ++ frontComma ++ t.s ++ cl.s ! t.t ! t.a ! CPos ! oDir s = s.s ! QDir ++ frontComma ++ t.s ++ cl.s ! t.t ! t.a ! CPos ! oDir
} ; } ;
that_RP = {
s = \\_ => "that" ;
a = RNoAg
} ;
who_RP = {
s = \\_ => "who" ;
a = RNoAg
} ;
CompS s = {s = \\_ => "that" ++ s.s} ; CompS s = {s = \\_ => "that" ++ s.s} ;
CompQS qs = {s = \\_ => qs.s ! QIndir} ; CompQS qs = {s = \\_ => qs.s ! QIndir} ;
CompVP ant p vp = {s = \\a => ant.s ++ p.s ++ CompVP ant p vp = {s = \\a => ant.s ++ p.s ++

View File

@@ -84,14 +84,7 @@ lin
PPos = {s = [] ; p = CPos} ; PPos = {s = [] ; p = CPos} ;
PNeg = {s = [] ; p = CNeg True} | {s = [] ; p = CNeg False} ; PNeg = {s = [] ; p = CNeg True} | {s = [] ; p = CNeg False} ;
IdRP = ExtensionsEng.that_RP | G.IdRP | ExtensionsEng.who_RP | IdRP = E.that_RP | G.IdRP | E.who_RP | E.emptyRP ; --- "that" safest when gender is not known
{ s = table {
RC _ (NCase Gen) | RC _ NPNomPoss => "whose" ;
RC _ NPAcc => [] ;
_ => "which"
} ;
a = RNoAg
} ;
DetNP d = G.DetNP d | G.DetCN d (UseN (mkN "one")) ; -- I like this / I like this one ; it / the one DetNP d = G.DetNP d | G.DetCN d (UseN (mkN "one")) ; -- I like this / I like this one ; it / the one