mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 10:46:29 +03:00
Fix default use of feature_templates in parser
This commit is contained in:
parent
3fba897e0f
commit
7887ab3b36
|
@ -94,6 +94,8 @@ 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'])
|
||||||
|
elif 'features' not in cfg:
|
||||||
|
cfg['features'] = self.feature_templates
|
||||||
self.model = ParserModel(cfg['features'])
|
self.model = ParserModel(cfg['features'])
|
||||||
self.cfg = cfg
|
self.cfg = cfg
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user