ITelemetryRecognizer.RecognizeAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
RecognizeAsync(ITurnContext, Dictionary<String,String>, Dictionary<String,Double>, CancellationToken) |
使用轮次上下文) 返回分析结果 (建议的意向和实体。 |
RecognizeAsync<T>(ITurnContext, CancellationToken) |
通过识别器运行话语,并返回强类型识别器结果。 |
RecognizeAsync<T>(ITurnContext, Dictionary<String,String>, Dictionary<String,Double>, CancellationToken) |
通过识别器运行话语,并返回强类型识别器结果。 |
RecognizeAsync(ITurnContext, Dictionary<String,String>, Dictionary<String,Double>, CancellationToken)
使用轮次上下文) 返回分析结果 (建议的意向和实体。
public System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult> RecognizeAsync (Microsoft.Bot.Builder.ITurnContext turnContext, System.Collections.Generic.Dictionary<string,string> telemetryProperties, System.Collections.Generic.Dictionary<string,double> telemetryMetrics, System.Threading.CancellationToken cancellationToken = default);
abstract member RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.RecognizerResult>
Public Function RecognizeAsync (turnContext As ITurnContext, telemetryProperties As Dictionary(Of String, String), telemetryMetrics As Dictionary(Of String, Double), Optional cancellationToken As CancellationToken = Nothing) As Task(Of RecognizerResult)
参数
- turnContext
- ITurnContext
包含与用户单轮聊天的信息的上下文对象。
- telemetryProperties
- Dictionary<String,String>
使用 LuisResult 事件记录到遥测的其他属性。
- telemetryMetrics
- Dictionary<String,Double>
使用 LuisResult 事件记录到遥测的其他指标。
- cancellationToken
- CancellationToken
可由其他对象或线程用以接收取消通知的取消标记。
返回
当前轮次上下文活动中当前消息文本的分析的 LUIS 结果。
适用于
RecognizeAsync<T>(ITurnContext, CancellationToken)
通过识别器运行话语,并返回强类型识别器结果。
public System.Threading.Tasks.Task<T> RecognizeAsync<T> (Microsoft.Bot.Builder.ITurnContext turnContext, System.Threading.CancellationToken cancellationToken = default) where T : Microsoft.Bot.Builder.IRecognizerConvert, new();
abstract member RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * System.Threading.CancellationToken -> 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 Function RecognizeAsync(Of T As {IRecognizerConvertNew}) (turnContext As ITurnContext, Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)
类型参数
- T
识别结果类型。
参数
- turnContext
- ITurnContext
轮次上下文。
- cancellationToken
- CancellationToken
取消标记。
返回
Task<T>
言语分析。
实现
适用于
RecognizeAsync<T>(ITurnContext, Dictionary<String,String>, Dictionary<String,Double>, CancellationToken)
通过识别器运行话语,并返回强类型识别器结果。
public System.Threading.Tasks.Task<T> RecognizeAsync<T> (Microsoft.Bot.Builder.ITurnContext turnContext, System.Collections.Generic.Dictionary<string,string> telemetryProperties, System.Collections.Generic.Dictionary<string,double> telemetryMetrics, System.Threading.CancellationToken cancellationToken = default) where T : Microsoft.Bot.Builder.IRecognizerConvert, new();
abstract member RecognizeAsync : Microsoft.Bot.Builder.ITurnContext * System.Collections.Generic.Dictionary<string, string> * System.Collections.Generic.Dictionary<string, double> * System.Threading.CancellationToken -> 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 Function RecognizeAsync(Of T As {IRecognizerConvertNew}) (turnContext As ITurnContext, telemetryProperties As Dictionary(Of String, String), telemetryMetrics As Dictionary(Of String, Double), Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)
类型参数
- T
识别结果类型。
参数
- turnContext
- ITurnContext
轮次上下文。
- telemetryProperties
- Dictionary<String,String>
包含要附加到传出遥测项的其他属性的字典。
- telemetryMetrics
- Dictionary<String,Double>
包含要附加到传出遥测项的其他指标的字典。
- cancellationToken
- CancellationToken
取消标记。
返回
Task<T>
言语分析。