mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-20 17:11:58 +03:00
Format.
This commit is contained in:
parent
645b525a08
commit
25bce73461
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user