botbuilder-dialogs-adaptive
Version:
Rule system for the Microsoft BotBuilder dialog system.
48 lines • 2.17 kB
TypeScript
import { Activity, RecognizerResult } from 'botbuilder';
import { Converter, ConverterFactory, DialogContext } from 'botbuilder-dialogs';
import { IntentPattern } from './intentPattern';
import { EntityRecognizer } from './entityRecognizers';
import { RecognizerSetConfiguration } from './recognizerSet';
import { AdaptiveRecognizer } from './adaptiveRecognizer';
declare type IntentPatternInput = {
intent: string;
pattern: string;
};
export interface RegexRecognizerConfiguration extends RecognizerSetConfiguration {
intents?: IntentPatternInput[] | IntentPattern[];
}
/**
* Recognizer implementation which uses regex expressions to identify intents.
*/
export declare class RegexRecognizer extends AdaptiveRecognizer implements RegexRecognizerConfiguration {
static $kind: string;
/**
* Array of patterns -> intent names.
*/
intents: IntentPattern[];
/**
* The entity recognizers.
*/
entities: EntityRecognizer[];
/**
* @param property The key of the conditional selector configuration.
* @returns The converter for the selector configuration.
*/
getConverter(property: keyof RegexRecognizerConfiguration): Converter | ConverterFactory;
/**
* Runs current DialogContext.TurnContext.Activity through a recognizer and returns a [RecognizerResult](xref:botbuilder-core.RecognizerResult).
*
* @param dialogContext The [DialogContext](xref:botbuilder-dialogs.DialogContext) for the current turn of conversation.
* @param activity [Activity](xref:botframework-schema.Activity) to recognize.
* @param telemetryProperties Optional, additional properties to be logged to telemetry with the LuisResult event.
* @param telemetryMetrics Optional, additional metrics to be logged to telemetry with the LuisResult event.
* @returns {Promise<RecognizerResult>} Analysis of utterance.
*/
recognize(dialogContext: DialogContext, activity: Activity, telemetryProperties?: {
[key: string]: string;
}, telemetryMetrics?: {
[key: string]: number;
}): Promise<RecognizerResult>;
}
export {};
//# sourceMappingURL=regexRecognizer.d.ts.map