From e9037d8fc0d001087c4d0463ee876af06349d028 Mon Sep 17 00:00:00 2001 From: Sofie Van Landeghem Date: Thu, 6 May 2021 10:14:47 +0200 Subject: [PATCH] make EntityLinker robust for nO=None (#7930) --- spacy/ml/models/entity_linker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/ml/models/entity_linker.py b/spacy/ml/models/entity_linker.py index 21e1c53b9..99bb85f32 100644 --- a/spacy/ml/models/entity_linker.py +++ b/spacy/ml/models/entity_linker.py @@ -11,7 +11,7 @@ from ...vocab import Vocab @registry.architectures("spacy.EntityLinker.v1") def build_nel_encoder(tok2vec: Model, nO: Optional[int] = None) -> Model: with Model.define_operators({">>": chain, "**": clone}): - token_width = tok2vec.get_dim("nO") + token_width = tok2vec.maybe_get_dim("nO") output_layer = Linear(nO=nO, nI=token_width) model = ( tok2vec