From fbf19049cfd25a1dc3a67023608214b3bcbac448 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 31 Mar 2015 02:01:29 +0200 Subject: [PATCH] * Add ent_type_ property --- spacy/tokens.pyx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spacy/tokens.pyx b/spacy/tokens.pyx index 910166f97..d23dca746 100644 --- a/spacy/tokens.pyx +++ b/spacy/tokens.pyx @@ -520,6 +520,10 @@ cdef class Token: self.c + self.c.head, self.i + self.c.head, self.array_len, self._seq) + property ent_type_: + def __get__(self): + return self.vocab.strings[self.c.ent_type] + property whitespace_: def __get__(self): return self.string[self.c.lex.length:]