Minor fix in crossing spans code

I think this was technically incorrect but harmless. The reason the code
here is different than the reference in coref-hoi is that the indices
there are such that they get +1 at the end of processing, while the code
here handles indices directly.
This commit is contained in:
Paul O'Leary McCann 2021-07-03 18:41:46 +09:00
parent 865caedebd
commit 251a5b43ac

View File

@ -162,7 +162,7 @@ def select_non_crossing_spans(
start, end = starts[idx], ends[idx]
cross = False
for ti in range(start, end + 1):
for ti in range(start, end):
max_end = start_to_max_end.get(ti, -1)
if ti > start and max_end > end:
cross = True