mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
Avoid forcing a name on empty vectors, and remove print statement
This commit is contained in:
parent
cf5fcf0546
commit
a7c5ae2beb
|
@ -695,6 +695,8 @@ def _fix_pretrained_vectors_name(nlp):
|
|||
# data
|
||||
if 'vectors' in nlp.meta and nlp.meta['vectors'].get('name'):
|
||||
nlp.vocab.vectors.name = nlp.meta['vectors']['name']
|
||||
elif not nlp.vocab.vectors.size:
|
||||
nlp.vocab.vectors.name = None
|
||||
elif 'name' in nlp.meta and 'lang' in nlp.meta:
|
||||
vectors_name = '%s_%s.vectors' % (nlp.meta['lang'], nlp.meta['name'])
|
||||
nlp.vocab.vectors.name = vectors_name
|
||||
|
@ -706,7 +708,6 @@ def _fix_pretrained_vectors_name(nlp):
|
|||
if proc.cfg.get('pretrained_dims'):
|
||||
assert nlp.vocab.vectors.name
|
||||
proc.cfg['pretrained_vectors'] = nlp.vocab.vectors.name
|
||||
print(proc.cfg)
|
||||
|
||||
|
||||
class DisabledPipes(list):
|
||||
|
|
Loading…
Reference in New Issue
Block a user