* Temporarily add py_set_flag attribute in Lexeme

This commit is contained in:
Matthew Honnibal 2015-09-06 17:52:51 +02:00
parent e35bb36be7
commit 7cc56ada6e
1 changed files with 6 additions and 0 deletions

View File

@ -29,6 +29,12 @@ cdef class Lexeme:
self.c = <LexemeC*><void*>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]