ThresholdFilter

class squirro.lib.nlp.steps.filters.ThresholdFilter(config)

Bases: squirro.lib.nlp.steps.filters.Filter

Filters out weighted facets with values below threshold.

Parameters
  • type (str) – threshold

  • field (str, None) – Field to threshold

  • fields (list, None) – List of fields to threshold

  • input_fields (list, None) – List of fields to threshold from

  • output_fields (list, None) – List of fields to threshold to

  • flatten (bool, False) – Whether or not to flatten the thresholded fields.

  • excluded_values (list, []) – Values that will not count towards the threshold.

  • threshold (float, 0.5) – Value under which the field will be removed.

  • skip (bool, True) – Whether or not to skip a doc below threshold.

Methods Summary

process_doc(doc)

Process a document

Methods Documentation

process_doc(doc)

Process a document

Parameters

doc (Document) – Document

Returns

Processed document

Return type

Document