Open nschneid opened 6 years ago
FWIW in Penman I decided to treat both :domain
and :mod
as primary (non-inverse) roles. This is following @ulfulf's advice in #194
All roles listed at http://www.isi.edu/~ulf/amr/lib/roles.html are primary (i.e. non-inverse) roles [...]
Thus, :domain-of
is the inverse of :domain
and :mod-of
is the inverse of :mod
. In order to resolve the idea described in the Guidelines that the inverse of :domain
is :mod
and vice-versa, I now have a penman.transform.canonicalize_roles()
function that normalizes :domain-of
to :mod
and :mod-of
to :domain
, but this step is optional.
This method allows both :domain
and :mod
to links variables with constants, however such edges cannot be inverted as the source of a relation must always be a variable.
From my point of view this issue can be closed. If anything, the Guidelines can be updated to more carefully describe how :domain
and :mod
can be inverses of the other.
The rule for figure references involves putting a string under
:mod
:Similarly, a number for table references:
As raised by https://github.com/goodmami/penman/issues/19#issuecomment-412642623, this breaks code which assumes that all
:mod
relations are the inverse of:domain
, which suggests that they will only link variables, not a variable and a constant (string or number).So: Should
VARIABLE :mod CONSTANT
not be considered equivalent toVARIABLE :domain-of CONSTANT
? I.e. is this an exception where:mod
has no inverse? Or should we assume that a:domain
relation can be headed by a constant?Or, should we change the guideline for references to treat the figure/table as a named entity, thus putting the constant under
name :op1
rather than:mod
?Related: #194, https://github.com/snowblink14/smatch/issues/10