mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 17:06:29 +03:00
Add user_data attribute to Doc object.
This commit is contained in:
parent
c1abc8f6ed
commit
fbb7f3f15c
|
@ -33,6 +33,7 @@ cdef class Doc:
|
||||||
cdef public object _vector_norm
|
cdef public object _vector_norm
|
||||||
|
|
||||||
cdef public np.ndarray tensor
|
cdef public np.ndarray tensor
|
||||||
|
cdef public object user_data
|
||||||
|
|
||||||
cdef TokenC* c
|
cdef TokenC* c
|
||||||
|
|
||||||
|
|
|
@ -117,6 +117,8 @@ cdef class Doc:
|
||||||
self.is_parsed = False
|
self.is_parsed = False
|
||||||
self.getters_for_tokens = {}
|
self.getters_for_tokens = {}
|
||||||
self.getters_for_spans = {}
|
self.getters_for_spans = {}
|
||||||
|
self.tensor = np.zeros((0,), dtype='float32')
|
||||||
|
self.user_data = {}
|
||||||
self._py_tokens = []
|
self._py_tokens = []
|
||||||
self._vector = None
|
self._vector = None
|
||||||
self.noun_chunks_iterator = CHUNKERS.get(self.vocab.lang)
|
self.noun_chunks_iterator = CHUNKERS.get(self.vocab.lang)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user