2014-08-25 14:42:22 +00:00
|
|
|
from .typedefs cimport hash_t, utf8_t, flag_t, id_t
|
2014-08-24 16:14:08 +00:00
|
|
|
|
|
|
|
|
2014-08-25 14:42:22 +00:00
|
|
|
DEF MAX_FLAG = 64
|
2014-08-24 16:14:08 +00:00
|
|
|
|
|
|
|
|
2014-08-25 14:42:22 +00:00
|
|
|
cdef class Lexeme:
|
2014-08-24 16:14:08 +00:00
|
|
|
# NB: the readonly keyword refers to _Python_ access. The attributes are
|
|
|
|
# writeable from Cython.
|
2014-08-27 15:15:39 +00:00
|
|
|
cpdef readonly size_t length
|
|
|
|
cpdef readonly double prob
|
|
|
|
cpdef readonly size_t cluster
|
2014-08-24 17:24:42 +00:00
|
|
|
|
2014-08-28 17:45:09 +00:00
|
|
|
cpdef readonly string
|
|
|
|
cpdef readonly list views
|
2014-08-24 16:14:08 +00:00
|
|
|
|
2014-08-25 14:42:22 +00:00
|
|
|
cdef readonly flag_t flags
|
2014-08-24 16:14:08 +00:00
|
|
|
|
2014-08-25 14:42:22 +00:00
|
|
|
cpdef bint check_flag(self, size_t flag_id) except *
|
|
|
|
cpdef int set_flag(self, size_t flag_id) except -1
|