delph-in / matrix

The Grammar Matrix

Home Page:https://matrix.ling.washington.edu/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Validate for verb types & supertypes both indicating valence.

emilymbender opened this issue · comments

The attached choices file gives a grammar that won't load into the LKB because of a redundancy in the type hierarchy:

Redundancy involving VERB3-VERB-LEX
While evaluating the form starting at line 41, column 0
of VERB3-VERB-LEX: INTRANSITIVE-VERB-LEX is redundant - it is an ancestor of VERB1-VERB-LEX o

Easiest fix is probably to validate for this scenario:

  verb1_valence=intrans
    verb1_stem1_orth=iv
    verb1_stem1_pred=_iv_v_rel
  verb2_valence=trans
    verb2_stem1_orth=tv
    verb2_stem1_pred=_tv_v_rel
  verb3_supertypes=verb1
  verb3_valence=intrans
    verb3_stem1_orth=test
    verb3_stem1_pred=_test_v_rel
commented

Here's my findings to this issue:

The problem is that verb3 has redundant valence value 'intrans,' which leads to an incorrect TDL as:

verb1-verb-lex := intransitive-verb-lex.
verb3-verb-lex := verb1-verb-lex & intransitive-verb-lex.

The problem will be the same if the inheritance has one or more inter-mediate instances as below:

  verb1_valence=intrans
    verb1_stem1_orth=iv
    verb1_stem1_pred=_iv_v_rel
  verb3_supertypes=verb1
    verb3_stem1_orth=test
    verb3_stem1_pred=_test_v_rel
  verb4_supertypes=verb3
  verb4_valence=intrans
    verb3_stem1_orth=test2
    verb3_stem1_pred=_test2_v_rel

TDL:
verb1-verb-lex := intransitive-verb-lex.
verb3-verb-lex := verb1-verb-lex.
verb4-verb-lex := verb3-verb-lex & intransitive-verb-lex.

I want to consult a question before working on it:
Since only verbs have argument structures (valence), can Matrix create other POS (noun, adv, det) that exhibit similar issues with inheritance hierarchy? I guess there could be something to do with CASE, something like:

noun1-noun-lex := some-case-noun-lex.
noun2-noun-lex := noun1-noun-lex & some-case-noun-lex.
commented

Update:

I just tried the scenario in previous reply with:

    noun1_feat1_name=case
    noun1_feat1_value=erg
  noun1_det=imp
    noun1_stem1_orth=n1
    noun1_stem1_pred=_n1_n_rel
  noun2_det=imp
    noun2_stem1_orth=n2
    noun2_stem1_pred=_n2_n_rel
  noun3_supertypes=noun1
    noun3_feat1_name=case
    noun3_feat1_value=erg

It turns out Matrix generates a legit TDL with:

noun1-noun-lex := noun-lex &
  [ SYNSEM.LOCAL.CAT.HEAD.CASE erg ].

noun2-noun-lex := noun-lex.

noun3-noun-lex := noun1-noun-lex &
  [ SYNSEM.LOCAL.CAT.HEAD.CASE erg ].
commented

Note from our meeting: validation should catch this error if a verb inherits another verb and has valence.

Show a question mark to warn the user of other duplicated features (maybe different values) with inheritance hierarchy.
Example:

  • noun2 (with case abs) inherits noun1 (with case erg), which leads to a crashed grammar.
  • noun2 (with case abs) inherits noun1 (with read-case), which leads to a legit grammar.
commented

Show a question mark to warn the user of other duplicated features (maybe different values) with inheritance hierarchy.

I just found above validation warnings are already implemented: https://github.com/delph-in/matrix/blob/trunk/gmcs/linglib/lexicon.py#L259-L262

But it only verifies for nouns. Should we also test for other POS?

If it was already validating for nouns, were you getting the crashing grammar above because they're just warnings, maybe?

But yes, this should be implemented for other parts of speech, too.

commented

Yes, they are just warnings.

It seems the functionality to check inherited duplicated features is tangled with only 'det' and 'noun' POS, so I will probably pull out this functionality to check for other POS.

commented

This issue can be closed :)