mirror of https://github.com/explosion/spaCy.git
Fix serialization of parser
This commit is contained in:
parent
40837b275d
commit
2489dcaccf
|
@ -307,6 +307,8 @@ cdef class Parser:
|
||||||
cfg['beam_width'] = util.env_opt('beam_width', 1)
|
cfg['beam_width'] = util.env_opt('beam_width', 1)
|
||||||
if 'beam_density' not in cfg:
|
if 'beam_density' not in cfg:
|
||||||
cfg['beam_density'] = util.env_opt('beam_density', 0.0)
|
cfg['beam_density'] = util.env_opt('beam_density', 0.0)
|
||||||
|
if 'pretrained_dims' not in cfg:
|
||||||
|
cfg['pretrained_dims'] = self.vocab.vectors.data.shape[1]
|
||||||
self.cfg = cfg
|
self.cfg = cfg
|
||||||
if 'actions' in self.cfg:
|
if 'actions' in self.cfg:
|
||||||
for action, labels in self.cfg.get('actions', {}).items():
|
for action, labels in self.cfg.get('actions', {}).items():
|
||||||
|
|
Loading…
Reference in New Issue