This repository was archived by the owner on Apr 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/mlkit/textrecognition Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -18,14 +18,14 @@ export interface MLKitRecognizeTextResultElement {
1818
1919export interface MLKitRecognizeTextResultLine {
2020 text : string ;
21- confidence : string ;
21+ confidence : number ;
2222 bounds : MLKitRecognizeTextResultBounds ;
2323 elements : Array < MLKitRecognizeTextResultElement > ;
2424}
2525
2626export interface MLKitRecognizeTextResultBlock {
2727 text : string ;
28- confidence : string ;
28+ confidence : number ;
2929 bounds : MLKitRecognizeTextResultBounds ;
3030 lines : Array < MLKitRecognizeTextResultLine > ;
3131}
Original file line number Diff line number Diff line change @@ -44,13 +44,15 @@ function getResult(visionText: FIRVisionText): MLKitRecognizeTextResult {
4444 const feature : FIRVisionTextBlock = visionText . blocks . objectAtIndex ( i ) ;
4545 const resultFeature = < MLKitRecognizeTextResultBlock > {
4646 text : feature . text ,
47+ confidence : feature . confidence ,
4748 bounds : feature . frame ,
4849 lines : [ ]
4950 } ;
5051
5152 const addLineToResult = ( line : FIRVisionTextLine ) : void => {
5253 const resultLine = < MLKitRecognizeTextResultLine > {
5354 text : feature . text ,
55+ confidence : line . confidence ,
5456 bounds : line . frame ,
5557 elements : [ ]
5658 } ;
You can’t perform that action at this time.
0 commit comments