diff --git a/spacy/ml/models/coref_util.py b/spacy/ml/models/coref_util.py index e045ad31b..b0a632bd8 100644 --- a/spacy/ml/models/coref_util.py +++ b/spacy/ml/models/coref_util.py @@ -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