SquirroItemSaver

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

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

Converts libNLP Document to Squirro items and saves them to a Squirro instance

Parameters
  • type (str) – squirro_item

  • client_id (str, None) – Squirro client id

  • client_secret (str, None) – Squirro client secret

  • cluster (str) – Squirro cluster URL

  • create_facets (bool, True) – whether or not to create new facets of detected type

  • project_id (str) – id of Squirro project

  • token (str) – Squirro token

  • 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(docs)

Process a batch of documents.

Methods Documentation

process_batch(docs)

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)