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