mirror of
https://github.com/explosion/spaCy.git
synced 2025-03-13 07:55:49 +03:00
Update train_ud.py
Create deps folder if it doesn't exist.
This commit is contained in:
parent
57fab43a3a
commit
c1ef07788c
|
@ -71,6 +71,8 @@ def main(train_loc, dev_loc, model_dir, tag_map_loc):
|
|||
features = get_templates('basic')
|
||||
|
||||
model_dir = pathlib.Path(model_dir)
|
||||
if not (model_dir / 'deps').exists():
|
||||
(model_dir / 'deps').mkdir()
|
||||
with (model_dir / 'deps' / 'config.json').open('w') as file_:
|
||||
json.dump({'pseudoprojective': True, 'labels': actions, 'features': features}, file_)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user