mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-26 17:24:41 +03:00
Fix iteration order
This commit is contained in:
parent
3d8388969e
commit
26afd3bd90
|
@ -62,7 +62,7 @@ def read_json_file(loc, docs_filter=None, limit=None):
|
|||
"""Read Example dictionaries from a json file or directory."""
|
||||
loc = util.ensure_path(loc)
|
||||
if loc.is_dir():
|
||||
for filename in loc.iterdir():
|
||||
for filename in sorted(loc.iterdir()):
|
||||
yield from read_json_file(loc / filename, limit=limit)
|
||||
else:
|
||||
with loc.open("rb") as file_:
|
||||
|
|
Loading…
Reference in New Issue
Block a user