Recognizer Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Recognizer base class.
public class Recognizer
type Recognizer = class
Public Class Recognizer
- Inheritance
-
Recognizer
- Derived
Remarks
Recognizers operate in a DialogContext environment to recognize user input into Intents and Entities. This class models 3 virtual methods around * Pure DialogContext (where the recognition happens against current state dialogcontext * Activity (where the recognition is from an Activity) * Text/Locale (where the recognition is from text/locale) The default implementation of DialogContext method is to use Context.Activity and call the activity method. The default implementation of Activity method is to filter to Message activities and pull out text/locale and call the text/locale method.
Constructors
Recognizer(String, Int32) |
Initializes a new instance of the Recognizer class to recognize user input. |
Fields
ChooseIntent |
Intent name that will be produced by this recognizer if the child recognizers do not have consensus for intents. |
NoneIntent |
Standard none intent that means none of the recognizers recognize the intent. |
Properties
Id |
Gets or sets id of the recognizer. |
TelemetryClient |
Gets or sets the currently configured IBotTelemetryClient that logs the RecognizerResult event. |
Methods
CreateChooseIntentResult(Dictionary<String,RecognizerResult>) |
CreateChooseIntentResult - returns ChooseIntent between multiple recognizer results. |
FillRecognizerResultTelemetryProperties(RecognizerResult, Dictionary<String,String>, DialogContext) |
Uses the RecognizerResult to create a list of properties to be included when tracking the result in telemetry. |
RecognizeAsync(DialogContext, Activity, CancellationToken, Dictionary<String,String>, Dictionary<String,Double>) |
Runs current DialogContext.TurnContext.Activity through a recognizer and returns a generic recognizer result. |
RecognizeAsync<T>(DialogContext, Activity, CancellationToken, Dictionary<String,String>, Dictionary<String,Double>) |
Runs current DialogContext.TurnContext.Activity through a recognizer and returns a strongly-typed recognizer result using IRecognizerConvert. |
TrackRecognizerResult(DialogContext, String, Dictionary<String,String>, Dictionary<String,Double>) |
Tracks an event with the event name provided using the TelemetryClient attaching the properties / metrics. |