From 7cc56ada6eaa5d662f044cab3c12ece1035c5274 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sun, 6 Sep 2015 17:52:51 +0200 Subject: [PATCH] * Temporarily add py_set_flag attribute in Lexeme --- spacy/lexeme.pyx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spacy/lexeme.pyx b/spacy/lexeme.pyx index e99bcfa7c..2c69a527c 100644 --- a/spacy/lexeme.pyx +++ b/spacy/lexeme.pyx @@ -29,6 +29,12 @@ cdef class Lexeme: self.c = vocab.get_by_orth(vocab.mem, orth) assert self.c.orth == orth + def py_set_flag(self, attr_id_t flag_id): + Lexeme.set_flag(self.c, flag_id, True) + + def py_check_flag(self, attr_id_t flag_id): + return True if Lexeme.check_flag(self.c, flag_id) else False + property orth_: def __get__(self): return self.vocab.strings[self.c.orth]