Share via


Recognizer class

Base class for implementing custom recognizers to identify intents and entities from user input.

Extends

Remarks

Recognizers process user input, such as text or speech, and return structured data representing the recognized intents, entities, and other relevant information. This class provides a foundation for creating custom recognizers by defining common methods and properties.

Properties

id

Optional. The unique identifier for the recognizer.

Methods

recognize(DialogContext, Partial<Activity>, Record<string, string>, Record<string, number>)

To recognize intents and entities in a users utterance.

Inherited Methods

configure(Record<string, unknown>)

Fluent method for configuring the object.

getConverter(string)

Gets the converter for the selector configuration. *

Property Details

id

Optional. The unique identifier for the recognizer.

id?: string

Property Value

string

Method Details

recognize(DialogContext, Partial<Activity>, Record<string, string>, Record<string, number>)

To recognize intents and entities in a users utterance.

function recognize(_dialogContext: DialogContext, _activity: Partial<Activity>, _telemetryProperties?: Record<string, string>, _telemetryMetrics?: Record<string, number>): Promise<RecognizerResult>

Parameters

_dialogContext
DialogContext

Dialog Context.

_activity

Partial<Activity>

Activity.

_telemetryProperties

Record<string, string>

Additional properties to be logged to telemetry with event.

_telemetryMetrics

Record<string, number>

Additional metrics to be logged to telemetry with event.

Returns

Promise<RecognizerResult>

Inherited Method Details

configure(Record<string, unknown>)

Fluent method for configuring the object.

function configure(config: Record<string, unknown>): Recognizer

Parameters

config

Record<string, unknown>

Configuration settings to apply.

Returns

The Configurable after the operation is complete.

Inherited From Configurable.configure

getConverter(string)

Gets the converter for the selector configuration. *

function getConverter(_property: string): Converter<unknown, unknown> | ConverterFactory<unknown, unknown>

Parameters

_property

string

The key of the conditional selector configuration. *

Returns

Converter<unknown, unknown> | ConverterFactory<unknown, unknown>

The converter for the selector configuration.

Inherited From Configurable.getConverter