mirror of https://github.com/explosion/spaCy.git
kb.get_candidates renamed to get_alias_candidates
This commit is contained in:
parent
592678fb7d
commit
08fd901a1b
|
@ -152,7 +152,7 @@ Get a list of all aliases in the knowledge base.
|
||||||
| ----------- | -------------------------------------------------------- |
|
| ----------- | -------------------------------------------------------- |
|
||||||
| **RETURNS** | The list of aliases in the knowledge base. ~~List[str]~~ |
|
| **RETURNS** | The list of aliases in the knowledge base. ~~List[str]~~ |
|
||||||
|
|
||||||
## KnowledgeBase.get_candidates {#get_candidates tag="method"}
|
## KnowledgeBase.get_alias_candidates {#get_alias_candidates tag="method"}
|
||||||
|
|
||||||
Given a certain textual mention as input, retrieve a list of candidate entities
|
Given a certain textual mention as input, retrieve a list of candidate entities
|
||||||
of type [`Candidate`](/api/kb/#candidate).
|
of type [`Candidate`](/api/kb/#candidate).
|
||||||
|
@ -160,13 +160,13 @@ of type [`Candidate`](/api/kb/#candidate).
|
||||||
> #### Example
|
> #### Example
|
||||||
>
|
>
|
||||||
> ```python
|
> ```python
|
||||||
> candidates = kb.get_candidates("Douglas")
|
> candidates = kb.get_alias_candidates("Douglas")
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Description |
|
||||||
| ----------- | ------------------------------------- |
|
| ----------- | ------------------------------------------------------------- |
|
||||||
| `alias` | The textual mention or alias. ~~str~~ |
|
| `alias` | The textual mention or alias. ~~str~~ |
|
||||||
| **RETURNS** | iterable | The list of relevant `Candidate` objects. ~~List[Candidate]~~ |
|
| **RETURNS** | The list of relevant `Candidate` objects. ~~List[Candidate]~~ |
|
||||||
|
|
||||||
## KnowledgeBase.get_vector {#get_vector tag="method"}
|
## KnowledgeBase.get_vector {#get_vector tag="method"}
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ certain prior probability.
|
||||||
|
|
||||||
Construct a `Candidate` object. Usually this constructor is not called directly,
|
Construct a `Candidate` object. Usually this constructor is not called directly,
|
||||||
but instead these objects are returned by the
|
but instead these objects are returned by the
|
||||||
[`get_candidates`](/api/kb#get_candidates) method of a `KnowledgeBase`.
|
`get_candidates` method of the [`entity_linker`](/api/entitylinker) pipe.
|
||||||
|
|
||||||
> #### Example
|
> #### Example
|
||||||
>
|
>
|
||||||
|
|
|
@ -603,6 +603,7 @@ Note that spaCy v3.0 now requires **Python 3.6+**.
|
||||||
| `GoldParse` | [`Example`](/api/example) |
|
| `GoldParse` | [`Example`](/api/example) |
|
||||||
| `GoldCorpus` | [`Corpus`](/api/corpus) |
|
| `GoldCorpus` | [`Corpus`](/api/corpus) |
|
||||||
| `KnowledgeBase.load_bulk`, `KnowledgeBase.dump` | [`KnowledgeBase.from_disk`](/api/kb#from_disk), [`KnowledgeBase.to_disk`](/api/kb#to_disk) |
|
| `KnowledgeBase.load_bulk`, `KnowledgeBase.dump` | [`KnowledgeBase.from_disk`](/api/kb#from_disk), [`KnowledgeBase.to_disk`](/api/kb#to_disk) |
|
||||||
|
| `KnowledgeBase.get_candidates` | [`KnowledgeBase.get_alias_candidates`](/api/kb#get_alias_candidates) |
|
||||||
| `Matcher.pipe`, `PhraseMatcher.pipe` | not needed |
|
| `Matcher.pipe`, `PhraseMatcher.pipe` | not needed |
|
||||||
| `gold.offsets_from_biluo_tags`, `gold.spans_from_biluo_tags`, `gold.biluo_tags_from_offsets` | [`training.biluo_tags_to_offsets`](/api/top-level#biluo_tags_to_offsets), [`training.biluo_tags_to_spans`](/api/top-level#biluo_tags_to_spans), [`training.offsets_to_biluo_tags`](/api/top-level#offsets_to_biluo_tags) |
|
| `gold.offsets_from_biluo_tags`, `gold.spans_from_biluo_tags`, `gold.biluo_tags_from_offsets` | [`training.biluo_tags_to_offsets`](/api/top-level#biluo_tags_to_offsets), [`training.biluo_tags_to_spans`](/api/top-level#biluo_tags_to_spans), [`training.offsets_to_biluo_tags`](/api/top-level#offsets_to_biluo_tags) |
|
||||||
| `spacy init-model` | [`spacy init vectors`](/api/cli#init-vectors) |
|
| `spacy init-model` | [`spacy init vectors`](/api/cli#init-vectors) |
|
||||||
|
|
Loading…
Reference in New Issue