gf

How do I add an Adv to a VPSlash in Grammatical Framework RGL?


Let’s say I have a VP like “to help her” and I want to add an adverb such as “today” to it, turning it into a VP like “to help her today”. This is easy because the RGL has a function for doing exactly that: mkVP : Adv -> VP -> VP. Example:

resource ThisWorks = open SyntaxEng, (P = ParadigmsEng) in {
  oper step001 : VP = 
    mkVP --to help her
      (P.mkV2 (P.mkV "help"))
      she_NP;
  oper step003 : VP = 
    mkVP --to help her today
      step002 --VP: to help her
      (P.mkAdv "today");
}

Now let’s say that instead of a VP I have a VPSlash like “to help ___” where the direct object is deliberately left out because I want to use the VPSlash later to build questions such as “who are you helping today”. How do I add “today” to this VPSlash? This seems impossible to do because the RGL has no function for it: there is no mkVPSlash : Adv -> VPSlash -> VPSlash in the RGL. Hypothetical example:

resource ThisDoesNotWork = open SyntaxEng, (P = ParadigmsEng) in {
  oper step001 : VPSlash = 
    mkVP --to help ___
      (P.mkV2 (P.mkV "help"));
  oper step003 : VPSlash = 
    mkVPSlash --to help ___ today (this function does not exist)
      step002 --VP: to help ___
      (P.mkAdv "today");
}

Why is there no mkVPSlash : Adv -> VPSlash -> VPSlash in the RGL? Or what else am I supposed to do to add an Adv to a VPSlash?


Solution

  • The function exists in the RGL, but is not in the RGL API. You can see the functions in Verb.gf.

    In order to use the functions, you need to open VerbEng.

    Here's a grammar:

    resource ThisWorks = open SyntaxEng, (P = ParadigmsEng), (V = VerbEng) in {
      oper step001 : VPSlash =
        mkVPSlash --to help ___
          (P.mkV2 (P.mkV "help"));
      oper step002 : VPSlash =
        V.AdvVPSlash --to help ___ today
          step001 -- VPSlash: to help ___
          (P.mkAdv "today");
    }
    

    And here's the output:

    $ gf
    > i -retain ThisWorks.gf
    > cc -unqual -table step002
    …
    inf . help
    isAux . False
    isSimple . False
    nonAuxForms . past . helped
    …
    nonAuxForms . pres . AgP3Pl Fem => help
    p . []
    prp . helping
    ptp . helped
    s2 . AgP1 Sg => today
    …
    s2 . AgP3Pl Fem => today