Add slot for text categories to Doc

This commit is contained in:
Matthew Honnibal 2017-07-22 00:34:15 +02:00
parent 374ab3ecfb
commit a6a2159969
2 changed files with 2 additions and 0 deletions

View File

@ -33,6 +33,7 @@ cdef class Doc:
cdef public object _vector_norm cdef public object _vector_norm
cdef public object tensor cdef public object tensor
cdef public object cats
cdef public object user_data cdef public object user_data
cdef TokenC* c cdef TokenC* c

View File

@ -117,6 +117,7 @@ cdef class Doc:
self.is_tagged = False self.is_tagged = False
self.is_parsed = False self.is_parsed = False
self.sentiment = 0.0 self.sentiment = 0.0
self.cats = {}
self.user_hooks = {} self.user_hooks = {}
self.user_token_hooks = {} self.user_token_hooks = {}
self.user_span_hooks = {} self.user_span_hooks = {}