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: # pylint: disable=line-too-long
  Serializes the pipeline to file (using json)
  
  Args:
  filename: location of where to serialize pipeline
  
  >>> import tempfile
  >>> fp = tempfile.NamedTemporaryFile()
  >>> Pipeline(['NSentences', ('CleanText', {'some': 'arg'})]).save(fp.name)
  >>> sorted(json.load(fp).items())
  [('hint_language', None), ('kwargs', {}), ('language', None), ('steps', [['NSentences', {}], ['CleanText', {'some': 'arg'}]])]
  >>> fp.close()
docstr_tok: ["#","pylint",":","disable=line-too-long","Serializes","the","pipeline","to","file","(","using","json",")","Args",":","filename",":","location","of","where","to","serialize","pipeline",">",">",">","import","tempfile",">",">",">","fp","=","tempfile.NamedTemporaryFile","(",")",">",">",">","Pipeline","(","[","'NSentences","'",",","(","'CleanText","'",",","{","'some","'",":","'arg","'","}",")","]",")",".save","(","fp.name",")",">",">",">","sorted","(","json.load","(","fp",")",".items","(",")",")","[","(","'hint_language","'",",","None",")",",","(","'kwargs","'",",","{","}",")",",","(","'language","'",",","None",")",",","(","'steps","'",",","[","[","'NSentences","'",",","{","}","]",",","[","'CleanText","'",",","{","'some","'",":","'arg","'","}","]","]",")","]",">",">",">","fp.close","(",")"]
code: def save(self, filename):
      """# pylint: disable=line-too-long
      Serializes the pipeline to file (using json)
  
      Args:
      filename: location of where to serialize pipeline
  
      >>> import tempfile
      >>> fp = tempfile.NamedTemporaryFile()
      >>> Pipeline(['NSentences', ('CleanText', {'some': 'arg'})]).save(fp.name)
      >>> sorted(json.load(fp).items())
      [('hint_language', None), ('kwargs', {}), ('language', None), ('steps', [['NSentences', {}], ['CleanText', {'some': 'arg'}]])]
      >>> fp.close()
      """
      with open(filename, "w") as json_file:
          # serialize all public attrs
          serialize = {
              k: v
              for k, v in self.__dict__.items()
              if not k.startswith("_")
          }
          json.dump(serialize, json_file)
  
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 4 for calling the Pipeline obj's underlying member method code with example usage: obj.save(filename) without return types