mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-21 17:41:59 +03:00
Simplify doc loop in predict().
This commit is contained in:
parent
2c80db9371
commit
d1371d1043
|
@ -448,11 +448,10 @@ class EntityLinker(TrainablePipe):
|
|||
],
|
||||
)
|
||||
for doc in docs
|
||||
if len(doc) and len(doc.ents)
|
||||
),
|
||||
)
|
||||
|
||||
for doc_idx, doc in enumerate(docs):
|
||||
for doc in docs:
|
||||
doc_ents: List[Ints1d] = []
|
||||
doc_scores: List[Floats1d] = []
|
||||
if len(doc) == 0 or len(doc.ents) == 0:
|
||||
|
|
Loading…
Reference in New Issue
Block a user