From 4f377d8de8521c78c3fb922b835d307aad60692b Mon Sep 17 00:00:00 2001 From: Paul O'Leary McCann Date: Mon, 28 Jun 2021 18:20:33 +0900 Subject: [PATCH] Fix bug in crossing span detection --- spacy/ml/models/coref_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/ml/models/coref_util.py b/spacy/ml/models/coref_util.py index 4725863f7..56b238c2f 100644 --- a/spacy/ml/models/coref_util.py +++ b/spacy/ml/models/coref_util.py @@ -181,7 +181,7 @@ def select_non_crossing_spans( if end > max_end: start_to_max_end[start] = end min_start = end_to_min_start.get(end, -1) - if start == -1 or start < min_start: + if min_start == -1 or start < min_start: end_to_min_start[end] = start # sort idxs by order in doc