Using the SEMI to get an MRS fragment in PyDelphin

I think I’ve gotten help with this sort of thing before, but looking through my posts I can’t find exactly what I’m looking for.

I want to create MRS objects (that I will then augment with more information for SSEMENT-like objects which each have a list of holes). I would prefer to do this “from scratch” as opposed to using ACE to parse a word like “cat,” get a result, then use that result as my baseline MRS.

Essentially I want to

  • query the SEMI for a synopsis of a certain predicate
  • use that information to help build an MRS

But when I get a synopsis back that only gives me information about the arguments that predicate would take, how do I fill in the top, index, and HCONS information?

I suppose it might be the case that it’s just best to parse from the ERG and just do it that way, but if there’s a more streamlined way that I’m missing then that would be super helpful!

@ecconrad The predicate synopses from the SEM-I only tell you about the roles that predicate accepts/requires the argument types for those roles. Top-level things like the top and index are not particularly relevant in a SEM-I as they are properties of assembled MRSs. For instance, an MRS with only one EP with the predicate _rain_v_1 (e.g., for it rained), both the MRS’s top and index would point to the one EP (top would be QEQ’d to the EP’s label, and index would be the EP’s ARG0). If there’s a second, scopal EP with predicate _probable_a_1 scoping over the first EP (e.g., it probably rained), then the MRS’s top would point to the second EP (via QEQ), but the index would still point to the first. If the modifier were instead non-scopal (e.g., it heavily rained), then the top would not have changed (and the new EP would share the scope). These rules of composition that yield well-formed MRSs are not encoded in the SEM-I as they should be true for any grammar.

I do think it would be useful to have a PyDelphin module that could assemble MRSs in this way, but I never had an immediate need so it didn’t happen. It would be great if someone (you?) were to create one. There might be some code in pydmrs for this, though?