lemma property to return hash instead of unicode

This commit is contained in:
Thomas Opsomer 2018-02-27 19:50:01 +01:00 committed by Matthew Honnibal
parent 8cefc58abc
commit fbf48b3f9f
1 changed files with 2 additions and 2 deletions

View File

@ -269,8 +269,8 @@ cdef class Token:
""" """
def __get__(self): def __get__(self):
if self.c.lemma == 0: if self.c.lemma == 0:
lemma = self.vocab.morphology.lemmatizer.lookup(self.orth_) lemma_ = self.vocab.morphology.lemmatizer.lookup(self.orth_)
return lemma return self.vocab.strings[lemma_]
else: else:
return self.c.lemma return self.c.lemma