Rename 'labels' to 'actions' in parser options

This commit is contained in:
Matthew Honnibal 2016-10-16 11:42:26 +02:00
parent 8a6b35d266
commit 4fc56d4a31
1 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@ cdef class Parser:
# TODO: Remove this when we no longer need to support old-style models # TODO: Remove this when we no longer need to support old-style models
if isinstance(cfg.get('features'), basestring): if isinstance(cfg.get('features'), basestring):
cfg['features'] = get_templates(cfg['features']) cfg['features'] = get_templates(cfg['features'])
moves = moves_class(vocab.strings, cfg['labels']) moves = moves_class(vocab.strings, cfg['actions'])
model = ParserModel(cfg['features']) model = ParserModel(cfg['features'])
if (path / 'model').exists(): if (path / 'model').exists():
model.load(str(path / 'model')) model.load(str(path / 'model'))
@ -93,7 +93,7 @@ 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('actions', {}))
templates = cfg.get('features', tuple()) templates = cfg.get('features', tuple())
model = ParserModel(templates) model = ParserModel(templates)
return cls(vocab, moves, model, **cfg) return cls(vocab, moves, model, **cfg)