mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 10:46:29 +03:00
'entity_linker' instead of 'el'
This commit is contained in:
parent
ec3e860b44
commit
5318ce88fa
|
@ -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"]:
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -1059,7 +1059,7 @@ cdef class EntityRecognizer(Parser):
|
|||
|
||||
|
||||
class EntityLinker(Pipe):
|
||||
name = 'el'
|
||||
name = 'entity_linker'
|
||||
|
||||
@classmethod
|
||||
def Model(cls, nr_class=1, **cfg):
|
||||
|
|
Loading…
Reference in New Issue
Block a user