SquirroItemSaver#
- class SquirroItemSaver(config)#
Bases:
Saver
Converts libNLP
Document
to Squirro items and saves them to a SquirrinstanceNote - The fields client_id, client_secret, cluster, token and project_id do not need to be set if it is used inside the Squirro machinelearning service
- Parameters:
type (str) – squirro_item
client_id (str, None) – Squirro client id
client_secret (str, None) – Squirro client secret
cluster (str) – Squirro cluster URL
token (str) – Squirro token
project_id (str) – id of Squirro project
create_facets (bool, True) – whether or not to create new facets of detected type
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
Example
{ "step": "saver", "type": "squirro_item", "cluster": "CLUSTER", "token": "TOKEN", "project_id": "PROJECT_ID", "fields":["keywords.prediction"] }
Methods Summary
process_batch
(docs)Process a batch of documents.
Methods Documentation