allenai / scispacy

A full spaCy pipeline and models for scientific/biomedical documents.
https://allenai.github.io/scispacy/
Apache License 2.0
1.72k stars 229 forks source link

Can't find factory for 'scispacy_linker' for language English #405

Closed zhanyuanucb closed 3 years ago

zhanyuanucb commented 3 years ago

Describe the bug ValueError: [E002] Can't find factory for 'scispacy_linker' for language English occurs if one doesn't import scispacy.linking

To Reproduce Steps to reproduce the behavior:

import spacy

lang_model = "en_core_sci_sm"
nlp = spacy.load(lang_model)
nlp.add_pipe("scispacy_linker",
             config={"resolve_abbreviations": True,
                     "linker_name": "umls"})

Environment (please complete the following information):

dakinggg commented 3 years ago

This is the expected behavior, the import statement is necessary.