mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 20:28:20 +03:00
950832f087
* Tidy up pipes * Fix init, defaults and raise custom errors * Update docs * Update docs [ci skip] * Apply suggestions from code review Co-authored-by: Matthew Honnibal <honnibal+gh@gmail.com> * Tidy up error handling and validation, fix consistency * Simplify get_examples check * Remove unused import [ci skip] Co-authored-by: Matthew Honnibal <honnibal+gh@gmail.com>
20 lines
634 B
Cython
20 lines
634 B
Cython
from cymem.cymem cimport Pool
|
|
|
|
from ..vocab cimport Vocab
|
|
from .pipe cimport Pipe
|
|
from ._parser_internals.transition_system cimport Transition, TransitionSystem
|
|
from ._parser_internals._state cimport StateC
|
|
from ..ml.parser_model cimport WeightsC, ActivationsC, SizesC
|
|
|
|
|
|
cdef class Parser(Pipe):
|
|
cdef public object _rehearsal_model
|
|
cdef readonly TransitionSystem moves
|
|
cdef public object _multitasks
|
|
|
|
cdef void _parseC(self, StateC** states,
|
|
WeightsC weights, SizesC sizes) nogil
|
|
|
|
cdef void c_transition_batch(self, StateC** states, const float* scores,
|
|
int nr_class, int batch_size) nogil
|