public class IntentRecognitionProviderFactory extends Object
IntentRecognitionProviders from the provided configuration.
This factory inspects the provided configuration and finds the concrete IntentRecognitionProvider
to construct. If the provided configuration does not define any IntentRecognitionProvider, a
RegExIntentRecognitionProvider is returned, providing minimal support to
XatkitSession management.
Note: RegExIntentRecognitionProvider does not handle IntentDefinition and
RecognizedIntent computation. If the bot application requires such features a valid
IntentRecognitionProvider must be specified in the provided configuration.
| Modifier and Type | Field and Description |
|---|---|
static String |
ENABLE_RECOGNITION_ANALYTICS
The
Configuration key used to specify whether to enable intent recognition monitoring. |
static String |
RECOGNITION_POSTPROCESSORS_KEY
The
Configuration key used to specify the IntentPostProcessors associated to the created
IntentRecognitionProvider. |
static String |
RECOGNITION_PREPROCESSORS_KEY
The
Configuration key used to specify the InputPreProcessors associated to the created
IntentRecognitionProvider. |
| Constructor and Description |
|---|
IntentRecognitionProviderFactory() |
| Modifier and Type | Method and Description |
|---|---|
static IntentRecognitionProvider |
getIntentRecognitionProvider(XatkitCore xatkitCore,
Configuration configuration)
Returns the
IntentRecognitionProvider matching the provided configuration. |
public static String ENABLE_RECOGNITION_ANALYTICS
Configuration key used to specify whether to enable intent recognition monitoring.
Intent recognition monitoring is enabled by default, and stores the results in the data/analytics
folder. It can be disabled by explicitly setting this property to false in the Configuration
file.
public static String RECOGNITION_PREPROCESSORS_KEY
Configuration key used to specify the InputPreProcessors associated to the created
IntentRecognitionProvider.
InputPreProcessors are specified as a comma-separated list of processor's names.
public static String RECOGNITION_POSTPROCESSORS_KEY
Configuration key used to specify the IntentPostProcessors associated to the created
IntentRecognitionProvider.
IntentPostProcessors are specified as a comma-separated list of processor's names.
public static IntentRecognitionProvider getIntentRecognitionProvider(XatkitCore xatkitCore, Configuration configuration)
IntentRecognitionProvider matching the provided configuration.
If the provided configuration does not define any IntentRecognitionProvider, a
RegExIntentRecognitionProvider is returned, providing minimal support to
XatkitSession management.
The created IntentRecognitionProvider embeds a RecognitionMonitor that logs monitoring
information regarding the intent recognition. The RecognitionMonitor can be disabled by setting the
ENABLE_RECOGNITION_ANALYTICS property to false in the configuration.
This method retrieves the list of InputPreProcessors and IntentPostProcessors from the
provided configuration and bind them to the returned IntentRecognitionProvider. Pre/post
-processors are specified with the configuration keys RECOGNITION_PREPROCESSORS_KEY and
RECOGNITION_POSTPROCESSORS_KEY, respectively, and are specified as comma-separated list of
processor's names.
xatkitCore - the XatkitCore instance to build the IntentRecognitionProvider fromconfiguration - the Configuration used to define the IntentRecognitionProvider to buildIntentRecognitionProvider matching the provided configurationXatkitException - if an error occurred when loading the pre/post processors.getRecognitionMonitor(XatkitCore, Configuration),
getPreProcessors(Configuration),
getPostProcessors(Configuration),
RECOGNITION_PREPROCESSORS_KEY,
RECOGNITION_POSTPROCESSORS_KEYCopyright © 2020 SOM Research Lab. All rights reserved.