I have trained a custom SpaCy named entity recognition model. I saved the model to disk using:
nlp.to_disk()
which results in keeping the model in a folder. Is it possible to make the nlp object to a pickle file?
Data Science Stack Exchange is a question and answer site for Data science professionals, Machine Learning specialists, and those interested in learning more about the field. It only takes a minute to sign up.
Sign up to join this communityYes - Here is how to pickle in Python:
import pickle
pickle.dump(nlp, open( "nlp.p", "wb" ))