次の方法で共有


LuisRecognizer class

Microsofts Language Understanding Intelligent Service (LUIS) を使用してユーザーの意図を検出する意図認識エンジン プラグイン 複数の LUIS モデル (アプリ) のサービス URL を渡して、複数の言語での認識をサポートできます。

Extends

コンストラクター

LuisRecognizer(string | ILuisModelMap)

認識エンジンの新しいインスタンスを構築します。

メソッド

onEnabled((context: IRecognizeContext, callback: (err: Error, enabled: boolean) => void) => void)

認識エンジンを条件付きで有効または無効にする関数を登録します。 複数のハンドラーを登録でき、他のハンドラーの前に新しいハンドラーが実行されます。

onFilter((context: IRecognizeContext, result: IIntentRecognizerResult, callback: (err: Error, result: IIntentRecognizerResult) => void) => void)

認識エンジンからの出力をフィルター処理する関数を登録します。 複数のハンドラーを登録でき、新しいハンドラーは他のハンドラーの後に実行されます。

onRecognize(IRecognizeContext, (err: Error, result: IIntentRecognizerResult) => void)

実際の認識ロジックを実装します。

recognize(IRecognizeContext, (err: Error, result: IIntentRecognizerResult) => void)

ユーザーのテキスト発話と意図の照合を試みます。

recognize(string, string, (err: Error, intents?: IIntent[], entities?: IEntity[]) => void)

LUIS を呼び出して、ユーザー発話のエンティティ & 意図を認識します。

コンストラクターの詳細

LuisRecognizer(string | ILuisModelMap)

認識エンジンの新しいインスタンスを構築します。

new LuisRecognizer(models: string | ILuisModelMap)

パラメーター

models

string | ILuisModelMap

すべての発話に使用される個々の LUIS モデルか、発話のロケールに応じて条件付きで使用されるロケールごとのモデルのマップ。

メソッドの詳細

onEnabled((context: IRecognizeContext, callback: (err: Error, enabled: boolean) => void) => void)

認識エンジンを条件付きで有効または無効にする関数を登録します。 複数のハンドラーを登録でき、他のハンドラーの前に新しいハンドラーが実行されます。

function onEnabled(handler: (context: IRecognizeContext, callback: (err: Error, enabled: boolean) => void) => void)

パラメーター

handler

(context: IRecognizeContext, callback: (err: Error, enabled: boolean) => void) => void

すべてのメッセージに対して呼び出される関数。 認識されるすべてのメッセージに対して callback(null, true) を呼び出す必要があります。

戻り値

onFilter((context: IRecognizeContext, result: IIntentRecognizerResult, callback: (err: Error, result: IIntentRecognizerResult) => void) => void)

認識エンジンからの出力をフィルター処理する関数を登録します。 複数のハンドラーを登録でき、新しいハンドラーは他のハンドラーの後に実行されます。

function onFilter(handler: (context: IRecognizeContext, result: IIntentRecognizerResult, callback: (err: Error, result: IIntentRecognizerResult) => void) => void)

パラメーター

handler

(context: IRecognizeContext, result: IIntentRecognizerResult, callback: (err: Error, result: IIntentRecognizerResult) => void) => void

スコアが 0.0 より大きい意図になるすべてのメッセージに対して関数が呼び出されました。 意図が返されないようにするには、callback(null, { score: 0.0, intent: null }) を呼び出す必要があります。

戻り値

onRecognize(IRecognizeContext, (err: Error, result: IIntentRecognizerResult) => void)

実際の認識ロジックを実装します。

function onRecognize(context: IRecognizeContext, callback: (err: Error, result: IIntentRecognizerResult) => void)

パラメーター

callback

(err: Error, result: IIntentRecognizerResult) => void

recognize(IRecognizeContext, (err: Error, result: IIntentRecognizerResult) => void)

ユーザーのテキスト発話と意図の照合を試みます。

function recognize(context: IRecognizeContext, callback: (err: Error, result: IIntentRecognizerResult) => void)

パラメーター

context
IRecognizeContext

認識されている受信メッセージのコンテキスト情報。

callback

(err: Error, result: IIntentRecognizerResult) => void

認識操作の結果を使用して呼び出す関数。

recognize(string, string, (err: Error, intents?: IIntent[], entities?: IEntity[]) => void)

LUIS を呼び出して、ユーザー発話のエンティティ & 意図を認識します。

static function recognize(utterance: string, modelUrl: string, callback: (err: Error, intents?: IIntent[], entities?: IEntity[]) => void)

パラメーター

utterance

string

認識のために LUIS に渡すテキスト。

modelUrl

string

callback

(err: Error, intents?: IIntent[], entities?: IEntity[]) => void

意図認識ステップの結果を使用して呼び出すコールバック。