* 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
1 changed files with 2 additions and 2 deletions

View File

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