Fix Span.vector_norm

This commit is contained in:
Matthew Honnibal 2016-10-20 21:58:56 +02:00
parent 6d301fa06f
commit e80944276f
1 changed files with 2 additions and 2 deletions

View File

@ -133,8 +133,8 @@ cdef class Span:
property vector_norm:
def __get__(self):
if 'vector_norm' in self.doc.getters_for_spans:
return self.doc.getters_for_spans['vector'](self)
if 'vector_norm' in self.doc.user_span_hooks:
return self.doc.user_span_hooks['vector'](self)
cdef float value
if self._vector_norm is None:
self._vector_norm = 1e-20