* 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

View File

@ -29,6 +29,12 @@ cdef class Lexeme:
self.c = <LexemeC*><void*>vocab.get_by_orth(vocab.mem, orth) self.c = <LexemeC*><void*>vocab.get_by_orth(vocab.mem, orth)
assert self.c.orth == 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_: property orth_:
def __get__(self): def __get__(self):
return self.vocab.strings[self.c.orth] return self.vocab.strings[self.c.orth]