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]