mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 09:56:28 +03:00
Fix parser features
This commit is contained in:
parent
e607e4b598
commit
ee6fa106da
|
@ -92,10 +92,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('labels', {}))
|
||||||
if 'features' in cfg:
|
templates = cfg.get('features', tuple())
|
||||||
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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user