(Eng) Undo the change in FunRP from #381

This commit is contained in:
Inari Listenmaa
2022-01-19 14:51:49 +08:00
parent eb7b74578f
commit 5a5adef0db
4 changed files with 6 additions and 21 deletions

View File

@@ -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} ;

View File

@@ -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 =

View File

@@ -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
} ;

View File

@@ -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" ;
}