Fix parser loading

This commit is contained in:
Matthew Honnibal 2016-09-26 17:51:11 +02:00
parent 0b2d7ae9d6
commit e607e4b598
1 changed files with 4 additions and 1 deletions

View File

@ -92,7 +92,10 @@ cdef class Parser:
@classmethod @classmethod
def blank(cls, Vocab vocab, moves_class, **cfg): def blank(cls, Vocab vocab, moves_class, **cfg):
moves = moves_class(vocab.strings, cfg.get('labels', {})) 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) model = ParserModel(templates)
return cls(vocab, moves, model, **cfg) return cls(vocab, moves, model, **cfg)