From 4220149511f4224d5daa45fcad9baac5b1822fbb Mon Sep 17 00:00:00 2001 From: svlandeg Date: Fri, 7 Jul 2023 10:19:06 +0200 Subject: [PATCH] fixes --- spacy/training/corpus.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spacy/training/corpus.py b/spacy/training/corpus.py index c15c31a2a..0ac9e42b2 100644 --- a/spacy/training/corpus.py +++ b/spacy/training/corpus.py @@ -19,7 +19,6 @@ if TYPE_CHECKING: FILE_TYPE = ".spacy" - @util.registry.readers("spacy.Corpus.v1") def create_docbin_reader( path: Optional[Path], @@ -27,7 +26,7 @@ def create_docbin_reader( max_length: int = 0, limit: int = 0, augmenter: Optional[Callable] = None, -) -> Callable[["Language"], Iterable[Example]]: +) -> Callable[["Language"], Iterable[Doc]]: if path is None: raise ValueError(Errors.E913) util.logger.debug("Loading corpus from path: %s", path) @@ -211,7 +210,7 @@ class Corpus: def read_docbin( self, vocab: Vocab, locs: Iterable[Union[str, Path]] - ) -> Iterable[Doc]: + ) -> Iterator[Doc]: """Yield training examples as example dicts""" i = 0 for loc in locs: