How to serialize/pickle a spacy ner model? 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?
Yes - Here is how to pickle in Python:
import pickle

pickle.dump(nlp, open( &quot;nlp.p&quot;, &quot;wb&quot; ))