mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-07 13:26:02 +03:00
fixes
This commit is contained in:
parent
75514c4bc4
commit
4220149511
|
@ -19,7 +19,6 @@ if TYPE_CHECKING:
|
||||||
FILE_TYPE = ".spacy"
|
FILE_TYPE = ".spacy"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@util.registry.readers("spacy.Corpus.v1")
|
@util.registry.readers("spacy.Corpus.v1")
|
||||||
def create_docbin_reader(
|
def create_docbin_reader(
|
||||||
path: Optional[Path],
|
path: Optional[Path],
|
||||||
|
@ -27,7 +26,7 @@ def create_docbin_reader(
|
||||||
max_length: int = 0,
|
max_length: int = 0,
|
||||||
limit: int = 0,
|
limit: int = 0,
|
||||||
augmenter: Optional[Callable] = None,
|
augmenter: Optional[Callable] = None,
|
||||||
) -> Callable[["Language"], Iterable[Example]]:
|
) -> Callable[["Language"], Iterable[Doc]]:
|
||||||
if path is None:
|
if path is None:
|
||||||
raise ValueError(Errors.E913)
|
raise ValueError(Errors.E913)
|
||||||
util.logger.debug("Loading corpus from path: %s", path)
|
util.logger.debug("Loading corpus from path: %s", path)
|
||||||
|
@ -211,7 +210,7 @@ class Corpus:
|
||||||
|
|
||||||
def read_docbin(
|
def read_docbin(
|
||||||
self, vocab: Vocab, locs: Iterable[Union[str, Path]]
|
self, vocab: Vocab, locs: Iterable[Union[str, Path]]
|
||||||
) -> Iterable[Doc]:
|
) -> Iterator[Doc]:
|
||||||
"""Yield training examples as example dicts"""
|
"""Yield training examples as example dicts"""
|
||||||
i = 0
|
i = 0
|
||||||
for loc in locs:
|
for loc in locs:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user