mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-02 19:30:19 +03:00
allow for scorer to be None
This commit is contained in:
parent
d7a250d994
commit
98747de62b
|
@ -244,6 +244,8 @@ class EntityLinker(TrainablePipe):
|
|||
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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user