delph-in / matrix

The Grammar Matrix
https://matrix.ling.washington.edu/index.html
Other
11 stars 6 forks source link

poss-phrase-1 missing binary-nonloc-phrase supertype #632

Closed emilymbender closed 4 months ago

emilymbender commented 2 years ago

Another spot where the adnominal possession library leaves the NON-LOCAL features underspecified. poss-phrase-1 should have binary-nonloc-phrase as a supertype here:

poss-phrase-1 := head-final &
  [ SYNSEM.LOCAL.CAT [ HEAD #head,
                       VAL [ COMPS < >,
                             SUBJ < >,
                             SPEC < >,
                             SPR < > ] ],
    HEAD-DTR.SYNSEM.LOCAL [ CAT [ POSSESSUM nonpossessive,
                                  HEAD #head & noun &
                                       [ POSSESSOR nonpossessive,
                                         PRON - ],
                                  VAL.SPR < [ ] > ],
...

Also, I have a choices file (with lots more info in) where the resulting grammar lacks a rule instantiating poss-phrase-1. Couldn't reproduce it with this minimal example though, so I'll store that choices file locally. [Note to self: it will be in the same email thread as this.]

choices.txt

emilymbender commented 2 years ago

Edit: the larger choices file does seem to have produced the rule. So, the only problem is the one reproduced in the smaller choices file.

ltxom commented 2 years ago

I'm trying to add a regression test for this. Can you please give me an example of a poss-phrase passing up the NON-LOCAL features in binary phrases?

emilymbender commented 2 years ago

I don't have time to construct the example right now, but I think what is needed is adding choices to the choices file that describe in situ wh questions. This will cause the wh-in-situ rule to be instantiated, and then if non-local features are underspecified, it will probably fire in every sentence.

olzama commented 2 years ago

Let me know if you still need help with this, @ltxom

ltxom commented 2 years ago

@olzama Thank you for your reply! Could you please construct me an example of how underspecified non-local features fire in every sentence with instantiated wh-in-situ rule?

olzama commented 2 years ago

Actually, I am myself unable to reproduce the problem based on the given description.

I did:

(1) Download the attached choices file (it's a version of the "minimal grammar" but with some adnominal possession choices (2) Add a choice for in situ wh-questions (3) Add a question pronoun (4) Save the changes (5) Download the updated grammar (6) Loaded it into LKB-FOS (7) Tried parsing a sentence n1 iv and then also who iv

But I didn't get the spurious in-situ parse for n1 iv.

@emilymbender do you remember more details? (I know the issue is widespread in general but in this case I am not sure which exact part of it we are talking about.)

emilymbender commented 2 years ago

In that grammar, what does poss-phrase-1 look like? Does the grammar have an in-situ phrase?

olzama commented 2 years ago

Yes, it does have the in-situ phrase. I attach the choices.

poss-phrase-1 := head-final &
  [ SYNSEM.LOCAL.CAT [ HEAD #head,
                       VAL [ COMPS < >,
                             SUBJ < >,
                             SPEC < >,
                             SPR < > ] ],
    HEAD-DTR.SYNSEM.LOCAL [ CAT [ POSSESSUM nonpossessive,
                                  HEAD #head & noun &
                                       [ POSSESSOR nonpossessive,
                                         PRON - ],
                                  VAL.SPR < [ ] > ],
                            CONT.HOOK #hook &
                                      [ LTOP #lbl,
                                        INDEX #possessum &
                                              [ COG-ST uniq-id ] ] ],
    C-CONT [ HOOK #hook &
                  [ INDEX #possessum ],
             ICONS.LIST < >,
             RELS.LIST < arg12-ev-relation &
                         [ PRED "poss_rel",
                           LBL #lbl,
                           ARG1 #possessum,
                           ARG2 #possessor ],
                         quant-relation &
                         [ PRED "exist_q_rel",
                           ARG0 #possessum,
                           RSTR #harg ] >,
             HCONS.LIST < qeq &
                          [ HARG #harg,
                            LARG #lbl ] > ],
    NON-HEAD-DTR.SYNSEM.LOCAL [ CONT.HOOK.INDEX #possessor,
                                CAT [ POSSESSUM nonpossessive,
                                      VAL.SPR < >,
                                      HEAD noun &
                                           [ POSSESSOR nonpossessive,
                                             CASE obl,
                                             PRON - ] ] ] ].

choices.txt

emilymbender commented 2 years ago

Ah, the thing is that the poss-phrase-1 has to be in the sentence for the problem to show up. So, try: "n1 n1 iv".

olzama commented 2 years ago

Ah, I see, thank you, Emily.

OK @ltxom , then your minimal example is:

1) Use the choices file obtained as outlined here: https://github.com/delph-in/matrix/issues/632#issuecomment-1117163124 2) Use the string n1 n1 iv as the test sentence (test suite). 3) The desired result is one tree, with underspecified SF value in the MRS 4) The bad result would be two trees, of which one is a question [SF ques]

Let me know if you have questions.

ltxom commented 2 years ago

Thank you so much, @olzama @emilymbender ! I could reproduce the example and see the bad result with two trees. I will investigate more on the libraries and come up with solutions.

emilymbender commented 5 months ago

@Diana-BZ This one would be a good target for fixing! (I just hit it again in 567...)

Diana-BZ commented 5 months ago

I'm trying to add a regression test for this. Can you please give me an example of a poss-phrase passing up the NON-LOCAL features in binary phrases?

Hi @ltxom! Is there already a regression test added for this issue? If so, do you know what the name of it is?