rasa.nlu.classifiers.fallback_classifier
FallbackClassifier Objects
Handles incoming messages with low NLU confidence.
required_components
Components that should be included in the pipeline before this component.
get_default_config
The component's default config (see parent class for full docstring).
__init__
Constructs a new fallback classifier.
create
Creates a new component (see parent class for full docstring).
process
Process a list of incoming messages.
This is the component's chance to process incoming
messages. The component can rely on
any context attribute to be present, that gets created
by a call to :meth:rasa.nlu.components.Component.create
of ANY component and
on any context attributes created by a call to
:meth:rasa.nlu.components.Component.process
of components previous to this one.
Arguments:
messages
- List containing :class:rasa.shared.nlu.training_data.message.Message
to process.
is_fallback_classifier_prediction
Checks if the intent was predicted by the FallbackClassifier
.
Arguments:
prediction
- The prediction of the NLU model.
Returns:
True
if the top classified intent was the fallback intent.
undo_fallback_prediction
Undo the prediction of the fallback intent.
Arguments:
prediction
- The prediction of the NLU model.
Returns:
The prediction as if the FallbackClassifier
wasn't present in the pipeline.
If the fallback intent is the only intent, return the prediction as it was
provided.