spaCy/spacy/tokens/span.pxd

21 lines
458 B
Cython
Raw Normal View History

cimport numpy as np
from .doc cimport Doc
2017-05-28 16:09:27 +00:00
from ..typedefs cimport attr_t
cdef class Span:
2015-09-29 13:03:55 +00:00
cdef readonly Doc doc
cdef readonly int start
cdef readonly int end
cdef readonly int start_char
cdef readonly int end_char
2017-05-28 16:09:27 +00:00
cdef readonly attr_t label
2019-03-14 14:48:40 +00:00
cdef readonly attr_t kb_id
cdef public _vector
cdef public _vector_norm
cpdef int _recalculate_indices(self) except -1
2017-08-19 10:20:45 +00:00
cpdef np.ndarray to_array(self, object features)