mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Fix typo
This commit is contained in:
parent
59c4f27499
commit
3fc4fe61d2
|
@ -28,7 +28,7 @@ cdef class Token:
|
||||||
@classmethod
|
@classmethod
|
||||||
def set_extension(cls, name, default=None, method=None,
|
def set_extension(cls, name, default=None, method=None,
|
||||||
getter=None, setter=None):
|
getter=None, setter=None):
|
||||||
Underscore.span_extensions[name] = (default, method, getter, setter)
|
Underscore.token_extensions[name] = (default, method, getter, setter)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_extension(cls, name):
|
def get_extension(cls, name):
|
||||||
|
@ -285,7 +285,7 @@ cdef class Token:
|
||||||
def __get__(self):
|
def __get__(self):
|
||||||
if 'vector_norm' in self.doc.user_token_hooks:
|
if 'vector_norm' in self.doc.user_token_hooks:
|
||||||
return self.doc.user_token_hooks['vector_norm'](self)
|
return self.doc.user_token_hooks['vector_norm'](self)
|
||||||
vector = self.vector
|
vector = self.vector
|
||||||
return numpy.sqrt((vector ** 2).sum())
|
return numpy.sqrt((vector ** 2).sum())
|
||||||
|
|
||||||
property n_lefts:
|
property n_lefts:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user