Skip to content
This repository has been archived by the owner on Oct 14, 2022. It is now read-only.

Ignore MRSs that cannot be converted #3

Closed
goodmami opened this issue Sep 25, 2020 · 0 comments · Fixed by delph-in/pydelphin#353
Closed

Ignore MRSs that cannot be converted #3

goodmami opened this issue Sep 25, 2020 · 0 comments · Fixed by delph-in/pydelphin#353
Labels
enhancement New feature or request

Comments

@goodmami
Copy link
Member

From delph-in/pydelphin#319 and the related discussion on the developers-list, this issue is for improving robustness for MRSs that cannot be converted to EDS. The conversion happens here, but it would probably be easier to replace the from_mrs() calls with a custom, locally defined function that checks for conversion errors. Since skipping faulty items can make the score look better than it is, these should raise warnings, and maybe be optional. E.g.,

def eds_from_mrs(m: MRS, skip_on_errors=False) -> EDS:
    try:
        e = from_mrs(m, predicate_modifiers=True)
    except Exception:
        if skip_on_errors:
            warnings.warn(...)
            e = None
        else:
            raise
    return e

The Exception should really be EDSError but, as seen in the linked PyDelphin issue, conversion errors are not reliably EDSErrors.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant