From a6a21599698c815b30e80edc1e6f3af7ca20f415 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 22 Jul 2017 00:34:15 +0200 Subject: [PATCH] Add slot for text categories to Doc --- spacy/tokens/doc.pxd | 1 + spacy/tokens/doc.pyx | 1 + 2 files changed, 2 insertions(+) diff --git a/spacy/tokens/doc.pxd b/spacy/tokens/doc.pxd index ef1f85ea7..d0c83e0f8 100644 --- a/spacy/tokens/doc.pxd +++ b/spacy/tokens/doc.pxd @@ -33,6 +33,7 @@ cdef class Doc: cdef public object _vector_norm cdef public object tensor + cdef public object cats cdef public object user_data cdef TokenC* c diff --git a/spacy/tokens/doc.pyx b/spacy/tokens/doc.pyx index 1eceab00d..822a0152d 100644 --- a/spacy/tokens/doc.pyx +++ b/spacy/tokens/doc.pyx @@ -117,6 +117,7 @@ cdef class Doc: self.is_tagged = False self.is_parsed = False self.sentiment = 0.0 + self.cats = {} self.user_hooks = {} self.user_token_hooks = {} self.user_span_hooks = {}