intent_classifier_prediction#
- class baf.nlp.intent_classifier.intent_classifier_prediction.IntentClassifierPrediction(intent, score=None, matched_sentence=None, matched_parameters=None, state=None)[source]#
Bases:
objectThe prediction result of an Intent Classifier for a specific intent.
The intent classifier tries to determine the intent of a user message. For each possible intent, it will return an IntentClassifierPrediction containing the results, that include the probability itself and other information.
- Parameters:
intent (Intent) – the target intent of the prediction
score (float) – the probability that this is the actual intent of the user message
matched_sentence (str) – the sentence used in the intent classifier (the original user message is previously processed, is modified by the NER, etc.)
matched_parameters (list[MatchedParameter]) – the list of parameters (i.e. entities) found in the user message
state (str) – the name of the state at which the intent was predicted
- matched_sentence#
The sentence used in the intent classifier (the original user message is previously processed, is modified by the NER, etc.)
- Type:
- matched_parameters#
The list of parameters (i.e. entities) found in the user message
- Type:
- get_parameter(name)[source]#
Get a parameter from the intent classifier prediction.
- Parameters:
name (str) – the name of the parameter to get
- Returns:
the parameter if it exists, None otherwise
- Return type:
MatchedParameter or None