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, Parcelable

Generic document.

Constructors

Link copied to clipboard
constructor(source: Map<String, Any?>)
constructor(json: JSONObject)
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)

Properties

Link copied to clipboard

List of document sub-documents.

Link copied to clipboard
val confidence: Double = 0.0

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
val crop: ImageRef? = null

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
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

An extension function for GenericDocument class