delph-in / matrix

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

Fix issue #621 #642

Closed ltxom closed 2 years ago

ltxom commented 2 years ago

Here are my findings and solutions in this PR:

  1. When I create lexical entries for the verbs with a disjunctive case value for one of their arguments, Matrix can save the disjunctive case into TDLHierarchy object and myland.tdl properly. However, in the adnominal possession library (as in issue #621 ), Matrix saves the case type into TDLHierarchy object but not into myland.tdl.

This is because Matrix saves case hierarchy into mylang.tdl too soon in case.py, it should wait until the adnominal possession library is loaded.

  1. In tdlhierarchy.py, the supers case value is always [self.name], which is "case."

However, the "real-case" can be created as an intermediate case type for all real cases for possessive strategy. If the "real-case" exists, it should be the supertype (instead of "case") of the new_type.

  1. If "real-case" is necessary, Matrix can create it multiple times and save them into TDLHierarchy object., which has been simplified by only saving one "real-case", "case" relation.

  2. I also created a new regression test named "adnom-poss-disjunctive-case," the choice of it comes from Emily's post in issue #621. Before this PR, it failed to compile (because of the missing non-abs disjunctive case in mylang.tdl), and it can compile and parse test sentences after these fixes.

  3. All other regression tests are passed after these fixes:

    ************* SUMMARY *************
    Passed  517/528 tests
    Failed    0/528 tests
    Errors    0/528 tests
    Skipped  11/528 tests (run rtest.py --list --skipped --verbose for more info)
olzama commented 2 years ago

The code changes look clear!

emilymbender commented 2 years ago

Thank you, @ltxom --- I'm merging this now.