mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-21 17:41:59 +03:00
Expand BaseVectors
These methods are needed in various places for training and vector similarity.
This commit is contained in:
parent
3f243342bf
commit
030a7001a2
|
@ -52,16 +52,36 @@ cdef class BaseVectors:
|
|||
def __getitem__(self, key):
|
||||
raise NotImplementedError
|
||||
|
||||
def __contains__(self, key):
|
||||
raise NotImplementedError
|
||||
|
||||
def is_full(self):
|
||||
raise NotImplementedError
|
||||
|
||||
def get_batch(self, keys):
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
def shape(self):
|
||||
raise NotImplementedError
|
||||
|
||||
def __len__(self):
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
def vectors_length(self):
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
def size(self):
|
||||
raise NotImplementedError
|
||||
|
||||
def add(self, key, *, vector=None):
|
||||
raise NotImplementedError
|
||||
|
||||
def to_ops(self, ops: Ops):
|
||||
raise NotImplementedError
|
||||
|
||||
# add dummy methods for to_bytes, from_bytes, to_disk and from_disk to
|
||||
# allow serialization
|
||||
def to_bytes(self, **kwargs):
|
||||
|
|
Loading…
Reference in New Issue
Block a user