title: Custom NER on Spacy3.0 - ValueError
body: <p>I am trying to train Spacy3.0 to recognize new naimed entity. I do exactly as specified in this article: <a href="https://towardsdatascience.com/using-spacy-3-0-to-build-a-custom-ner-model-c9256bea098" rel="nofollow noreferrer">https://towardsdatascience.com/using-spacy-3-0-to-build-a-custom-ner-model-c9256bea098</a></p>
  <pre><code>for text, annot in tqdm(TRAIN_DATA): # data in previous format
      doc = nlp.make_doc(text) # create doc object from text
      ents = []
      
      for i in annot[&quot;entities&quot;]:
          start = i[0]
          end = i[1]
          label = i[2]
   
          span = doc.char_span(start, end, label=label, alignment_mode=&quot;contract&quot;)
          ents.append(span)
      doc.ents = ents
      db.add(doc)
  db.to_disk(r&quot;train.spacy&quot;) # save the docbin object
  </code></pre>
  <p>And everything works untill I add several ner to &quot;ents&quot;.</p>
  <p>For example: -Dad buy Apple- works ok. But -Dad buy Apple and Sumsung- doesn't work.</p>
  <p>I get an error:
  &quot;Aborting and saving the final best model. Encountered exception: ValueError()&quot;
  File &quot;spacy\pipeline_parser_internals\ner.pyx&quot;, line 310, in spacy.pipeline._parser_internals.ner.BiluoPushDown.set_costs
  ValueError</p>
  <p>Maybe something should be changed in config.cfg, but I can not find what.</p>