From af3fa670d461f9e0f9d4a1ef5b6794b81c75e080 Mon Sep 17 00:00:00 2001 From: kadarakos Date: Mon, 20 Feb 2023 11:36:32 +0100 Subject: [PATCH 1/2] Update spacy/tests/pipeline/test_spancat.py Co-authored-by: Adriane Boyd --- spacy/tests/pipeline/test_spancat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): From 43d5cab2c2f2c6b2a549b00c825ef6c3748463fd Mon Sep 17 00:00:00 2001 From: kadarakos Date: Mon, 20 Feb 2023 11:37:51 +0100 Subject: [PATCH 2/2] Update spacy/pipeline/spancat.py Co-authored-by: Adriane Boyd --- spacy/pipeline/spancat.py | 1 - 1 file changed, 1 deletion(-) diff --git a/spacy/pipeline/spancat.py b/spacy/pipeline/spancat.py index 1de51bb09..3d2f8def5 100644 --- a/spacy/pipeline/spancat.py +++ b/spacy/pipeline/spancat.py @@ -496,7 +496,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(