mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-14 11:36:24 +03:00
Load vectors in Language.from_config
This commit is contained in:
parent
df95e2af64
commit
30dd96c540
|
@ -1408,6 +1408,8 @@ class Language:
|
||||||
nlp = cls(
|
nlp = cls(
|
||||||
create_tokenizer=create_tokenizer, create_lemmatizer=create_lemmatizer,
|
create_tokenizer=create_tokenizer, create_lemmatizer=create_lemmatizer,
|
||||||
)
|
)
|
||||||
|
if config["training"]["vectors"] is not None:
|
||||||
|
util.load_vectors_into_model(nlp, config["training"]["vectors"])
|
||||||
pipeline = config.get("components", {})
|
pipeline = config.get("components", {})
|
||||||
for pipe_name in config["nlp"]["pipeline"]:
|
for pipe_name in config["nlp"]["pipeline"]:
|
||||||
if pipe_name not in pipeline:
|
if pipe_name not in pipeline:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user