From 74c2c6a58cabdb31b77df3b24f6068355d9738bb Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 11 Oct 2017 08:49:12 +0200 Subject: [PATCH] Add default name and lang to meta --- spacy/cli/train.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/cli/train.py b/spacy/cli/train.py index 05d035769..a8b45e8fa 100644 --- a/spacy/cli/train.py +++ b/spacy/cli/train.py @@ -68,6 +68,8 @@ def train(cmd, lang, output_dir, train_data, dev_data, n_iter=10, n_sents=0, if not isinstance(meta, dict): prints("Expected dict but got: {}".format(type(meta)), title="Not a valid meta.json format", exits=1) + meta.setdefault('lang', lang) + meta.setdefault('name', 'unnamed') pipeline = ['tagger', 'parser', 'ner'] if no_tagger and 'tagger' in pipeline: pipeline.remove('tagger')