Add sentiment property on lexeme object

This commit is contained in:
Matthew Honnibal 2016-10-19 20:52:52 +02:00
parent 7a26b8a100
commit ed5e178817
1 changed files with 7 additions and 1 deletions

View File

@ -124,7 +124,13 @@ cdef class Lexeme:
property repvec:
def __get__(self):
return self.vector
raise AttributeError("lex.repvec has been renamed to lex.vector")
property sentiment:
def __get__(self):
return self.c.sentiment
def __set__(self, float sentiment):
self.c.sentiment = sentiment
property orth_:
def __get__(self):