mirror of https://github.com/explosion/spaCy.git
* Temporarily add py_set_flag attribute in Lexeme
This commit is contained in:
parent
e35bb36be7
commit
7cc56ada6e
|
@ -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]
|
||||||
|
|
Loading…
Reference in New Issue