      """Pipeline component for text classification.
  
      DOCS: https://spacy.io/api/textcategorizer
      """
  
      @classmethod
      def Model(cls, nr_class=1, exclusive_classes=None, **cfg):
          if nr_class == 1:
              exclusive_classes = False
          if exclusive_classes is None:
              raise ValueError(
                  "TextCategorizer Model must specify 'exclusive_classes'. "
                  "This setting determines whether the model will output "
                  "scores that sum to 1 for each example. If only one class "
                  "is true for each example, you should set exclusive_classes=True. "
                  "For 'multi_label' classification, set exclusive_classes=False."
              )
          if "embed_size" not in cfg:
              cfg["embed_size"] = util.env_opt("embed_size", 2000)
          if "token_vector_width" not in cfg:
              cfg["token_vector_width"] = util.env_opt("token_vector_width", 96)
          if cfg.get("architecture") == "bow":
              return build_bow_text_classifier(nr_class, exclusive_classes, **cfg)
          else:
              if "tok2vec" in cfg:
                  tok2vec = cfg["tok2vec"]
              else:
                  config = {
                      "width": cfg.get("token_vector_width", 96),
                      "embed_size": cfg.get("embed_size", 2000),
                      "pretrained_vectors": cfg.get("pretrained_vectors", None),
                      "window_size": cfg.get("window_size", 1),
                      "cnn_maxout_pieces": cfg.get("cnn_maxout_pieces", 3),
                      "subword_features": cfg.get("subword_features", True),
                      "char_embed": cfg.get("char_embed", False),
                      "conv_depth": cfg.get("conv_depth", 4),
                      "bilstm_depth": cfg.get("bilstm_depth", 0),
                  }
                  tok2vec = Tok2Vec(**config)
                  return build_simple_cnn_text_classifier(
                      tok2vec,
                      nr_class,
                      exclusive_classes,
                      **cfg
                  )
  
      @property
      def tok2vec(self):
          if self.model in (None, True, False):
              return None
          else:
              return self.model.tok2vec
  
      def __init__(self, vocab, model=True, **cfg):
          self.vocab = vocab
          self.model = model
          self._rehearsal_model = None
          self.cfg = dict(cfg)
          if "exclusive_classes" not in cfg:
 
</s> remove     @classmethod
    def Model(cls, n_tags=None, **cfg):
        if cfg.get("pretrained_dims") and not cfg.get("pretrained_vectors"):
            raise ValueError(TempErrors.T008)
        if "tok2vec" in cfg:
            tok2vec = cfg["tok2vec"]
        else:
            config = {
                "width": cfg.get("token_vector_width", 96),
                "embed_size": cfg.get("embed_size", 2000),
                "pretrained_vectors": cfg.get("pretrained_vectors", None),
                "window_size": cfg.get("window_size", 1),
                "cnn_maxout_pieces": cfg.get("cnn_maxout_pieces", 3),
                "subword_features": cfg.get("subword_features", True),
                "char_embed": cfg.get("char_embed", False),
                "conv_depth": cfg.get("conv_depth", 4),
                "bilstm_depth": cfg.get("bilstm_depth", 0),
            }
            tok2vec = Tok2Vec(**config)
        return build_tagger_model(n_tags, tok2vec)

 </s> add  </s> remove         if "exclusive_classes" not in cfg:
            self.cfg["exclusive_classes"] = True
 </s> add  </s> remove     def __init__(self, vocab, model=True, **cfg):
 </s> add     def __init__(self, vocab, model, **cfg): </s> remove     def __init__(self, vocab, model=True, **cfg):
 </s> add     def __init__(self, vocab, model, **cfg): </s> remove     @classmethod
    def Model(cls, **cfg):
        if cfg.get('pretrained_dims') and not cfg.get('pretrained_vectors'):
            raise ValueError(TempErrors.T008)
        class_map = Morphology.create_class_map()
        return build_morphologizer_model(class_map.field_sizes, **cfg)

    def __init__(self, vocab, model=True, **cfg):
 </s> add     def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
      """Pipeline component for text classification.
  
      DOCS: https://spacy.io/api/textcategorizer
      """
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
    def __init__(self, vocab, model, **cfg):
          self.vocab = vocab
          self.model = model
          self._rehearsal_model = None
          self.cfg = dict(cfg)
          if "exclusive_classes" not in cfg:
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Default settings to configurations (#4995)

* fix grad_clip naming

* cleaning up pretrained_vectors out of cfg

* further refactoring Model init's

* move Model building out of pipes

* further refactor to require a model config when creating a pipe

* small fixes

* making cfg in nn_parser more consistent

* fixing nr_class for parser

* fixing nn_parser's nO

* fix printing of loss

* architectures in own file per type, consistent naming

* convenience methods default_tagger_config and default_tok2vec_config

* let create_pipe access default config if available for that component

* default_parser_config

* move defaults to separate folder

* allow reading nlp from package or dir with argument 'name'

* architecture spacy.VocabVectors.v1 to read static vectors from file

* cleanup

* default configs for nel, textcat, morphologizer, tensorizer

* fix imports

* fixing unit tests

* fixes and clean up

* fixing defaults, nO, fix unit tests

* restore parser IO

* fix IO

* 'fix' serialization test

* add *.cfg to manifest

* fix example configs with additional arguments

* replace Morpohologizer with Tagger

* add IO bit when testing overfitting of tagger (currently failing)

* fix IO - don't initialize when reading from disk

* expand overfitting tests to also check IO goes OK

* remove dropout from HashEmbed to fix Tagger performance

* add defaults for sentrec

* update thinc

* always pass a Model instance to a Pipe

* fix piped_added statement

* remove obsolete W029

* remove obsolete errors

* restore byte checking tests (work again)

* clean up test

* further test cleanup

* convert from config to Model in create_pipe

* bring back error when component is not initialized

* cleanup

* remove calls for nlp2.begin_training

* use thinc.api in imports

* allow setting charembed's nM and nC

* fix for hardcoded nM/nC + unit test

* formatting fixes

* trigger build 
spacy/pipeline/pipes.pyx