CSVSaver#

class CSVSaver(config)#

Bases: Saver

Saves all Document to a specified output_file in CSV format

Parameters:
  • type (str) – csv

  • output_file (str) – path to output CSV file (relative to ml workflow path)

Example

{
    "step": "saver",
    "type": "csv",
    "fields": [ "text", "prediction" ],
    "output_file": "data.csv"
}

Methods Summary

process_batch(batch)

Process a batch of documents.

Methods Documentation

process_batch(batch)#

Process a batch of documents. If not defined will default to using self.process_doc for each document in the batch.

Parameters:

batch (list(Document)) – List of documents

Returns:

List of processed documents

Return type:

list(Document)