mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-06 14:40:34 +03:00
Update NewExample
This commit is contained in:
parent
ccd332a9fc
commit
b3868cd1f8
|
@ -31,13 +31,19 @@ cdef class NewExample:
|
||||||
self.y = reference
|
self.y = reference
|
||||||
self._alignment = alignment
|
self._alignment = alignment
|
||||||
|
|
||||||
@property
|
property predicted:
|
||||||
def predicted(self):
|
def __get__(self):
|
||||||
return self.x
|
return self.x
|
||||||
|
|
||||||
|
def __set__(self, doc):
|
||||||
|
self.x = doc
|
||||||
|
|
||||||
@property
|
property reference:
|
||||||
def reference(self):
|
def __get__(self):
|
||||||
return self.y
|
return self.y
|
||||||
|
|
||||||
|
def __set__(self, doc):
|
||||||
|
self.y = doc
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls, Doc predicted, dict example_dict):
|
def from_dict(cls, Doc predicted, dict example_dict):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user