mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Fix #2073: Token.set_extension not working
This commit is contained in:
parent
d566e673bf
commit
63a267b34d
|
@ -34,11 +34,11 @@ cdef class Token:
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_extension(cls, name):
|
def get_extension(cls, name):
|
||||||
return Underscore.span_extensions.get(name)
|
return Underscore.token_extensions.get(name)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def has_extension(cls, name):
|
def has_extension(cls, name):
|
||||||
return name in Underscore.span_extensions
|
return name in Underscore.token_extensions
|
||||||
|
|
||||||
def __cinit__(self, Vocab vocab, Doc doc, int offset):
|
def __cinit__(self, Vocab vocab, Doc doc, int offset):
|
||||||
"""Construct a `Token` object.
|
"""Construct a `Token` object.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user