JSONSaver

class squirro.lib.nlp.steps.savers.JSONSaver(config)

Bases: squirro.lib.nlp.steps.savers.Saver

Saves to a specified output_file in JSON format

Parameters
  • type (str) – json

  • output_file (str) – path to output json directory

  • tracking_facet_name (str, 'ml_workflow') – Facet used to track whether or not an item has been seen

  • tracking_facet_value (str, None) – Facet value to apply to tracking facet

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)