spaCy/spacy/pipeline
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
..
_edit_tree_internals Refactor error messages to remove hardcoded strings (#10729) 2022-05-02 13:38:46 +02:00
_parser_internals Merge the parser refactor into v4 (#10940) 2023-01-18 11:27:45 +01:00
__init__.py Replace EntityRuler with SpanRuler implementation (#11320) 2022-10-24 09:11:35 +02:00
attribute_ruler.py Make stable private modules public and adjust names (#11353) 2022-08-30 13:56:35 +02:00
dep_parser.py Merge the parser refactor into v4 (#10940) 2023-01-18 11:27:45 +01:00
edit_tree_lemmatizer.py Format 2023-01-27 08:29:46 +01:00
entity_linker.py Introduce hierarchy for EL Candidate objects (#12341) 2023-03-20 00:34:35 +01:00
entityruler.py Merge branch 'copy_master' into copy_v4 2023-01-11 18:40:55 +01:00
functions.py Add doc_cleaner component (#9659) 2021-11-23 15:33:33 +01:00
lemmatizer.py Merge remote-tracking branch 'upstream/master' into chore/update-develop-from-master-v3.2-1 2021-10-26 11:53:50 +02:00
morphologizer.pyx Cleanup/remove backwards compat overwrite settings (#11888) 2023-02-02 14:13:38 +01:00
ner.py Format 2023-01-27 08:29:46 +01:00
pipe.pxd TrainablePipe (#6213) 2020-10-08 21:33:49 +02:00
pipe.pyi Add Pipe.hide_labels to omit labels from pipeline meta (#10175) 2022-02-05 17:59:24 +01:00
pipe.pyx Add TrainablePipe.{distill,get_teacher_student_loss} (#12016) 2023-01-16 10:25:53 +01:00
sentencizer.pyx Cleanup/remove backwards compat overwrite settings (#11888) 2023-02-02 14:13:38 +01:00
senter.pyx Cleanup/remove backwards compat overwrite settings (#11888) 2023-02-02 14:13:38 +01:00
span_ruler.py Merge branch 'copy_master' into copy_v4 2023-01-11 18:40:55 +01:00
spancat.py Drop python 3.6/3.7, remove unneeded compat (#12187) 2023-01-27 15:48:20 +01:00
tagger.pyx Cleanup/remove backwards compat overwrite settings (#11888) 2023-02-02 14:13:38 +01:00
textcat_multilabel.py Merge branch 'copy_master' into copy_v4 2023-01-11 18:40:55 +01:00
textcat.py Merge branch 'copy_master' into copy_v4 2023-01-03 13:34:05 +01:00
tok2vec.py Tok2Vec: Add distill method (#12108) 2023-03-09 09:37:19 +01:00
trainable_pipe.pxd Store activations in Docs when save_activations is enabled (#11002) 2022-09-13 09:51:12 +02:00
trainable_pipe.pyx Add Language.distill (#12116) 2023-01-30 12:44:11 +01:00
transition_parser.pyx Reimplement distillation with oracle cut size (#12214) 2023-02-21 15:47:18 +01:00