/** * 文本识别(CRNN / SVTR / NRTR) * 模型对象共享:与 TableRecognizer/LayoutAnalyzer 复用同一 TextRecognizer 实例 */ import type { OcrImageData, TextBox, TextLine } from "../typings"; import { BaseRecognizer } from "./baseRecognizer"; export declare class TextRecognizer extends BaseRecognizer { private vocab; init(): Promise; /** 加载字符表(CTC/Attention 解码需要) */ private loadVocab; /** 识别文本行 */ recognize(image: OcrImageData, boxes?: TextBox[]): Promise; private recognizeOne; /** 占位 CTC/Attention 解码;接入真实模型后用 this.vocab 做 token → char 映射 */ private decode; }