Implement Example.copy

This commit is contained in:
Matthew Honnibal 2020-06-25 21:18:52 +02:00
parent c2fff89b1d
commit 0d2492c97a
1 changed files with 6 additions and 0 deletions

View File

@ -54,6 +54,12 @@ cdef class Example:
def __set__(self, doc):
self.y = doc
def copy(self):
return Example(
self.x.copy(),
self.y.copy()
)
@classmethod
def from_dict(cls, Doc predicted, dict example_dict):