title: Add custom NER model to spaCy pipeline
body: <p>I created a custom NER model using Prodi.gy. I saved the model to disk, once I performed all of the processing and validations. I can instantiate the model from disk using spacy.load and it seems to work well. My question now is how do I add that custom NER model to a spacy pipeline? I want to make sure I have the tagger, parser, etc. in the pipeline plus my custom NER model.</p>
  <p>It seems like I should initialize a base nlp from one of the existing models (en_core_web_sm), remove the existing NER, and replace it with my custom NER. This is no doubt user error, I just can't seem to figure out from the documentation and trial/error what I am doing wrong (or need to do).</p>
  <p>Maybe my operations are wrong? Maybe I should try to add the tagger and parser to my custom model instantiation?</p>
  <pre><code>I was able to get it to work by adding the &quot;tagged&quot; and &quot;parser&quot; from one of the en models and then modifying the meta.json file. That doesn't seem like the right approach. 
  </code></pre>
  <p>I tried this obviously not right:</p>
  <pre><code>nlp = spacy.load(&quot;en_core_web_sm&quot;)
  #remove existing NER
  nlp.remove_pipe('ner')
  print(&quot;Pipeline&quot;, nlp.pipe_names)
  
  nlp_entity = spacy.load(&quot;custom_ner_model&quot;)
  
  nlp.add_pipe(nlp_entity)
  print(&quot;Pipeline&quot;, nlp.pipe_names)
  
  Pipeline ['tagger', 'parser']
  Pipeline ['tagger', 'parser', 'English']
  </code></pre>
  <p>I then tried this to build the NER from the custom model and add it and also not right:</p>
  <pre><code>nlp = spacy.load(&quot;en_core_web_sm&quot;)
  #remove existing NER
  nlp.remove_pipe('ner')
  print(&quot;Pipeline&quot;, nlp.pipe_names)
  
  nlp_entity = spacy.load(&quot;custom_ner_model&quot;)
  ner = nlp_entity.create_pipe(&quot;ner&quot;)
  
  nlp.add_pipe(ner,last=True)
  print(&quot;Pipeline&quot;, nlp.pipe_names)
  
  </code></pre>
  <p>Error if I try to run with ner in pipeline:</p>
  <pre><code>text = &quot;This is a test&quot;
  doc = nlp(text)
  displacy.render(doc, style=&quot;ent&quot;)
  
  ValueError: [E109] Model for component 'ner' not initialized. Did you forget to load a model, or forget to call begin_training()?
  </code></pre>
  <p>Also got this error, which is what drove me to try adding tagger/parser from the base en models</p>
  <pre><code>ValueError: [E155] The pipeline needs to include a tagger in order to use Matcher or PhraseMatcher with the attributes POS, TAG, or LEMMA. Try using nlp() instead of nlp.make_doc() or list(nlp.pipe()) instead of list(nlp.tokenizer.pipe()).
  </code></pre>