spaCy/spacy/ml/models
Raphael Mitsch 3102e2e27a
Entity linking: use SpanGroup instead of Iterable[Span] for mentions (#12344)
* Convert Candidate from Cython to Python class.

* Format.

* Fix .entity_ typo in _add_activations() usage.

* Change type for mentions to look up entity candidates for to SpanGroup from Iterable[Span].

* Update docs.

* 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.

* Reverse erroneous changes during merge.

* Update return type in EL tests.

* Re-add Candidate to setup.py.

* Format updated docs.

---------

Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
2023-03-20 12:25:18 +01:00
..
__init__.py Tidy up code 2021-06-28 12:08:15 +02:00
entity_linker.py Entity linking: use SpanGroup instead of Iterable[Span] for mentions (#12344) 2023-03-20 12:25:18 +01:00
multi_task.py Auto-format code with black (#10209) 2022-02-06 16:30:30 +01:00
parser.py Drop python 3.6/3.7, remove unneeded compat (#12187) 2023-01-27 15:48:20 +01:00
spancat.py 🏷 Add Mypy check to CI and ignore all existing Mypy errors (#9167) 2021-10-14 15:21:40 +02:00
tagger.py Tagger: use unnormalized probabilities for inference (#10197) 2022-03-15 14:15:31 +01:00
textcat.py Fix issues for Mypy 0.950 and Pydantic 1.9.0 (#10786) 2022-05-25 09:33:54 +02:00
tok2vec.py Make stable private modules public and adjust names (#11353) 2022-08-30 13:56:35 +02:00