2014-09-11 18:57:08 +04:00
|
|
|
from spacy.lexeme cimport LexemeC
|
|
|
|
|
2014-09-10 20:11:13 +04:00
|
|
|
cdef class Tokens:
|
2014-09-11 18:57:08 +04:00
|
|
|
cdef size_t length
|
|
|
|
cdef size_t size
|
|
|
|
|
|
|
|
cdef LexemeC** lexemes
|
2014-09-12 04:23:51 +04:00
|
|
|
cdef int push_back(self, LexemeC* lexeme) except -1
|
2014-09-10 20:11:13 +04:00
|
|
|
|
2014-09-12 17:49:36 +04:00
|
|
|
cpdef size_t id(self, size_t i)
|
2014-09-10 20:11:13 +04:00
|
|
|
cpdef unicode string(self, size_t i)
|
|
|
|
cpdef double prob(self, size_t i)
|
|
|
|
cpdef size_t cluster(self, size_t i)
|
|
|
|
cpdef bint check_flag(self, size_t i, size_t flag_id)
|
|
|
|
cpdef unicode string_view(self, size_t i, size_t view_id)
|