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>
語句的分析。