mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-27 10:26:35 +03:00
18 lines
489 B
Cython
18 lines
489 B
Cython
from thinc.api cimport AveragedPerceptron
|
|
from thinc.api cimport ExampleC
|
|
|
|
from .structs cimport TokenC
|
|
from .vocab cimport Vocab
|
|
|
|
|
|
cdef class TaggerModel(AveragedPerceptron):
|
|
cdef void set_features(self, ExampleC* eg, const TokenC* tokens, int i) except *
|
|
cdef void set_costs(self, ExampleC* eg, int gold) except *
|
|
cdef void update(self, ExampleC* eg) except *
|
|
|
|
|
|
cdef class Tagger:
|
|
cdef readonly Vocab vocab
|
|
cdef readonly TaggerModel model
|
|
cdef public dict freqs
|