diff --git a/spacy/pipeline/spancat.py b/spacy/pipeline/spancat.py index 3a32b4e7a..0a1caef90 100644 --- a/spacy/pipeline/spancat.py +++ b/spacy/pipeline/spancat.py @@ -490,7 +490,6 @@ class SpanCategorizer(TrainablePipe): offset = 0 for i, doc in enumerate(docs): indices_i = indices[i].dataXd - allow_overlap = self.cfg["allow_overlap"] allow_overlap = cast(bool, self.cfg["allow_overlap"]) if self.cfg["max_positive"] == 1: doc.spans[self.key] = self._make_span_group_singlelabel( diff --git a/spacy/tests/pipeline/test_spancat.py b/spacy/tests/pipeline/test_spancat.py index 2694c01f4..cf6304042 100644 --- a/spacy/tests/pipeline/test_spancat.py +++ b/spacy/tests/pipeline/test_spancat.py @@ -493,7 +493,7 @@ def test_overfitting_IO_overlapping(): @pytest.mark.parametrize("name", SPANCAT_COMPONENTS) def test_zero_suggestions(name): - # Test with a suggester that returns 0 suggestions + # Test with a suggester that can return 0 suggestions @registry.misc("test_mixed_zero_suggester") def make_mixed_zero_suggester(): def mixed_zero_suggester(docs, *, ops=None):