I have trained a custom SpaCy named entity recognition model. I saved the model to disk using:


which results in keeping the model in a folder. Is it possible to make the nlp object to a pickle file?


1 Answer 1


Yes - Here is how to pickle in Python:

import pickle

pickle.dump(nlp, open( "nlp.p", "wb" ))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.