mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-27 01:34:30 +03:00
Fix Span.vector_norm
This commit is contained in:
parent
6d301fa06f
commit
e80944276f
|
@ -133,8 +133,8 @@ cdef class Span:
|
||||||
|
|
||||||
property vector_norm:
|
property vector_norm:
|
||||||
def __get__(self):
|
def __get__(self):
|
||||||
if 'vector_norm' in self.doc.getters_for_spans:
|
if 'vector_norm' in self.doc.user_span_hooks:
|
||||||
return self.doc.getters_for_spans['vector'](self)
|
return self.doc.user_span_hooks['vector'](self)
|
||||||
cdef float value
|
cdef float value
|
||||||
if self._vector_norm is None:
|
if self._vector_norm is None:
|
||||||
self._vector_norm = 1e-20
|
self._vector_norm = 1e-20
|
||||||
|
|
Loading…
Reference in New Issue
Block a user