From 2b8459d9a844f6c9ffd10b6f937ee09635e568f6 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 1 Jul 2015 20:10:41 +0200 Subject: [PATCH] * Add senses flag to Lexeme --- spacy/lexeme.pxd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spacy/lexeme.pxd b/spacy/lexeme.pxd index bdf8dedf3..5314d18c9 100644 --- a/spacy/lexeme.pxd +++ b/spacy/lexeme.pxd @@ -17,6 +17,7 @@ cdef class Lexeme: cdef readonly ndarray repvec cdef readonly flags_t flags + cdef readonly flags_t senses cdef readonly attr_t id cdef readonly attr_t length @@ -48,6 +49,7 @@ cdef class Lexeme: py.repvec[i] = ptr.repvec[i] py.l2_norm = ptr.l2_norm py.flags = ptr.flags + py.senses = ptr.senses py.id = ptr.id py.length = ptr.length @@ -71,6 +73,8 @@ cdef class Lexeme: return py cpdef bint check(self, attr_id_t flag_id) except -1 + + cpdef bint has_sense(self, flags_t flag_id) except -1 cdef inline bint check_flag(const LexemeC* lexeme, attr_id_t flag_id) nogil: