diff --git a/spacy/lookups.py b/spacy/lookups.py index 741d40330..e639009df 100644 --- a/spacy/lookups.py +++ b/spacy/lookups.py @@ -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())