mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-30 01:50:03 +03:00
Suggestions from code review
This commit is contained in:
parent
82f1e20c4a
commit
8ee1ae0b99
|
@ -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(
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user