This commit is contained in:
Raphael Mitsch 2023-03-10 14:08:21 +01:00
parent d851b3656d
commit 64191755b6

View File

@ -484,7 +484,10 @@ class EntityLinker(TrainablePipe):
# 2. "8 was beautiful"
# This makes it tricky to receive the last sentence by indexing doc.sents - hence we use an offset
# to determine sent_indices[1].
sent_indices = (sentences.index(sents[0]), sentences.index(sents[0]) + len(sents) - 1)
sent_indices = (
sentences.index(sents[0]),
sentences.index(sents[0]) + len(sents) - 1,
)
assert all([si >= 0 for si in sent_indices])
if self.incl_context: