mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
Merge pull request #9638 from polm/fix/optional-pretrain-path
Make Jsonl Corpus reader path optional again
This commit is contained in:
commit
24cdd4c88e
|
@ -41,7 +41,7 @@ def create_docbin_reader(
|
|||
|
||||
@util.registry.readers("spacy.JsonlCorpus.v1")
|
||||
def create_jsonl_reader(
|
||||
path: Union[str, Path], min_length: int = 0, max_length: int = 0, limit: int = 0
|
||||
path: Optional[Union[str, Path]], min_length: int = 0, max_length: int = 0, limit: int = 0
|
||||
) -> Callable[["Language"], Iterable[Example]]:
|
||||
return JsonlCorpus(path, min_length=min_length, max_length=max_length, limit=limit)
|
||||
|
||||
|
@ -221,7 +221,7 @@ class JsonlCorpus:
|
|||
|
||||
def __init__(
|
||||
self,
|
||||
path: Union[str, Path],
|
||||
path: Optional[Union[str, Path]],
|
||||
*,
|
||||
limit: int = 0,
|
||||
min_length: int = 0,
|
||||
|
|
Loading…
Reference in New Issue
Block a user