mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
21 lines
458 B
Cython
21 lines
458 B
Cython
cimport numpy as np
|
|
|
|
from .doc cimport Doc
|
|
from ..typedefs cimport attr_t
|
|
|
|
|
|
cdef class Span:
|
|
cdef readonly Doc doc
|
|
cdef readonly int start
|
|
cdef readonly int end
|
|
cdef readonly int start_char
|
|
cdef readonly int end_char
|
|
cdef readonly attr_t label
|
|
cdef readonly attr_t kb_id
|
|
|
|
cdef public _vector
|
|
cdef public _vector_norm
|
|
|
|
cpdef int _recalculate_indices(self) except -1
|
|
cpdef np.ndarray to_array(self, object features)
|