spaCy/website/docs/api
Raphael Mitsch 9340eb8ad2
Introduce hierarchy for EL Candidate objects (#12341)
* Convert Candidate from Cython to Python class.

* Format.

* Fix .entity_ typo in _add_activations() usage.

* Update spacy/kb/candidate.py

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>

* Update doc string of BaseCandidate.__init__().

* Update spacy/kb/candidate.py

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>

* Rename Candidate to InMemoryCandidate, BaseCandidate to Candidate.

* Adjust Candidate to support and mandate numerical entity IDs.

* Format.

* Fix docstring and docs.

* Update website/docs/api/kb.mdx

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>

* Rename alias -> mention.

* Refactor Candidate attribute names. Update docs and tests accordingly.

* Refacor Candidate attributes and their usage.

* Format.

* Fix mypy error.

* Update error code in line with v4 convention.

* Update spacy/kb/candidate.py

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>

* Updated error code.

* Simplify interface for int/str representations.

* Update website/docs/api/kb.mdx

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>

* Rename 'alias' to 'mention'.

* Port Candidate and InMemoryCandidate to Cython.

* Remove redundant entry in setup.py.

* Add abstract class check.

* Drop storing mention.

* Update spacy/kb/candidate.pxd

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>

* Fix entity_id refactoring problems in docstrings.

* Drop unused InMemoryCandidate._entity_hash.

* Update docstrings.

* Move attributes out of Candidate.

* Partially fix alias/mention terminology usage. Convert Candidate to interface.

* Remove prior_prob from supported properties in Candidate. Introduce KnowledgeBase.supports_prior_probs().

* Update docstrings related to prior_prob.

* Update alias/mention usage in doc(strings).

* Update spacy/ml/models/entity_linker.py

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>

* Update spacy/ml/models/entity_linker.py

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>

* Mention -> alias renaming. Drop Candidate.mentions(). Drop InMemoryLookupKB.get_alias_candidates() from docs.

* Update docstrings.

* Fix InMemoryCandidate attribute names.

* Update spacy/kb/kb.pyx

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>

* Update spacy/ml/models/entity_linker.py

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>

* Update W401 test.

* Update spacy/errors.py

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>

* Update spacy/kb/kb.pyx

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>

* Use Candidate output type for toy generators in the test suite to mimick best practices

* fix docs

* fix import

---------

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2023-03-20 00:34:35 +01:00
..
architectures.mdx Merge branch 'master' into sync/master-into-v4 2023-03-02 16:24:15 +01:00
attributeruler.mdx Merge branch 'copy_master' into copy_v4 2023-01-11 18:40:55 +01:00
attributes.mdx Website migration from Gatsby to Next (#12058) 2023-01-11 17:30:07 +01:00
cli.mdx Merge branch 'master' into sync/master-into-v4 2023-03-02 16:24:15 +01:00
coref.mdx Website migration from Gatsby to Next (#12058) 2023-01-11 17:30:07 +01:00
corpus.mdx Add spacy.PlainTextCorpusReader.v1 (#12122) 2023-01-26 11:33:22 +01:00
cython-classes.mdx Refactor lexeme mem passing (#12125) 2023-01-25 12:50:21 +09:00
cython-structs.mdx Website migration from Gatsby to Next (#12058) 2023-01-11 17:30:07 +01:00
cython.mdx Website migration from Gatsby to Next (#12058) 2023-01-11 17:30:07 +01:00
data-formats.mdx Website migration from Gatsby to Next (#12058) 2023-01-11 17:30:07 +01:00
dependencymatcher.mdx Add new tags in docs for #12334 (#12348) 2023-03-01 10:46:13 +01:00
dependencyparser.mdx Add Language.distill (#12116) 2023-01-30 12:44:11 +01:00
doc.mdx Return Tuple[Span] for all Doc/Span attrs that provide spans (#12288) 2023-03-01 16:00:02 +01:00
docbin.mdx Website migration from Gatsby to Next (#12058) 2023-01-11 17:30:07 +01:00
edittreelemmatizer.mdx Add Language.distill (#12116) 2023-01-30 12:44:11 +01:00
entitylinker.mdx Merge branch 'master' into sync/master-into-v4 2023-03-02 16:24:15 +01:00
entityrecognizer.mdx Add Language.distill (#12116) 2023-01-30 12:44:11 +01:00
entityruler.mdx Merge branch 'copy_master' into copy_v4 2023-01-11 18:40:55 +01:00
example.mdx Website migration from Gatsby to Next (#12058) 2023-01-11 17:30:07 +01:00
index.mdx Website migration from Gatsby to Next (#12058) 2023-01-11 17:30:07 +01:00
inmemorylookupkb.mdx Introduce hierarchy for EL Candidate objects (#12341) 2023-03-20 00:34:35 +01:00
kb.mdx Introduce hierarchy for EL Candidate objects (#12341) 2023-03-20 00:34:35 +01:00
language.mdx Add Language.distill (#12116) 2023-01-30 12:44:11 +01:00
legacy.mdx Merge the parser refactor into v4 (#10940) 2023-01-18 11:27:45 +01:00
lemmatizer.mdx Website migration from Gatsby to Next (#12058) 2023-01-11 17:30:07 +01:00
lexeme.mdx Merge branch 'copy_master' into copy_v4 2023-01-11 18:40:55 +01:00
lookups.mdx Website migration from Gatsby to Next (#12058) 2023-01-11 17:30:07 +01:00
matcher.mdx Merge branch 'copy_master' into copy_v4 2023-01-11 18:40:55 +01:00
morphologizer.mdx Cleanup/remove backwards compat overwrite settings (#11888) 2023-02-02 14:13:38 +01:00
morphology.mdx Website migration from Gatsby to Next (#12058) 2023-01-11 17:30:07 +01:00
phrasematcher.mdx Merge branch 'copy_master' into copy_v4 2023-01-11 18:40:55 +01:00
pipe.mdx Add Language.distill (#12116) 2023-01-30 12:44:11 +01:00
pipeline-functions.mdx Website migration from Gatsby to Next (#12058) 2023-01-11 17:30:07 +01:00
scorer.mdx Rename language codes (Icelandic, multi-language) (#12149) 2023-01-31 17:30:43 +01:00
sentencerecognizer.mdx Add Language.distill (#12116) 2023-01-30 12:44:11 +01:00
sentencizer.mdx Website migration from Gatsby to Next (#12058) 2023-01-11 17:30:07 +01:00
span-resolver.mdx Website migration from Gatsby to Next (#12058) 2023-01-11 17:30:07 +01:00
span.mdx Return Tuple[Span] for all Doc/Span attrs that provide spans (#12288) 2023-03-01 16:00:02 +01:00
spancategorizer.mdx Merge branch 'copy_master' into copy_v4 2023-01-11 18:40:55 +01:00
spangroup.mdx Website migration from Gatsby to Next (#12058) 2023-01-11 17:30:07 +01:00
spanruler.mdx Merge branch 'copy_master' into copy_v4 2023-01-11 18:40:55 +01:00
stringstore.mdx fix anchors (#12095) 2023-01-13 11:14:58 +01:00
tagger.mdx Add Language.distill (#12116) 2023-01-30 12:44:11 +01:00
textcategorizer.mdx Merge branch 'copy_master' into copy_v4 2023-01-11 18:40:55 +01:00
tok2vec.mdx Tok2Vec: Add distill method (#12108) 2023-03-09 09:37:19 +01:00
token.mdx Merge branch 'copy_master' into copy_v4 2023-01-11 18:40:55 +01:00
tokenizer.mdx Website migration from Gatsby to Next (#12058) 2023-01-11 17:30:07 +01:00
top-level.mdx Merge branch 'master' into sync/master-into-v4 2023-03-02 16:24:15 +01:00
transformer.mdx Website migration from Gatsby to Next (#12058) 2023-01-11 17:30:07 +01:00
vectors.mdx Remove names for vectors (#12243) 2023-02-08 14:37:42 +01:00
vocab.mdx Clean up Vocab constructor (#12290) 2023-03-19 23:41:20 +01:00