2015-08-27 10:16:11 +03:00
|
|
|
from .structs cimport TokenC
|
2015-08-26 20:19:21 +03:00
|
|
|
from .vocab cimport Vocab
|
2017-03-14 23:28:43 +03:00
|
|
|
from ._ml cimport LinearModel
|
|
|
|
from thinc.structs cimport FeatureC
|
|
|
|
from thinc.typedefs cimport atom_t
|
2015-08-24 06:25:55 +03:00
|
|
|
|
|
|
|
|
2017-03-14 23:28:43 +03:00
|
|
|
cdef class TaggerModel(LinearModel):
|
|
|
|
cdef int set_featuresC(self, FeatureC* features, atom_t* context,
|
|
|
|
const TokenC* tokens, int i) nogil
|
|
|
|
|
2017-03-13 13:24:02 +03:00
|
|
|
|
2015-11-06 19:24:30 +03:00
|
|
|
|
2015-08-24 06:25:55 +03:00
|
|
|
cdef class Tagger:
|
2015-08-26 20:19:21 +03:00
|
|
|
cdef readonly Vocab vocab
|
2015-11-06 19:24:30 +03:00
|
|
|
cdef readonly TaggerModel model
|
2015-08-24 06:25:55 +03:00
|
|
|
cdef public dict freqs
|
2016-10-17 02:03:41 +03:00
|
|
|
cdef public object cfg
|
2017-03-13 13:24:02 +03:00
|
|
|
cdef public object optimizer
|