Closed nschneid closed 12 years ago
Solution: the Quant
class as a wrapper. Quant(x)==Quant(x)==x
, but Quant(x) is not Quant(x)
and Quant(x) is not x
. pipeline.ensure_quant()
takes an iterable of tuples and ensures that any int
or float
on the RHS of a triple is wrapped.
This causes problems because items are checked against one another using identity, so if it sees the same quantity in two places it treats them as the same node. For instance,
make_rooted_amr()
will invert one of the edges going into the quantity.