DocumentField Class

An object representing the content and location of a document field value.

New in version 2023-07-31: The boolean value_type and bool value

Inheritance
builtins.object
DocumentField

Constructor

DocumentField(**kwargs: Any)

Methods

from_dict

Converts a dict in the shape of a DocumentField to the model itself.

to_dict

Returns a dict representation of DocumentField.

from_dict

Converts a dict in the shape of a DocumentField to the model itself.

from_dict(data: Dict) -> DocumentField

Parameters

Name Description
data
Required

A dictionary in the shape of DocumentField.

Returns

Type Description

DocumentField

to_dict

Returns a dict representation of DocumentField.

to_dict() -> Dict

Returns

Type Description

dict

Attributes

bounding_regions

Bounding regions covering the field.

bounding_regions: List[BoundingRegion] | None

confidence

The confidence of correctly extracting the field.

confidence: float

content

The field's content.

content: str | None

spans

Location of the field in the reading order concatenated content.

spans: List[DocumentSpan] | None

value

The value for the recognized field. Its semantic data type is described by value_type. If the value is extracted from the document, but cannot be normalized to its type, then access the content property for a textual representation of the value.

value: str | int | float | bool | date | time | CurrencyValue | AddressValue | Dict[str, DocumentField] | List[DocumentField] | None

value_type

The type of value found on DocumentField. Possible types include: "string", "date", "time", "phoneNumber", "float", "integer", "selectionMark", "countryRegion", "signature", "currency", "address", "boolean", "list", "dictionary".

value_type: str