mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Create directory if it doesn't exist
This commit is contained in:
parent
aa4ff0baa1
commit
32404e613c
|
@ -114,6 +114,8 @@ class Lookups(object):
|
|||
"""
|
||||
if len(self._tables):
|
||||
path = ensure_path(path)
|
||||
if not path.exists():
|
||||
path.mkdir()
|
||||
filepath = path / "lookups.bin"
|
||||
with filepath.open("wb") as file_:
|
||||
file_.write(self.to_bytes())
|
||||
|
|
Loading…
Reference in New Issue
Block a user