'entity_linker' instead of 'el'

This commit is contained in:
svlandeg 2019-03-22 13:55:10 +01:00
parent ec3e860b44
commit 5318ce88fa
3 changed files with 4 additions and 4 deletions

View File

@ -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"]:

View File

@ -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):

View File

@ -1059,7 +1059,7 @@ cdef class EntityRecognizer(Parser):
class EntityLinker(Pipe):
name = 'el'
name = 'entity_linker'
@classmethod
def Model(cls, nr_class=1, **cfg):