mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-06 07:16:29 +03:00
b71c6043bc
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`.
10 lines
237 B
Cython
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
|