spaCy/spacy/pipeline/trainable_pipe.pxd
Daniël de Kok b71c6043bc Store activations in Doc when store_activations is enabled
This change adds the new `activations` attribute to `Doc`. This
attribute can be used by trainable pipes to store their activations,
probabilities, and guesses for downstream users.

As an example, this change modifies the `tagger` and `senter` pipes to
add an `store_activations` option. When this option is enabled, the
probabilities and guesses are stored in `set_annotations`.
2022-06-22 10:03:26 +02:00

10 lines
237 B
Cython

from .pipe cimport Pipe
from ..vocab cimport Vocab
cdef class TrainablePipe(Pipe):
cdef public Vocab vocab
cdef public object model
cdef public object cfg
cdef public object scorer
cdef public bint store_activations