2016-01-29 05:58:55 +03:00
|
|
|
from thinc.linear.avgtron cimport AveragedPerceptron
|
|
|
|
from thinc.extra.eg cimport Example
|
2016-08-29 15:25:22 +03:00
|
|
|
from thinc.structs cimport ExampleC, FeatureC
|
2015-11-06 19:24:30 +03:00
|
|
|
|
2015-08-27 10:16:11 +03:00
|
|
|
from .structs cimport TokenC
|
2015-08-26 20:19:21 +03:00
|
|
|
from .vocab cimport Vocab
|
2015-08-24 06:25:55 +03:00
|
|
|
|
|
|
|
|
2015-11-06 19:24:30 +03:00
|
|
|
cdef class TaggerModel(AveragedPerceptron):
|
2016-08-29 15:25:22 +03:00
|
|
|
cdef int set_featuresC(self, FeatureC* feats, const void* _token) nogil
|
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
|