We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 398c904 commit ff76a57Copy full SHA for ff76a57
medcat-v2/medcat/tokenizing/spacy_impl/tokenizers.py
@@ -106,12 +106,9 @@ def save_internals_to(self, folder_path: str) -> str:
106
folder_path, f"{TOKENIZER_PREFIX}{self._spacy_model_name}")
107
if os.path.exists(subfolder):
108
# NOTE: always overwrite
109
- shutil.rmtree(folder_path)
+ shutil.rmtree(subfolder)
110
logger.debug("Saving spacy model to '%s'", subfolder)
111
- cur_path = self._nlp._path
112
- if cur_path is None:
113
- raise ValueError(f"Unable to save spacy: {self._nlp}")
114
- shutil.copytree(cur_path, subfolder)
+ self._nlp.to_disk(subfolder)
115
return subfolder
116
117
def load_internals_from(self, folder_path: str) -> bool:
0 commit comments