From e978beccc25adfa65ece7bd18b5f98cbf952fa37 Mon Sep 17 00:00:00 2001 From: Sofie Van Landeghem Date: Tue, 14 Mar 2023 21:07:04 +0100 Subject: [PATCH] Small rewrite --- spacy/pipeline/entity_linker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/pipeline/entity_linker.py b/spacy/pipeline/entity_linker.py index 549a281e2..76ccc3247 100644 --- a/spacy/pipeline/entity_linker.py +++ b/spacy/pipeline/entity_linker.py @@ -480,7 +480,7 @@ class EntityLinker(TrainablePipe): sentences.index(sents[0]), sentences.index(sents[-1]), ) - assert sent_indices[-1] >= sent_indices[0] >= 0 + assert sent_indices[1] >= sent_indices[0] >= 0 if self.incl_context: # get n_neighbour sentences, clipped to the length of the document