Small rewrite

This commit is contained in:
Sofie Van Landeghem 2023-03-14 21:07:04 +01:00 committed by GitHub
parent fc0f954d9b
commit e978beccc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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