parameters: (self, **configs)
docstring: Initialize work flow
docstring_summary: Initialize work flow
docstring_tokens: Initialize work flow
function: def initialize(self, **configs):
          """
          Initialize work flow
          """
          self.ops = []
          get_termdict_method = None
          for op in self.flow.split(','):
              if op == 'gendict':
                  op_generate_dict = operation_unit.OpGenerateDict(**configs)
                  self.ops.append(op_generate_dict)
                  get_termdict_method = op_generate_dict.get_termdict
              elif op == 'convertid':
                  conf = dict(**configs)
                  conf['get_termdict'] = get_termdict_method
                  op_term2id = operation_unit.OpTerm2ID(**conf)
                  self.ops.append(op_term2id)
              elif op == 'partition':
                  op_partition = operation_unit.OpPartition(**configs)
                  self.ops.append(op_partition)
              elif op == 'write':
                  if operation_unit.OpPartition not in map(type, self.ops):
                      op_partition = \
                      operation_unit.OpPartition(passive=True, **configs)
                      self.ops.append(op_partition)
                  op_write = operation_unit.OpWriteData(**configs)
                  self.ops.append(op_write)
  
          self.check_topological()
  
          if 'write' in self.flow or 'gendict' in self.flow:
              outdir = os.path.join(self.output_dir, self.feature_name)
              if not os.path.exists(outdir):
                  os.makedirs(outdir)
function_tokens: def initialize ( self , * * configs ) : self . ops = [ ] get_termdict_method = None for op in self . flow . split ( ',' ) : if op == 'gendict' : op_generate_dict = operation_unit . OpGenerateDict ( * * configs ) self . ops . append ( op_generate_dict ) get_termdict_method = op_generate_dict . get_termdict elif op == 'convertid' : conf = dict ( * * configs ) conf [ 'get_termdict' ] = get_termdict_method op_term2id = operation_unit . OpTerm2ID ( * * conf ) self . ops . append ( op_term2id ) elif op == 'partition' : op_partition = operation_unit . OpPartition ( * * configs ) self . ops . append ( op_partition ) elif op == 'write' : if operation_unit . OpPartition not in map ( type , self . ops ) : op_partition = operation_unit . OpPartition ( passive = True , * * configs ) self . ops . append ( op_partition ) op_write = operation_unit . OpWriteData ( * * configs ) self . ops . append ( op_write ) self . check_topological ( ) if 'write' in self . flow or 'gendict' in self . flow : outdir = os . path . join ( self . output_dir , self . feature_name ) if not os . path . exists ( outdir ) : os . makedirs ( outdir )