* Add warning for models not found in parser

This commit is contained in:
Matthew Honnibal 2015-07-08 19:59:16 +02:00
parent f6a6c39ce8
commit 6218d8b389

View File

@ -76,8 +76,8 @@ cdef class Parser:
elif not os.path.isdir(model_dir):
self.cfg = Config(labels=[], features=[])
print >> sys.stderr, "Warning: model path:", model_dir, "is not a directory"
self.cfg = Config.read(model_dir, 'config')
else:
self.cfg = Config.read(model_dir, 'config')
self.moves = transition_system(strings, self.cfg.labels)
templates = get_templates(self.cfg.features)
self.model = Model(self.moves.n_moves, templates, model_dir)