From e80944276fbcbf46cad966c337cb270644d272be Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 20 Oct 2016 21:58:56 +0200 Subject: [PATCH] Fix Span.vector_norm --- spacy/tokens/span.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/tokens/span.pyx b/spacy/tokens/span.pyx index fa081c90a..2cac2d947 100644 --- a/spacy/tokens/span.pyx +++ b/spacy/tokens/span.pyx @@ -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