WhitelistFilter

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

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

Removes documents based on a whitelist

Parameters
  • type (str) – whitelist

  • replacements (dict, {}) – Dictionary of replacement values for non-whitelisted field values

  • whitelists (dict) – Dictionary of fields to apply the whitelisting, each with a list of whitelisted values

  • is_unique (bool, True) – Whether or not values are unique

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