diff --git a/spacy/pipeline/entity_linker.py b/spacy/pipeline/entity_linker.py index 286b6b45f..6fe322b62 100644 --- a/spacy/pipeline/entity_linker.py +++ b/spacy/pipeline/entity_linker.py @@ -123,8 +123,7 @@ def make_entity_linker( from spacy_legacy.components.entity_linker import EntityLinker_v1 except: raise ImportError( - """In order to use v1 of the EntityLinker, you must use - spacy-legacy>=3.0.12.""" + "In order to use v1 of the EntityLinker, you must use spacy-legacy>=3.0.12." ) # The only difference in arguments here is that use_gold_ents and threshold aren't available. return EntityLinker_v1( diff --git a/spacy/tests/pipeline/test_entity_linker.py b/spacy/tests/pipeline/test_entity_linker.py index 5ddf4cac8..506530591 100644 --- a/spacy/tests/pipeline/test_entity_linker.py +++ b/spacy/tests/pipeline/test_entity_linker.py @@ -20,8 +20,6 @@ from spacy.training import Example from spacy.util import ensure_path from spacy.vocab import Vocab -from spacy_legacy.components.entity_linker import EntityLinker_v1 - @pytest.fixture def nlp(): @@ -998,6 +996,8 @@ def test_scorer_links(): ) # fmt: on def test_legacy_architectures(name, config): + from spacy_legacy.components.entity_linker import EntityLinker_v1 + # Ensure that the legacy architectures still work vector_length = 3 nlp = English()