Add property to get morph key on token

This commit is contained in:
Matthew Honnibal 2018-09-26 21:04:29 +02:00
parent 823cc4127a
commit c8a2841308

View File

@ -169,6 +169,10 @@ cdef class Token:
return (numpy.dot(self.vector, other.vector) / return (numpy.dot(self.vector, other.vector) /
(self.vector_norm * other.vector_norm)) (self.vector_norm * other.vector_norm))
property morph_key:
def __get__(self):
return self.c.morph
property lex_id: property lex_id:
"""RETURNS (int): Sequential ID of the token's lexical type.""" """RETURNS (int): Sequential ID of the token's lexical type."""
def __get__(self): def __get__(self):