Simplify doc loop in predict().

This commit is contained in:
Raphael Mitsch 2023-04-24 22:13:05 +02:00
parent 2c80db9371
commit d1371d1043

View File

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