spaCy/spacy/matcher/phrasematcher.pxd
Daniël de Kok e2b70df012
Configure isort to use the Black profile, recursively isort the spacy module (#12721)
* Use isort with Black profile

* isort all the things

* Fix import cycles as a result of import sorting

* Add DOCBIN_ALL_ATTRS type definition

* Add isort to requirements

* Remove isort from build dependencies check

* Typo
2023-06-14 17:48:41 +02:00

22 lines
555 B
Cython

from cymem.cymem cimport Pool
from libcpp.vector cimport vector
from preshed.maps cimport MapStruct, key_t
from ..attrs cimport attr_id_t
from ..structs cimport SpanC
from ..tokens.doc cimport Doc
from ..vocab cimport Vocab
cdef class PhraseMatcher:
cdef readonly Vocab vocab
cdef attr_id_t attr
cdef object _callbacks
cdef object _docs
cdef bint _validate
cdef MapStruct* c_map
cdef Pool mem
cdef key_t _terminal_hash
cdef void find_matches(self, Doc doc, int start_idx, int end_idx, vector[SpanC] *matches) nogil