title: ValueError: nlp.add_pipe now takes the string name of the registered component factory, not a callable component
body: <p>The following <a href="https://stackoverflow.com/questions/57477852/spacy-matcher-with-entities-spanning-more-than-a-single-token">link</a> shows how to add custom entity rule where the entities span more than one token. The code to do that is below:</p>
  <pre><code>import spacy
  from spacy.pipeline import EntityRuler
  nlp = spacy.load('en_core_web_sm', parse=True, tag=True, entity=True)
  
  animal = [&quot;cat&quot;, &quot;dog&quot;, &quot;artic fox&quot;]
  ruler = EntityRuler(nlp)
  for a in animal:
      ruler.add_patterns([{&quot;label&quot;: &quot;animal&quot;, &quot;pattern&quot;: a}])
  nlp.add_pipe(ruler)
  
  
  doc = nlp(&quot;There is no cat in the house and no artic fox in the basement&quot;)
  
  with doc.retokenize() as retokenizer:
      for ent in doc.ents:
          retokenizer.merge(doc[ent.start:ent.end])
  
  
  from spacy.matcher import Matcher
  matcher = Matcher(nlp.vocab)
  pattern =[{'lower': 'no'},{'ENT_TYPE': {'REGEX': 'animal', 'OP': '+'}}]
  matcher.add('negated animal', None, pattern)
  matches = matcher(doc)
  
  
  for match_id, start, end in matches:
      span = doc[start:end]
      print(span)
  </code></pre>
  <p>I tried but i got the error bellow:</p>
  <ul>
  <li><p>If you created your component with <code>nlp.create_pipe('name')</code>: remove nlp.create_pipe and call <code>nlp.add_pipe('name')</code> instead.</p>
  </li>
  <li><p>If you passed in a component like <code>TextCategorizer()</code>: call <code>nlp.add_pipe</code> with the string name instead, e.g. <code>nlp.add_pipe('textcat')</code>.</p>
  </li>
  <li><p>If you're using a custom component: Add the decorator <code>@Language.component</code> (for function components) or <code>@Language.factory</code> (for class components / factories) to your custom component and assign it a name, e.g. <code>@Language.component('your_name')</code>. You can then run <code>nlp.add_pipe('your_name')</code> to add it to the pipeline.</p>
  </li>
  </ul>
  <p>How can I fixed please?
  <strong>NB: spaCy version 3.0.6</strong></p>