Closed goodmami closed 3 years ago
Good to know that this issue can crop up. Generally, I'm not sure you'd want to modify a graph with existing surface alignments. At least you'd have to be very careful doing that.
The one use case I can think of is adding the :wiki
tags, to graphs. This is something that might be done as post-processing, so if adding a :wiki
will cause errors, that might cause some headaches. Still, I'm guessing that for most people it wouldn't be an issue.
Just FYI that I have processed a large portion of the aligned LDC2020T02 (AMR 3.0) graphs through penman.decode(x) and haven't seen any errors when re-encoding them. Not sure if that confirms that, at least for this corpus, "we do not have a surface alignment after a full node"
Observe:
This is because we cannot have a surface alignment after a full node (
:ARG0 (b / beta)~1
is apparently illegal syntax in AMR, but I cannot find the reference for that point). Better would be to drop the alignment with a warning.This situation may turn up if someone is programmatically constructing graphs with alignments, or possibly when rearranging a graph that (validly) has an alignment on a reentrant variable.