Fix: TextWord.word -> TextWord.text to match SDK's textRecognition.TextWord

This commit is contained in:
Eiloud 2026-05-13 18:29:50 +08:00
parent 7dda953045
commit b895a370ca
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ export class OcrAdapter extends BaseAdapter {
for (const block of data.blocks) {
for (const line of block.lines) {
for (let word of line.words) {
let word1: TextWord = { word: (word as any).text || '' };
let word1: TextWord = { text: word.text || '' };
wordsArray.push(word1);
}
}

View File

@ -347,7 +347,7 @@ export interface OcrAdapterImage {
}
export interface TextWord {
word: string;
text: string;
confidence?: number;
}