diff --git a/spacy/lexeme.pyx b/spacy/lexeme.pyx index 4deec60c1..e99bcfa7c 100644 --- a/spacy/lexeme.pyx +++ b/spacy/lexeme.pyx @@ -29,6 +29,10 @@ cdef class Lexeme: self.c = vocab.get_by_orth(vocab.mem, orth) assert self.c.orth == orth + property orth_: + def __get__(self): + return self.vocab.strings[self.c.orth] + property lower: def __get__(self): return self.c.lower def __set__(self, int x): self.c.lower = x @@ -49,9 +53,13 @@ cdef class Lexeme: def __get__(self): return self.c.suffix def __set__(self, int x): self.c.suffix = x - property orth_: - def __get__(self): - return self.vocab.strings[self.c.orth] + property cluster: + def __get__(self): return self.c.suffix + def __set__(self, int x): self.c.suffix = x + + property prob: + def __get__(self): return self.c.suffix + def __set__(self, int x): self.c.suffix = x property lower_: def __get__(self): return self.vocab.strings[self.c.lower] @@ -73,6 +81,10 @@ cdef class Lexeme: def __get__(self): return self.c.suffix def __set__(self, unicode x): self.c.suffix = self.vocab.strings[x] + property flags: + def __get__(self): return self.c.flags + def __set__(self, flags_t x): self.c.flags = x + property is_oov: def __get__(self): return Lexeme.check_flag(self.c, IS_OOV) def __set__(self, attr_id_t x): Lexeme.set_flag(self.c, IS_OOV, x)