From 25bce7346110f266979181c0846e6c37b6c67e90 Mon Sep 17 00:00:00 2001 From: Raphael Mitsch Date: Fri, 28 Jul 2023 12:56:45 +0200 Subject: [PATCH] Format. --- spacy/pipeline/entity_linker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spacy/pipeline/entity_linker.py b/spacy/pipeline/entity_linker.py index 3d2ba22f1..c8f088820 100644 --- a/spacy/pipeline/entity_linker.py +++ b/spacy/pipeline/entity_linker.py @@ -485,7 +485,9 @@ class EntityLinker(TrainablePipe): if self.incl_context: # get n_neighbour sentences, clipped to the length of the document start_sentence = max(0, sent_indices[0] - self.n_sents) - end_sentence = min(len(sentences) - 1, sent_indices[1] + self.n_sents) + end_sentence = min( + len(sentences) - 1, sent_indices[1] + self.n_sents + ) start_token = sentences[start_sentence].start end_token = sentences[end_sentence].end sent_doc = doc[start_token:end_token].as_doc()