RecognizedLine

class RecognizedLine(val text: String, val confidence: Float?, val secondRead: Boolean)

One line of recognized text, with its OCR confidence when reported.

toString() shows no document values; they are in the properties.

Since

0.2.0

Constructors

Link copied to clipboard
constructor(text: String, confidence: Float?, secondRead: Boolean)
constructor(text: String, confidence: Float?)

Creates a line that was not reported as a second read.

Properties

Link copied to clipboard

OCR confidence in [0, 1]; null when the engine reports none.

Link copied to clipboard

Whether this is the engine's second read of the row's region that replaced a shorter first read.

Link copied to clipboard

The recognized characters of this line, exactly as the engine reported them; the SDK does not edit them.

Functions

Link copied to clipboard
operator fun component1(): String

The recognized characters.

Link copied to clipboard
operator fun component2(): Float?

The OCR confidence.

Link copied to clipboard
operator fun component3(): Boolean

Whether this line came from a second read.

Link copied to clipboard
fun copy(text: String = this.text, confidence: Float? = this.confidence): RecognizedLine

Copies this line while preserving its second-read status.

fun copy(text: String = this.text, confidence: Float? = this.confidence, secondRead: Boolean): RecognizedLine

Copies this line with an explicit second-read status.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String

How long the line is and the OCR confidence; never the text itself.