From a6ac92f077b36a3d46b8b5db14fe501b6cdf57de Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 8 Apr 2015 22:48:26 +0200 Subject: [PATCH] * Respect the model_dir input parameter to train.py --- bin/parser/train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/parser/train.py b/bin/parser/train.py index 9984d4f97..ee97fa510 100755 --- a/bin/parser/train.py +++ b/bin/parser/train.py @@ -212,7 +212,7 @@ def train(Language, train_loc, model_dir, n_iter=15, feat_set=u'basic', seed=0, if n_sents > 0: gold_tuples = gold_tuples[:n_sents] - nlp = Language() + nlp = Language(data_dir=model_dir) print "Itn.\tUAS\tNER F.\tTag %" for itn in range(n_iter): @@ -244,7 +244,7 @@ def train(Language, train_loc, model_dir, n_iter=15, feat_set=u'basic', seed=0, def evaluate(Language, dev_loc, model_dir, gold_preproc=False, verbose=True): assert not gold_preproc - nlp = Language() + nlp = Language(data_dir=model_dir) gold_tuples = read_docparse_file(dev_loc) scorer = Scorer() for raw_text, segmented_text, annot_tuples in gold_tuples: