2016-01-29 02:58:55 +00:00
|
|
|
from thinc.linear.avgtron cimport AveragedPerceptron
|
|
|
|
from thinc.extra.eg cimport Example
|
|
|
|
from thinc.structs cimport ExampleC
|
2015-11-06 16:24:30 +00:00
|
|
|
|
2015-08-27 07:16:11 +00:00
|
|
|
from .structs cimport TokenC
|
2015-08-26 17:19:21 +00:00
|
|
|
from .vocab cimport Vocab
|
2015-08-24 03:25:55 +00:00
|
|
|
|
|
|
|
|
2015-11-06 16:24:30 +00:00
|
|
|
cdef class TaggerModel(AveragedPerceptron):
|
2016-01-29 02:58:55 +00:00
|
|
|
cdef void set_featuresC(self, ExampleC* eg, const TokenC* tokens, int i) except *
|
2015-11-06 16:24:30 +00:00
|
|
|
|
|
|
|
|
2015-08-24 03:25:55 +00:00
|
|
|
cdef class Tagger:
|
2015-08-26 17:19:21 +00:00
|
|
|
cdef readonly Vocab vocab
|
2015-11-06 16:24:30 +00:00
|
|
|
cdef readonly TaggerModel model
|
2015-08-24 03:25:55 +00:00
|
|
|
cdef public dict freqs
|