Closed lukecyu closed 3 years ago
Thanks for the report. The issue is duplicate edges. These have given me problems in the past (see #34, #35).
To create a more minimal example:
(c / company
:ARG0-of (i / insure-02)
:ARG0-of i))
The (i, ARG0, c)
triple appears twice here. When you serialize it again, the layout engine writes it this way:
(c / company
:ARG0-of (i / insure-02)
:ARG0 c))
This is because epigraph markers like Push and Pop are indexed by their triple, so the two duplicate triples are conflated here. Parsing this new graph then gives you the odd situation where the triple (i, ARG0, c)
appears both inverted and in regular orientation. This breaks an assumption in the code and results in the error you saw.
I believe these duplicated edges are bad, so probably the best option is to prune them out when reading the tree from the string, even though I'm not fond of altering the graph at all.
This data is from amr_3.0
When I using penman to deal with this file (named f below)
result:
Find that in g2, POP occurs more than PUSH, but no problem with g (origin file)
(edited for formatting)