Skip to content

Commit

Permalink
allow for scorer to be None
Browse files Browse the repository at this point in the history
  • Loading branch information
svlandeg committed Apr 2, 2024
1 parent d7a250d commit 98747de
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spacy/pipeline/entity_linker.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ def __init__(
def _score_with_ents_set(examples: Iterable[Example], **kwargs):
# Because of how spaCy works, we can't just score immediately, because Language.evaluate
# calls pipe() on the predicted docs, which won't have entities if there is no NER in the pipeline.
if not scorer:
return scorer
if not self.use_gold_ents:
return scorer(examples, **kwargs)
else:
Expand Down

0 comments on commit 98747de

Please sign in to comment.