다음을 통해 공유


IntentRecognizerSet class

의도 인식기 집합에서 recognize() 호출을 페더레이션합니다.

Extends

생성자

IntentRecognizerSet(IIntentRecognizerSetOptions)

IntentRecognizerSet의 새 인스턴스를 생성합니다.

속성

length

집합의 인식기 수입니다.

메서드

clone(IntentRecognizerSet)

기존 IntentRecognizerSet의 복제본을 반환합니다.

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)

사용자 텍스트 발화를 의도와 일치시키려고 시도합니다.

recognizer(IIntentRecognizer)

집합에 새 인식기 플러그 인을 추가합니다.

생성자 세부 정보

IntentRecognizerSet(IIntentRecognizerSetOptions)

IntentRecognizerSet의 새 인스턴스를 생성합니다.

new IntentRecognizerSet(options?: IIntentRecognizerSetOptions)

매개 변수

options
IIntentRecognizerSetOptions

(선택 사항) 집합을 초기화하고 인식 흐름을 제어하는 데 사용되는 옵션입니다.

속성 세부 정보

length

집합의 인식기 수입니다.

length: number

속성 값

number

메서드 세부 정보

clone(IntentRecognizerSet)

기존 IntentRecognizerSet의 복제본을 반환합니다.

function clone(copyTo?: IntentRecognizerSet)

매개 변수

copyTo
IntentRecognizerSet

(선택 사항) 현재 개체를 복사할 인스턴스입니다. 누락된 경우 새 인스턴스가 만들어집니다.

반환

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

인식 작업의 결과를 사용하여 호출하는 함수입니다.

recognizer(IIntentRecognizer)

집합에 새 인식기 플러그 인을 추가합니다.

function recognizer(plugin: IIntentRecognizer)

매개 변수

plugin
IIntentRecognizer

추가할 인식기입니다.

반환