In spacy 2 I use this to add a vocab to an empty spacy model with vectorspace (spacy init) :
nlp3=spacy.load('nl_core_news_sm') #standard model without vectors
spacy.load("spacyinitnlmodelwithvectorspace",vocab=nlp3.vocab)
In spacy nightly version 3.0.0rc the vocab parameter is not in spacy.load anymore. Has anyone a suggesstion how I can add vocab to a spacy model?
this works, from Export vectors from fastText to spaCy add's vecfile to spacy model. only tested on small dataset
from future import unicode_literals
import numpy import spacy
def spacy_load_vec(spacy_model,vec_file,spacy_vec_model,print_words=False): """ spacy model zonder vectoren + vecfile wordt spacy model met vectorspace Export vectors from fastText to spaCy