QueryClassifier
QueryClassifier#
- class squirro.lib.nlp.apps.query_processing.QueryClassifier(config)#
Bases:
squirro.lib.nlp.steps.runtimes.onnx_runtime.ONNXRuntime
Step that uses ONNX model to infer the type of the query.
Input - the input field needs to be of type
str
.Output - the output field is filled with data of type
str
.- Parameters
step (str, "app") – app
type (str, "query_processing") – query_processing
name (str, "query_classifier") – query_classifier
model (str, "svm-query-classifier") – Model name
(dict (output_mapping) – “user_terms_str”}): dictionary of input fields mapping: name of the model input to the document input field
{"input" – “user_terms_str”}): dictionary of input fields mapping: name of the model input to the document input field
(dict – “type”}): dictionary of output fields mapping: name of the model output to the document output field
{"output_label" – “type”}): dictionary of output fields mapping: name of the model output to the document output field
path (str, ".") – path
Methods Summary
Download and extract the model if it's not existing.
Methods Documentation