From ed5e178817c8a7caac6e8efcca1613b81060e3a0 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 19 Oct 2016 20:52:52 +0200 Subject: [PATCH] Add sentiment property on lexeme object --- spacy/lexeme.pyx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/spacy/lexeme.pyx b/spacy/lexeme.pyx index 459c9c199..01305e855 100644 --- a/spacy/lexeme.pyx +++ b/spacy/lexeme.pyx @@ -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):