Recognizer.RecognizeAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
RecognizeAsync(DialogContext, Activity, CancellationToken, Dictionary<String,String>, Dictionary<String,Double>) |
通过识别器运行当前 DialogContext.TurnContext.Activity 并返回泛型识别器结果。 |
RecognizeAsync<T>(DialogContext, Activity, CancellationToken, Dictionary<String,String>, Dictionary<String,Double>) |
通过识别器运行当前 DialogContext.TurnContext.Activity,并使用 IRecognizerConvert 返回强类型识别器结果。 |
RecognizeAsync(DialogContext, Activity, CancellationToken, Dictionary<String,String>, Dictionary<String,Double>)
通过识别器运行当前 DialogContext.TurnContext.Activity 并返回泛型识别器结果。
public virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult> RecognizeAsync (Microsoft.Bot.Builder.Dialogs.DialogContext dialogContext, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken = default, System.Collections.Generic.Dictionary<string,string> telemetryProperties = default, System.Collections.Generic.Dictionary<string,double> telemetryMetrics = default);
abstract member RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
override this.RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
Public Overridable Function RecognizeAsync (dialogContext As DialogContext, activity As Activity, Optional cancellationToken As CancellationToken = Nothing, Optional telemetryProperties As Dictionary(Of String, String) = Nothing, Optional telemetryMetrics As Dictionary(Of String, Double) = Nothing) As Task(Of RecognizerResult)
参数
- dialogContext
- DialogContext
对话上下文。
- activity
- Activity
要识别的活动。
- cancellationToken
- CancellationToken
取消标记。
- telemetryProperties
- Dictionary<String,String>
使用 LuisResult 事件记录到遥测的其他属性。
- telemetryMetrics
- Dictionary<String,Double>
使用 LuisResult 事件记录到遥测的其他指标。
返回
言语分析。
适用于
RecognizeAsync<T>(DialogContext, Activity, CancellationToken, Dictionary<String,String>, Dictionary<String,Double>)
通过识别器运行当前 DialogContext.TurnContext.Activity,并使用 IRecognizerConvert 返回强类型识别器结果。
public virtual System.Threading.Tasks.Task<T> RecognizeAsync<T> (Microsoft.Bot.Builder.Dialogs.DialogContext dialogContext, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken = default, System.Collections.Generic.Dictionary<string,string> telemetryProperties = default, System.Collections.Generic.Dictionary<string,double> telemetryMetrics = default) where T : Microsoft.Bot.Builder.IRecognizerConvert, new();
abstract member RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
override this.RecognizeAsync : Microsoft.Bot.Builder.Dialogs.DialogContext * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> -> System.Threading.Tasks.Task<'T (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))> (requires 'T :> Microsoft.Bot.Builder.IRecognizerConvert and 'T : (new : unit -> 'T))
Public Overridable Function RecognizeAsync(Of T As {IRecognizerConvertNew}) (dialogContext As DialogContext, activity As Activity, Optional cancellationToken As CancellationToken = Nothing, Optional telemetryProperties As Dictionary(Of String, String) = Nothing, Optional telemetryMetrics As Dictionary(Of String, Double) = Nothing) As Task(Of T)
类型参数
- T
识别结果类型。
参数
- dialogContext
- DialogContext
对话上下文。
- activity
- Activity
要识别的活动。
- cancellationToken
- CancellationToken
取消标记。
- telemetryProperties
- Dictionary<String,String>
使用 LuisResult 事件记录到遥测的其他属性。
- telemetryMetrics
- Dictionary<String,Double>
使用 LuisResult 事件记录到遥测的其他指标。
返回
Task<T>
言语分析。