공개 클래스 BertCluAnnotator
BERT 기반 대화형 언어 이해를 위한 API입니다.
API는 메타데이터가 채워진 Bert 기반 TFLite 모델을 기대합니다. 메타데이터에는 다음 정보가 포함되어야 합니다.
- Wordpiece Tokenizer의 경우 input_process_units입니다.
- 이름이 "ids", "mask" 및 "segment_ids"인 입력 텐서 3개.
- 이름이 "domain_task/names", "domain_task/scores", "intent_task/names", "intent_task/scores", "slot_task/names" 및 "slot_task/scores"인 출력 텐서 6개.
중첩 클래스
수업 | BertCluAnnotator.BertCluAnnotatorOptions | BertCluAnnotator 설정 옵션. |
공개 방법
CluResponse | |
정적 BertCluAnnotator | createFromBufferAndOptions ( ByteBuffer modelBuffer, BertCluAnnotator.BertCluAnnotatorOptions 옵션) 모델 버퍼와 BertCluAnnotator.BertCluAnnotatorOptions 를 사용하여 BertCluAnnotator 인스턴스를 생성합니다. |
정적 BertCluAnnotator |
상속된 메서드
공개 방법
공개 CluResponse 주석 ( CluRequest cluRequest)
공개 정적 BertCluAnnotator createFromBufferAndOptions ( ByteBuffer modelBuffer, BertCluAnnotator.BertCluAnnotatorOptions 옵션)
모델 버퍼와 BertCluAnnotator.BertCluAnnotatorOptions
를 사용하여 BertCluAnnotator
인스턴스를 생성합니다.
매개변수
모델버퍼 | 직접 ByteBuffer 또는 주석 모델의 MappedByteBuffer |
---|---|
옵션 |
던지기
IllegalArgumentException | 모델 버퍼가 직접 ByteBuffer 또는 MappedByteBuffer 가 아닌 경우 |
---|---|
IllegalStateException | 내부 오류가 있는 경우 |
런타임예외 | 달리 명시되지 않은 오류가 있는 경우 |
공개 정적 BertCluAnnotator createFromFile (컨텍스트 컨텍스트, 문자열 modelPath)
파일 경로에서 BertCluAnnotator
인스턴스를 생성합니다.
매개변수
문맥 | |
---|---|
모델경로 | 애노테이터 모델의 경로 |
던지기
IO예외 | tflite 모델을 로드할 때 I/O 오류가 발생하는 경우 |
---|---|
IllegalArgumentException | 인수가 유효하지 않은 경우 |
IllegalStateException | 내부 오류가 있는 경우 |
런타임예외 | 달리 명시되지 않은 오류가 있는 경우 |