mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-21 01:21:58 +03:00
Only fill [nlp.vectors]
This commit is contained in:
parent
6e615adf5b
commit
8332eadfbd
|
@ -1771,8 +1771,10 @@ class Language:
|
|||
).merge(config)
|
||||
if "nlp" not in config:
|
||||
raise ValueError(Errors.E985.format(config=config))
|
||||
# auto-fill [nlp]
|
||||
config["nlp"] = Config(cls.default_config["nlp"]).merge(config["nlp"])
|
||||
# fill in [nlp.vectors] if not present (as a narrower alternative to
|
||||
# auto-filling [nlp] from the default config)
|
||||
if "vectors" not in config["nlp"]:
|
||||
config["nlp"]["vectors"] = {"@misc": "spacy.Vectors.v1"}
|
||||
config_lang = config["nlp"].get("lang")
|
||||
if config_lang is not None and config_lang != cls.lang:
|
||||
raise ValueError(
|
||||
|
|
Loading…
Reference in New Issue
Block a user