From ef700401a6043e58d316f2c2aa3a29b027ecf54b Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 8 Jul 2015 20:00:46 +0200 Subject: [PATCH] * Add warning for models not found in parser --- spacy/syntax/parser.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/syntax/parser.pyx b/spacy/syntax/parser.pyx index 16280edaa..2427d4a74 100644 --- a/spacy/syntax/parser.pyx +++ b/spacy/syntax/parser.pyx @@ -72,9 +72,9 @@ cdef class Parser: def __init__(self, StringStore strings, model_dir, transition_system): if not os.path.exists(model_dir): print >> sys.stderr, "Warning: No model found at", model_dir - self.cfg = Config(labels=[], features=[]) + self.cfg = Config(labels={}, features=[]) 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" else: self.cfg = Config.read(model_dir, 'config')