Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mrs.is_isomorphic() fails for isomorphic graphs that are not well-formed MRSs #296

Closed
goodmami opened this issue Jun 28, 2020 · 2 comments
Closed
Labels
Milestone

Comments

@goodmami
Copy link
Member

This issue was originally discussed on the matrix-dev mailing list for a failure in the Matrix regression test for neg-mod-mod.

The mrs.is_isomorphic() function implements VF2 but only seems to consider connected graphs.

>>> from delphin import mrs
>>> from delphin.codecs import simplemrs
>>> m = simplemrs.decode('[ TOP: h0 INDEX: e2 RELS: < [ _rain_v_1 LBL: h3 ARG0: e4 ] > HCONS: < h0 qeq h1 > ]')
>>> mrs.is_isomorphic(m, m)
False

Isomorphism should be separate from MRS well-formedness criteria (as much as possible).

@goodmami goodmami added the bug label Jun 28, 2020
@arademaker
Copy link
Member

What is the definition of MRS isomorphism? What are applications for it? The structural similarity can be consider a proxy to the meaning equivalence?

@goodmami
Copy link
Member Author

I don't think there's a published and authoritative definition for MRS, but you can see section 5.3.2 in my dissertation for some background. But basically graph isomorphism means that two MRSs are exactly equivalent, even if things like the variable forms or EP order on the RELS list differ.

@goodmami goodmami added this to the v1.3.0 milestone Jul 1, 2020
goodmami added a commit that referenced this issue Jul 1, 2020
The semi-VF2 algorithm in delphin.util was completely rewritten
following an academic paper description more closely. It's still not
exactly the same, but at least now it works with disconnected graphs
and is still fast enough for the pathological cases.

Fixes #296
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants