mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 16:07:41 +03:00 
			
		
		
		
	Apply suggestions from code review
Co-authored-by: Madeesh Kannan <shadeMe@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									78c72d3ab7
								
							
						
					
					
						commit
						c8691a27d6
					
				|  | @ -55,13 +55,13 @@ architectures and their arguments and hyperparameters. | |||
| 
 | ||||
| | Setting                                          | Description                                                                                                                                                                                                                                                                                 | | ||||
| | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||||
| | `labels_discard`                                 | NER labels that will automatically get a "NIL" prediction. Defaults to `[]`. ~~Iterable[str]~~                                                                                                                                                                                              | | ||||
| | `n_sents`                                        | The number of neighbouring sentences to take into account. Defaults to 0. ~~int~~                                                                                                                                                                                                           | | ||||
| | `incl_prior`                                     | Whether or not to include prior probabilities from the KB in the model. Defaults to `True`. ~~bool~~                                                                                                                                                                                        | | ||||
| | `incl_context`                                   | Whether or not to include the local context in the model. Defaults to `True`. ~~bool~~                                                                                                                                                                                                      | | ||||
| | `model`                                          | The [`Model`](https://thinc.ai/docs/api-model) powering the pipeline component. Defaults to [EntityLinker](/api/architectures#EntityLinker). ~~Model~~                                                                                                                                      | | ||||
| | `labels_discard`                                 | NER labels that will automatically get an "NIL" prediction. Defaults to `[]`. ~~Iterable[str]~~                                                                                                                                                                                              | | ||||
| | `n_sents`                                        | The number of neighbouring sentences to take into account. Defaults to `0`. ~~int~~                                                                                                                                                                                                           | | ||||
| | `incl_prior`                                     | Whether prior probabilities from the KB are included in the model. Defaults to `True`. ~~bool~~                                                                                                                                                                                        | | ||||
| | `incl_context`                                   | Whether the local context is included in the model. Defaults to `True`. ~~bool~~                                                                                                                                                                                                      | | ||||
| | `model`                                          | The [`Model`](https://thinc.ai/docs/api-model) powering the pipeline component. Defaults to [`EntityLinker`](/api/architectures#EntityLinker). ~~Model~~                                                                                                                                      | | ||||
| | `entity_vector_length`                           | Size of encoding vectors in the KB. Defaults to `64`. ~~int~~                                                                                                                                                                                                                               | | ||||
| | `use_gold_ents`                                  | Whether to copy entities from the gold docs or not. Defaults to `True`. If `False`, entities must be set in the training data or by an annotating component in the pipeline. ~~int~~                                                                                                        | | ||||
| | `use_gold_ents`                                  | Whether entities are copied from the gold docs. Defaults to `True`. If `False`, entities must be set in the training data or by an annotating component in the pipeline. ~~int~~                                                                                                        | | ||||
| | `get_candidates`                                 | Function that retrieves plausible candidates per entity mention in a given `Iterator[SpanGroup]`. Defaults to [CandidateGenerator](/api/architectures#CandidateGenerator). ~~Callable[[KnowledgeBase, Iterator[SpanGroup]], Iterator[Iterable[Iterable[Candidate]]]]~~                      | | ||||
| | `generate_empty_kb` <Tag variant="new">3.6</Tag> | Function that generates an empty `KnowledgeBase` object. Defaults to [`spacy.EmptyKB.v2`](/api/architectures#EmptyKB), which generates an empty [`InMemoryLookupKB`](/api/inmemorylookupkb). ~~Callable[[Vocab, int], KnowledgeBase]~~                                                      | | ||||
| | `overwrite` <Tag variant="new">3.2</Tag>         | Whether existing annotation is overwritten. Defaults to `True`. ~~bool~~                                                                                                                                                                                                                    | | ||||
|  |  | |||
|  | @ -158,8 +158,7 @@ Get a list of all aliases in the knowledge base. | |||
| Given textual mentions for an arbitrary number of documents as input, retrieve a | ||||
| list of candidate entities of type [`InMemoryCandidate`](/api/kb#candidate) for | ||||
| each mention. The [`EntityLinker`](/api/entitylinker) component passes a | ||||
| generator yielding all mentions to retreive candidates for as | ||||
| [`SpanGroup`](/api/spangroup)) per document. The decision of how to batch | ||||
| generator that yields mentions as [`SpanGroup`](/api/spangroup))s per document. The decision of how to batch | ||||
| candidate retrieval lookups over multiple documents is left up to the | ||||
| implementation of `KnowledgeBase.get_candidates()`. | ||||
| 
 | ||||
|  |  | |||
|  | @ -63,8 +63,8 @@ The length of the fixed-size entity vectors in the knowledge base. | |||
| Given textual mentions for an arbitrary number of documents as input, retrieve a | ||||
| list of candidate entities of type [`Candidate`](/api/kb#candidate) for each | ||||
| mention. The [`EntityLinker`](/api/entitylinker) component passes a generator | ||||
| yielding all mentions to retreive candidates for as | ||||
| [`SpanGroup`](/api/spangroup)) per document. The decision of how to batch | ||||
| that yields mentions as [`SpanGroup`](/api/spangroup))s per document.  | ||||
| The decision of how to batch | ||||
| candidate retrieval lookups over multiple documents is left up to the | ||||
| implementation of `KnowledgeBase.get_candidates()`. | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user