mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-24 03:52:50 -06:00
better treatment of variant relative pronouns in Eng, based on suggestions by DrBean in gf-dev
This commit is contained in:
@@ -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
|
||||||
|
} ;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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 ;
|
||||||
|
|||||||
@@ -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$.
|
||||||
|
|||||||
@@ -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 ++
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user