mirror of https://github.com/explosion/spaCy.git
Implement Example.copy
This commit is contained in:
parent
c2fff89b1d
commit
0d2492c97a
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue