parameters: (self, x)
docstring: Transform documents to category-id matrix.
  
      Converts categories to ids give fitted vocabulary from `fit` or
      one provided in the constructor.
  
      Args:
        x: numpy matrix or iterable of lists/numpy arrays.
  
      Yields:
        x: iterable, [n_samples]. Category-id matrix.
docstring_summary: Transform documents to category-id matrix.
docstring_tokens: Transform documents to category - id matrix .
function: def transform(self, x):
      """Transform documents to category-id matrix.
  
      Converts categories to ids give fitted vocabulary from `fit` or
      one provided in the constructor.
  
      Args:
        x: numpy matrix or iterable of lists/numpy arrays.
  
      Yields:
        x: iterable, [n_samples]. Category-id matrix.
      """
      self.freeze()
      x = setup_processor_data_feeder(x)
      for row in x:
        output_row = []
        for idx, value in enumerate(row):
          # Return <UNK> when it's Nan.
          if (isinstance(value, float) and math.isnan(value)) or value == np.nan:
            output_row.append(0)
            continue
          output_row.append(self.vocabularies_[idx].get(value))
        yield np.array(output_row, dtype=np.int64)
function_tokens: def transform ( self , x ) : self . freeze ( ) x = setup_processor_data_feeder ( x ) for row in x : output_row = [ ] for idx , value in enumerate ( row ) : # Return <UNK> when it's Nan. if ( isinstance ( value , float ) and math . isnan ( value ) ) or value == np . nan : output_row . append ( 0 ) continue output_row . append ( self . vocabularies_ [ idx ] . get ( value ) ) yield np . array ( output_row , dtype = np . int64 )