diff --git a/spacy/lexeme.pyx b/spacy/lexeme.pyx index 048fae1df..845b29314 100644 --- a/spacy/lexeme.pyx +++ b/spacy/lexeme.pyx @@ -83,6 +83,10 @@ cdef class Lexeme: for i, value in enumerate(vector): self.c.vector[i] = value + property rank: + def __get__(self): + return self.c.id + property repvec: def __get__(self): return self.vector diff --git a/spacy/tokens/token.pyx b/spacy/tokens/token.pyx index 3a76bf220..daf1044ba 100644 --- a/spacy/tokens/token.pyx +++ b/spacy/tokens/token.pyx @@ -67,6 +67,10 @@ cdef class Token: def __get__(self): return self.c.lex.id + property rank: + def __get__(self): + return self.c.lex.id + property string: def __get__(self): cdef unicode orth = self.vocab.strings[self.c.lex.orth]