CopyFilter

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

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

The copy Filter copies input fields into output fields with copy.deepcopy

Input - No specific input fields type required as long as it is compatible with copy.deepcopy

Output - The output field type is going to be the same as the input field type

Parameters
  • type (str) – copy

  • input_fields (list) – Fields to copy

  • output_fields (list) – Fields to copy into

Example

{
    "step": "filter",
    "type": "copy",
    "input_fields":["body"],
    "output_fields":["copied_body"]
}

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