-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
$nodeA->precedes($nodeB) currently works only if both nodes are from the same tree. We could extend it, so it first checks whether $nodeA->bundle->number <=> $nodeB->bundle->number.
PRO: This could be useful in coreference handling etc. The current behavior of precedes with nodes from different trees is wrong (it should at least throw an exception).
CON: It will slow down slightly the most common use case - ordering within the same tree (but if super efficiency is needed, we can always use $nodeA->ord < $nodeB->ord).
NEUTRAL: What should we return if the two nodes are from different zones of the same bundle? An exception or just compare ord (and suppose the two zone have the same number of words, which is a possible use-case)?