* Set transition system early

This commit is contained in:
Matthew Honnibal 2015-06-15 02:54:12 +02:00
parent 38a6afa484
commit 4841f8ad5e

View File

@ -94,9 +94,6 @@ def train(Language, gold_tuples, model_dir, n_iter=15, feat_set=u'basic',
os.mkdir(pos_model_dir)
os.mkdir(ner_model_dir)
if use_orig_arc_eager:
Language.ParserTransitionSystem = OrigArcEager
setup_model_dir(sorted(POS_TAGS.keys()), POS_TAGS, POS_TEMPLATES, pos_model_dir)
Config.write(dep_model_dir, 'config', features=feat_set, seed=seed,
@ -108,6 +105,8 @@ def train(Language, gold_tuples, model_dir, n_iter=15, feat_set=u'basic',
if n_sents > 0:
gold_tuples = gold_tuples[:n_sents]
if use_orig_arc_eager:
Language.ParserTransitionSystem = OrigArcEager
nlp = Language(data_dir=model_dir)