mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-05 21:00:19 +03:00
dont quit but warn
This commit is contained in:
parent
c425ad1443
commit
453dde899d
|
@ -117,8 +117,10 @@ def apply(
|
||||||
docbin = DocBin(store_user_data=True)
|
docbin = DocBin(store_user_data=True)
|
||||||
paths = walk_directory(data_path)
|
paths = walk_directory(data_path)
|
||||||
if len(paths) == 0:
|
if len(paths) == 0:
|
||||||
msg.fail("Did not find data to process,"
|
docbin.to_disk(output_file)
|
||||||
f" {data_path} seems to be an empty directory.", exits=1)
|
msg.warn("Did not find data to process,"
|
||||||
|
f" {data_path} seems to be an empty directory.")
|
||||||
|
return
|
||||||
nlp = load_model(model)
|
nlp = load_model(model)
|
||||||
msg.good(f"Loaded model {model}")
|
msg.good(f"Loaded model {model}")
|
||||||
vocab = nlp.vocab
|
vocab = nlp.vocab
|
||||||
|
|
Loading…
Reference in New Issue
Block a user