From 5318ce88faea0e1f748410103d7b5513b344516f Mon Sep 17 00:00:00 2001 From: svlandeg Date: Fri, 22 Mar 2019 13:55:10 +0100 Subject: [PATCH] 'entity_linker' instead of 'el' --- examples/pipeline/dummy_entity_linking.py | 2 +- spacy/language.py | 4 ++-- spacy/pipeline/pipes.pyx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/pipeline/dummy_entity_linking.py b/examples/pipeline/dummy_entity_linking.py index 43d17c481..3ffd8ae45 100644 --- a/examples/pipeline/dummy_entity_linking.py +++ b/examples/pipeline/dummy_entity_linking.py @@ -39,7 +39,7 @@ def create_kb(vocab): def add_el(kb, nlp): - el_pipe = nlp.create_pipe(name='el', config={"kb": kb}) + el_pipe = nlp.create_pipe(name='entity_linker', config={"kb": kb}) nlp.add_pipe(el_pipe, last=True) for alias in ["Douglas Adams", "Douglas"]: diff --git a/spacy/language.py b/spacy/language.py index 8206406b0..7c62a91b3 100644 --- a/spacy/language.py +++ b/spacy/language.py @@ -117,7 +117,7 @@ class Language(object): "tagger": lambda nlp, **cfg: Tagger(nlp.vocab, **cfg), "parser": lambda nlp, **cfg: DependencyParser(nlp.vocab, **cfg), "ner": lambda nlp, **cfg: EntityRecognizer(nlp.vocab, **cfg), - "el": lambda nlp, **cfg: EntityLinker(nlp.vocab, **cfg), + "entity_linker": lambda nlp, **cfg: EntityLinker(nlp.vocab, **cfg), "similarity": lambda nlp, **cfg: SimilarityHook(nlp.vocab, **cfg), "textcat": lambda nlp, **cfg: TextCategorizer(nlp.vocab, **cfg), "sentencizer": lambda nlp, **cfg: SentenceSegmenter(nlp.vocab, **cfg), @@ -215,7 +215,7 @@ class Language(object): @property def linker(self): - return self.get_pipe("el") + return self.get_pipe("entity_linker") @property def matcher(self): diff --git a/spacy/pipeline/pipes.pyx b/spacy/pipeline/pipes.pyx index 98ca9d76d..09334948d 100644 --- a/spacy/pipeline/pipes.pyx +++ b/spacy/pipeline/pipes.pyx @@ -1059,7 +1059,7 @@ cdef class EntityRecognizer(Parser): class EntityLinker(Pipe): - name = 'el' + name = 'entity_linker' @classmethod def Model(cls, nr_class=1, **cfg):