spaCy/spacy/training/example.pxd
Matthew Honnibal 2abb4ba9db
Make a pre-check to speed up alignment cache (#6139)
* Dirty trick to fast-track alignment cache

* Improve alignment cache check

* Fix header

* Fix align cache

* Fix align logic
2020-09-24 18:13:39 +02:00

13 lines
327 B
Cython

from ..tokens.doc cimport Doc
from libc.stdint cimport uint64_t
cdef class Example:
cdef readonly Doc x
cdef readonly Doc y
cdef readonly object _cached_alignment
cdef readonly object _cached_words_x
cdef readonly object _cached_words_y
cdef readonly uint64_t _x_sig
cdef readonly uint64_t _y_sig