2014-12-23 02:18:59 +00:00
|
|
|
from preshed.maps cimport PreshMapArray
|
2014-12-30 10:20:15 +00:00
|
|
|
from cymem.cymem cimport Pool
|
2014-12-23 02:18:59 +00:00
|
|
|
|
2014-12-30 10:20:15 +00:00
|
|
|
from .._ml cimport Model
|
2014-12-23 00:40:32 +00:00
|
|
|
from ..strings cimport StringStore
|
2015-01-11 23:26:22 +00:00
|
|
|
from ..structs cimport TokenC, LexemeC, Morphology, PosTag
|
2015-01-25 05:31:07 +00:00
|
|
|
from ..parts_of_speech cimport univ_pos_t
|
2014-12-23 02:18:59 +00:00
|
|
|
from .lemmatizer import Lemmatizer
|
2014-12-21 09:59:07 +00:00
|
|
|
|
|
|
|
|
2014-12-30 10:20:15 +00:00
|
|
|
cdef class EnPosTagger:
|
|
|
|
cdef readonly Pool mem
|
2014-12-23 00:40:32 +00:00
|
|
|
cdef readonly StringStore strings
|
2014-12-30 10:20:15 +00:00
|
|
|
cdef readonly Model model
|
2014-12-23 02:18:59 +00:00
|
|
|
cdef public object lemmatizer
|
|
|
|
cdef PreshMapArray _morph_cache
|
|
|
|
|
|
|
|
cdef PosTag* tags
|
|
|
|
cdef readonly object tag_names
|
|
|
|
cdef readonly object tag_map
|
2014-12-30 10:20:15 +00:00
|
|
|
cdef readonly int n_tags
|
2014-12-23 02:18:59 +00:00
|
|
|
|
2015-03-15 21:01:58 +00:00
|
|
|
cdef int set_morph(self, const int i, const PosTag* tag, TokenC* tokens) except -1
|
2015-01-25 05:31:07 +00:00
|
|
|
cdef int lemmatize(self, const univ_pos_t pos, const LexemeC* lex) except -1
|