SmartfilterClassifier#
- class SmartfilterClassifier(config)#
Bases:
Classifier
The smartfilter
Classifier
uses the Elastic Search based highlight tags <squirro:highlight> and </squirro:highlight> to classify text fragments.Note - The
squirro.lib.nlp.steps.loaders.SquirroQueryLoader
step needs to be run before this step, further make sure that search highlighting is switched on. It works with normal search queries and smartfilters.Input - all input fields need to be of type
str
.Output - the output field is filled with data of type
str
. It contains the extract which is encapsulated by the highlight tags. the lable_field is filled with the smartfilter_label.- Parameters:
Example
{ "step": "classifier", "type": "smartfilter", "input_field": "body", "output_field": "extract", "smartfilter_label": "classA", "label_field": "label" }
Methods Summary
process_doc
(doc)Process a document
Methods Documentation