From e607e4b59899c7376077f09779e0881ec3df39c7 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 26 Sep 2016 17:51:11 +0200 Subject: [PATCH] Fix parser loading --- spacy/syntax/parser.pyx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spacy/syntax/parser.pyx b/spacy/syntax/parser.pyx index 344a13fad..51a3b6be5 100644 --- a/spacy/syntax/parser.pyx +++ b/spacy/syntax/parser.pyx @@ -92,7 +92,10 @@ cdef class Parser: @classmethod def blank(cls, Vocab vocab, moves_class, **cfg): moves = moves_class(vocab.strings, cfg.get('labels', {})) - templates = get_templates(cfg.get('features', tuple())) + if 'features' in cfg: + templates = get_templates(cfg['features']) + else: + templates = tuple() model = ParserModel(templates) return cls(vocab, moves, model, **cfg)