-
Notifications
You must be signed in to change notification settings - Fork 26
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
Decoding error #17
Comments
Hi, thanks for the bug report. I'm having trouble reproducing. Can you fill in a few details:
I'm finding that the problem is the hyphen in the concept rather than the underscore in the relation. Sometimes the error messages from the penman module don't accurately point to the source of the error. Here is what I see, both in the development version and release v0.6.1. First, with AMRCodec: >>> penman.AMRCodec().decode('(a / blah :null_edge (x20 / 876-9))')
Traceback (most recent call last):
[...]
penman.DecodeError: Expected ":" or "/" at position 31
>>> penman.AMRCodec().decode('(a / blah :null-edge (x20 / 876-9))')
Traceback (most recent call last):
[...]
penman.DecodeError: Expected ":" or "/" at position 31
>>> penman.AMRCodec().decode('(a / blah :null_edge (x20 / 8769))')
<Graph object (top=a) at 140002126592336> Then with the default codec: >>> penman.decode('(a / blah :null_edge (x20 / 876-9))')
Traceback (most recent call last):
[...]
penman.DecodeError: Expected ":" or "/" at position 31
>>> penman.decode('(a / blah :null-edge (x20 / 876-9))')
Traceback (most recent call last):
[...]
penman.DecodeError: Expected ":" or "/" at position 31
>>> penman.decode('(a / blah :null_edge (x20 / 8769))')
<Graph object (top=a) at 140002126592208> I would expect the original graph to parse with the default codec. Investigating this allowed me to see a possible bug in the AMRCodec, though, that is overly restrictive on concept parsing. |
I believe this is fixed in the latest develop version. It fixes parsing of |
DecodeError: Expected: LPAREN here is text where it thows error: DART ("Data Access for Responsible Testing") |
Hi @riyajatar37003, please open a new issue with a minimal working example, including the exact string you're trying to parse. |
I am running penman with output from an AMR parser. It outputs ":null_edge (x20 / 876-9))))))"
Hence, penman cannot decode it because of the relation "null_edge".
I replace the underscore with a minus then it can be solved.
I am not sure whether "null_edge" violates the annotation of penman or the decoder can not recognize this pattern?
Many thanks
The text was updated successfully, but these errors were encountered: