diff --git a/spacy/gold/example.pyx b/spacy/gold/example.pyx index f5b9f0eeb..09bc95bff 100644 --- a/spacy/gold/example.pyx +++ b/spacy/gold/example.pyx @@ -36,6 +36,9 @@ cdef class Example: self.y = reference self._alignment = alignment + def __len__(self): + return len(self.predicted) + property predicted: def __get__(self): return self.x