Regression test succeeding in the trunk, grammar not loading in LKB

Here’s another regression test issue (oh what fun).

One of the tests which is succeeding in the trunk (and failing in my current branch which is why I looked at it) is associated with a grammar that does not load with the LKB. It doesn’t load due to a redundancy in the hierarchy (look at the add-only-rule parent which is present in both types):

; Adjective Incorporation

adj_incorporation-lex-rule := add-only-rule &
  [ C-CONT [ RELS <! arg1-ev-relation &
                     [ LBL #ltop,
                       ARG1 #index ] !>,
             HOOK #hook ],
    DTR.SYNSEM.LOCAL [ CAT.HEAD noun,
                       CONT.HOOK #hook &
                                 [ LTOP #ltop,
                                   INDEX #index ] ] ].

;;; Lexical rule types

adj_incorp-lex-rule-super := add-only-rule & adj_incorporation-lex-rule & infl-lex-rule &
  [ DTR noun-lex ].

How do I proceed with this?..

ACE loads the grammar despite the redundancy and can parse stuff with it. Should I just ignore the fact that it doesn’t load in LKB then?.. (Would be harder to debug for me but I suppose that’s not an excuse…)

So, the more general question about what to do when ACE loads a regression test grammar but LKB doesn’t remains, but I also wanted to add, for completeness, an example of diffs which I am looking at here. In particular, note an error message associated with the gold MRS. What does that error mean for me?

Screen Shot 2020-01-23 at 4.40.52 PM

Otherwise, it seems like in the gold profile, there is an HCONS item missing. There are two nouns with two quantifiers but only one HCONS qeq? So, in this case, gold should be updated? And again, perhaps I don’t have to dig to determine why gold was like that in the first place?

Removing add-only-rule from the supertypes to adj_incorp-lex-rule-super would fix the problem in this grammar. Do these types always come out like this if there is adjective incorporation? That is, is it static IGT in the customization system?

Can’t help with the error, except that it looks like a warning, so maybe not serious?

Yes, the first of those two looks broken, so if it’s gold, gold needs updating.

1 Like

Seems like a ticket had been filed for this: https://lemur.ling.washington.edu/trac/matrix/ticket/882

I think I won’t investigate further at this point…

Hmm actually, my current probably is broken still, because while it adds a qeq between one exist and one noun, I don’t think it adds all of the necessary qeqs; doesn’t look like it.

Should I still just update gold to what I currently get?.. Sort of because there is no actual regression, there seems to be an improvement (even though the MRS is still broken)?

Just confirming that the TSDBWarning is benign. It’s just saying that a field in your profile has the :date datatype but its value is 0, which is not a valid date.

Actually, I think this one bears a little more investigation, since it looks like a broken HCONS append. That is, it looks like you’re missing the qeq that goes with the later NP, that should be h11 qeq h13. It’s possible that this has to do with the switch to Emerson lists for these features. If you want to send me this grammar, I can try to poke around to see where the break is…

Thank you, I’d greatly appreciate that! I sent you the grammars (trunk and current). There would be a break in the trunk as well though, wouldn’t there? Since the gold MRS doesn’t have that qeq either?

Okay, so it’s a bug in @trimblet’s library. This type:

adj_incorporation-lex-rule := add-only-rule &
  [ C-CONT [ RELS.LIST < arg1-ev-relation &
                         [ LBL #ltop,
                           ARG1 #index ] >,
             HOOK #hook ],
    DTR.SYNSEM.LOCAL [ CAT.HEAD noun,
                       CONT.HOOK #hook &
                                 [ LTOP #ltop,
                                   INDEX #index ] ] ].

Is failing to constrain the C-CONT.HCONS. My guess is that the order of the append switched between the diff-list version and the append-list version and that’s what caused the change. The type should read like this:

adj_incorporation-lex-rule := add-only-rule &
  [ C-CONT [ RELS.LIST < arg1-ev-relation &
                         [ LBL #ltop,
                           ARG1 #index ] >,
	         HCONS.LIST < >,
             HOOK #hook ],
    DTR.SYNSEM.LOCAL [ CAT.HEAD noun,
                       CONT.HOOK #hook &
                                 [ LTOP #ltop,
                                   INDEX #index ] ] ].

With the only difference being the addition of HCONS.LIST < >. Could you add this to the ticket about the redundant supertype, since it needs fixing in (presumably) the same place in coordination? And then yes, go ahead and update the gold to your (still not fixed) version.

1 Like

OK, thanks!

Looking at other tests from the same library, it looks like perhaps in this one we might actually be getting the correct MRS in my branch? All three qeqs are in place?.. (The gold has two qeqs, in this case). I am still not sure why though.

Yes, yours looks correct, but it’s probably still underlyingly the same bug, just hidden by fortuitous append order in this case.

1 Like

Would be good to figure it out systematically…

I have no opinion about either the supertype or the hcons on the incorporation rule. Happy to see it fixed and the gold profile updated, if you could do that, @olzama! My guess is that the super rule is generated and in mylang.tdl, so it could probably have it’s supertype changed.

I seem to recall there being only two incorporation tests, one for the adjective stem pc being before the noun stem and one for after.

Thanks, TJ!

@olzama I can try to fix the adjective rule (adding hcons, updating test) sometime in the next couple days.