mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
(Eng) Undo the change in FunRP from #381
This commit is contained in:
@@ -89,8 +89,6 @@ concrete CatEng of Cat = CommonX - [Pol,CAdv] ** open ResEng, Prelude in {
|
||||
Prep = {
|
||||
s : Str ; -- "with", "ago"
|
||||
isPre : Bool ; -- whether it's pre- or postposition: "with"=True, "ago"=False
|
||||
isPoss : Bool ; -- whether it becomes "whose" in FunRP: "John, whose mother is wise"
|
||||
empty : Str ; -- dummy empty string to avoid issues with parsing, if s field is replaced by "whose" in FunRP
|
||||
} ;
|
||||
CAdv = {s : Polarity => Str; p : Str} ;
|
||||
|
||||
|
||||
@@ -537,18 +537,12 @@ mkVoc s = lin Voc (ss s) ;
|
||||
mkPrep p = lin Prep {
|
||||
s = p ; -- the string: "with", "in front of"
|
||||
isPre = True ; -- default case: it is a preposition, not postposition
|
||||
isPoss = False ; -- default case: not possessive (i.e. no change in FunRP)
|
||||
empty = [] -- dummy field to prevent an issue with parsing. only relevant when isPoss=True, and FunRP overrides the s field with "whose". for explanation of the issue, see https://inariksit.github.io/gf/2018/08/28/gf-gotchas.html#metavariables-or-those-question-marks-that-appear-when-parsing
|
||||
} ;
|
||||
mkPost p = mkPrep p ** {
|
||||
isPre = False -- postposition: e.g. "ago"
|
||||
} ;
|
||||
noPrep = mkPrep [] ;
|
||||
|
||||
possPrep : Str -> Prep = \p -> mkPrep p ** {
|
||||
isPoss = True -- for possessive, FunRP overrides the Prep's string with "whose":
|
||||
} ; -- e.g. "whose mother" instead of "mother of which"
|
||||
|
||||
mk5V a b c d e = lin V (mkVerb a b c d e ** {s1 = []}) ;
|
||||
|
||||
regV cry =
|
||||
|
||||
@@ -32,16 +32,10 @@ concrete RelativeEng of Relative = CatEng ** open ResEng, Prelude in {
|
||||
c = NPAcc
|
||||
} ;
|
||||
|
||||
-- John , whose every friend is right
|
||||
-- a number, [the square of which] is 4
|
||||
-- For a construction like "John , [whose every friend] is right", use Extend.GenRP
|
||||
FunRP p np rp = {
|
||||
s = \\c =>
|
||||
let npGender : Gender = (fromAgr np.a).g in
|
||||
case p.isPoss of {
|
||||
True => rp.s ! RC npGender NPNomPoss ++ -- whose
|
||||
p.empty ++ -- empty string to avoid metavariables
|
||||
np.s ! NCase Nom ; -- NP in nom: "whose every friend"
|
||||
False => np.s ! NPAcc ++ p.s ++ rp.s ! RPrep npGender
|
||||
} ;
|
||||
s = \\c => np.s ! NPAcc ++ p.s ++ rp.s ! RPrep (fromAgr np.a).g ;
|
||||
a = RAg np.a
|
||||
} ;
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ concrete StructuralEng of Structural = CatEng **
|
||||
otherwise_PConj = ss "otherwise" ;
|
||||
part_Prep = mkPrep "of" ;
|
||||
please_Voc = ss "please" ;
|
||||
possess_Prep = possPrep "of" ;
|
||||
possess_Prep = mkPrep "of" ;
|
||||
quite_Adv = mkAdv "quite" ;
|
||||
she_Pron = mkPron "she" "her" "her" "hers" singular P3 feminine ;
|
||||
so_AdA = mkAdA "so" ;
|
||||
@@ -159,4 +159,3 @@ concrete StructuralEng of Structural = CatEng **
|
||||
lin language_title_Utt = ss "English" ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user