GenericDocument

data class GenericDocument(val type: GenericDocumentType, val fields: List<Field>, val children: List<GenericDocument>, val quad: List<PointF>, val quadInRoot: List<PointF>, val crop: ImageRef? = null, val confidence: Double = 0.0, val confidenceWeight: Double = 0.0) : AutoCloseable

Generic document.

Constructors

Link copied to clipboard
constructor(type: GenericDocumentType, fields: List<Field>, children: List<GenericDocument>, quad: List<PointF>, quadInRoot: List<PointF>, crop: ImageRef? = null, confidence: Double = 0.0, confidenceWeight: Double = 0.0)
constructor(source: Map<String, Any?>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

List of document sub-documents.

Link copied to clipboard

The average confidence in the accuracy of the document recognition result.

Link copied to clipboard

The weight of the confidence. Can be used to calculate the weighted average confidence of two documents.

Link copied to clipboard

Image crop of the document.

Link copied to clipboard

List of document fields.

Link copied to clipboard

Coordinates of the document in the parent document coordinate system.

Link copied to clipboard

Coordinates of the document in the root document coordinate system.

Link copied to clipboard

Document type.

Functions

Link copied to clipboard

Returns a sub-document given its document type name. Returns null if not found.

Link copied to clipboard

Returns all children given their document type name.

Link copied to clipboard
open override fun close()
Link copied to clipboard

Returns a field given its local or common type name. Returns null if not found.

Link copied to clipboard

Returns all fields given a local or common field type name.

Link copied to clipboard
fun toJson(config: ToJsonConfiguration = ToJsonConfiguration.default()): JsonObject
Link copied to clipboard
fun toJsonString(config: ToJsonConfiguration = ToJsonConfiguration.default()): String