Add store_activations to docstrings.

This commit is contained in:
Daniël de Kok 2022-07-06 16:15:13 +02:00
parent 5eeb2e8f90
commit 403b1f1312
8 changed files with 16 additions and 0 deletions

View File

@ -109,6 +109,8 @@ class EditTreeLemmatizer(TrainablePipe):
frequency in the training data.
overwrite (bool): overwrite existing lemma annotations.
top_k (int): try to apply at most the k most probable edit trees.
store_activations (Union[bool, List[str]]): Model activations to store in
Doc when annotating. supported activations are: "probs" and "guesses".
"""
self.vocab = vocab
self.model = model

View File

@ -98,6 +98,8 @@ def make_entity_linker(
get_candidates (Callable[[KnowledgeBase, "Span"], Iterable[Candidate]]): Function that
produces a list of candidates, given a certain knowledge base and a textual mention.
scorer (Optional[Callable]): The scoring method.
store_activations (Union[bool, List[str]]): Model activations to store in
Doc when annotating. supported activations are: "ents" and "scores".
"""
if not model.attrs.get("include_span_maker", False):

View File

@ -114,6 +114,8 @@ class Morphologizer(Tagger):
scorer (Optional[Callable]): The scoring method. Defaults to
Scorer.score_token_attr for the attributes "pos" and "morph" and
Scorer.score_token_attr_per_feat for the attribute "morph".
store_activations (Union[bool, List[str]]): Model activations to store in
Doc when annotating. supported activations are: "probs" and "guesses".
DOCS: https://spacy.io/api/morphologizer#init
"""

View File

@ -92,6 +92,8 @@ class SentenceRecognizer(Tagger):
losses during training.
scorer (Optional[Callable]): The scoring method. Defaults to
Scorer.score_spans for the attribute "sents".
store_activations (Union[bool, List[str]]): Model activations to store in
Doc when annotating. supported activations are: "probs" and "guesses".
DOCS: https://spacy.io/api/sentencerecognizer#init
"""

View File

@ -141,6 +141,8 @@ def make_spancat(
0.5.
max_positive (Optional[int]): Maximum number of labels to consider positive
per span. Defaults to None, indicating no limit.
store_activations (Union[bool, List[str]]): Model activations to store in
Doc when annotating. supported activations are: "indices" and "scores".
"""
return SpanCategorizer(
nlp.vocab,

View File

@ -107,6 +107,8 @@ class Tagger(TrainablePipe):
losses during training.
scorer (Optional[Callable]): The scoring method. Defaults to
Scorer.score_token_attr for the attribute "tag".
store_activations (Union[bool, List[str]]): Model activations to store in
Doc when annotating. supported activations are: "probs" and "guesses".
DOCS: https://spacy.io/api/tagger#init
"""

View File

@ -107,6 +107,8 @@ def make_textcat(
scores for each category.
threshold (float): Cutoff to consider a prediction "positive".
scorer (Optional[Callable]): The scoring method.
store_activations (Union[bool, List[str]]): Model activations to store in
Doc when annotating. supported activations is: "probs".
"""
return TextCategorizer(
nlp.vocab,

View File

@ -155,6 +155,8 @@ class MultiLabel_TextCategorizer(TextCategorizer):
name (str): The component instance name, used to add entries to the
losses during training.
threshold (float): Cutoff to consider a prediction "positive".
store_activations (Union[bool, List[str]]): Model activations to store in
Doc when annotating. supported activations is: "probs".
DOCS: https://spacy.io/api/textcategorizer#init
"""