mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-07 13:44:55 +03:00
Format.
This commit is contained in:
parent
db73aedf51
commit
8c88543c0c
|
@ -484,13 +484,10 @@ class EntityLinker(TrainablePipe):
|
||||||
# 2. "8 was beautiful"
|
# 2. "8 was beautiful"
|
||||||
# This makes it tricky to receive the last sentence by indexing doc.sents - hence we use an offset
|
# This makes it tricky to receive the last sentence by indexing doc.sents - hence we use an offset
|
||||||
# to determine sent_indices[1].
|
# to determine sent_indices[1].
|
||||||
if len(sents) > 1:
|
|
||||||
sent_indices = (
|
sent_indices = (
|
||||||
sentences.index(sents[0]),
|
sentences.index(sents[0]),
|
||||||
sentences.index(sents[0]) + len(sents) - 1,
|
sentences.index(sents[0]) + len(sents) - 1,
|
||||||
)
|
) if len(sents) > 1 else (
|
||||||
else:
|
|
||||||
sent_indices = (
|
|
||||||
sentences.index(ent.sent),
|
sentences.index(ent.sent),
|
||||||
sentences.index(ent.sent),
|
sentences.index(ent.sent),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user