class_docstr: Create a pipeline instance based on the elements you would want from your text
  
  >>> pipe = Pipeline(['Raw', ('NWords',), ('CleanText',)])
  >>> sorted(pipe('Test sentence <a=>').items())
  [('CleanText', 'Test sentence'), ('NWords', 2), ('Raw', 'Test sentence <a=>')]
class_docstr_tok: ["Create","a","pipeline","instance","based","on","the","elements","you","would","want","from","your","text",">",">",">","pipe","=","Pipeline","(","[","'Raw","'",",","(","'NWords","'",",",")",",","(","'CleanText","'",",",")","]",")",">",">",">","sorted","(","pipe","(","'Test","sentence","<","a=",">","'",")",".items","(",")",")","[","(","'CleanText","'",",","'Test","sentence","'",")",",","(","'NWords","'",",","2",")",",","(","'Raw","'",",","'Test","sentence","<","a=",">","'",")","]"]
docstr: Initialize a Pipeline instance
  
  Args:
  steps: list with strings and/or (operation_name, operation_kwargs)-tuples
  language: 2-letter code for the language of the text
  hint_language: language you expect your text to be
  models: list of (model_name, lang, model_path)-tuples to load custom spacy language modules
docstr_tok: ["Initialize","a","Pipeline","instance","Args",":","steps",":","list","with","strings","and\/or","(","operation_name",",","operation_kwargs",")","-tuples","language",":","2-letter","code","for","the","language","of","the","text","hint_language",":","language","you","expect","your","text","to","be","models",":","list","of","(","model_name",",","lang",",","model_path",")","-tuples","to","load","custom","spacy","language","modules"]
code: def __init__(
      self,
      steps,
      language=None,
      hint_language=None,
      models=None,
      **kwargs,
  ):
      """
      Initialize a Pipeline instance
  
      Args:
      steps: list with strings and/or (operation_name, operation_kwargs)-tuples
      language: 2-letter code for the language of the text
      hint_language: language you expect your text to be
      models: list of (model_name, lang, model_path)-tuples to load custom spacy language modules
      """
      self.language = language
      self.hint_language = hint_language
      self._spacy_nlps = {}
      self._gensim_vectors = {}
      self.kwargs = kwargs
      self._operations = {}
      self.steps = []
  
      # loop over pipeline operations and instantiate operation classes.
      for oper in steps:
          if isinstance(oper, str):
              oper_name = oper
              oper_kwargs = {}
          else:
              oper_name = oper[0]
              oper_kwargs = oper[1] if len(oper) > 1 else {}
  
          self.steps.append((oper_name, oper_kwargs))
  
          oper_cls = getattr(textpipe.operation, oper_name)
  
          # initialize the target class with the given kwargs
          self._operations[oper_name] = oper_cls(**oper_kwargs)
  
      # loop over model paths and load custom models into _spacy_nlp
      if models:
          for model_name, lang, model_path in models:
              if lang not in self._spacy_nlps:
                  self._spacy_nlps[lang] = {}
              model = spacy.load(model_path)
              self._spacy_nlps[lang][model_name] = model
  
file_path: textpipe/textpipe/pipeline.py
imports: import json
  import spacy
  from textpipe.doc import Doc
  import textpipe.operation
label_desc: Use image node_id 1 to create a new Pipeline object  with example: obj = Pipeline(steps, language, hint_language, models)