mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-19 20:52:23 +03:00
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:
parent
865caedebd
commit
251a5b43ac
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user