CustomFormSubmodel Class

Represents a submodel that extracts fields from a specific type of form.

New in version v2.1: The model_id property, support for to_dict and from_dict methods

Inheritance
builtins.object
CustomFormSubmodel

Constructor

CustomFormSubmodel(**kwargs: Any)

Methods

from_dict

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

to_dict

Returns a dict representation of CustomFormSubmodel.

from_dict

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

from_dict(data: Dict) -> CustomFormSubmodel

Parameters

Name Description
data
Required

A dictionary in the shape of CustomFormSubmodel.

Returns

Type Description

CustomFormSubmodel

to_dict

Returns a dict representation of CustomFormSubmodel.

to_dict() -> Dict

Returns

Type Description

dict

Attributes

accuracy

The mean of the model's field accuracies.

accuracy: float

fields

A dictionary of the fields that this submodel will recognize from the input document. The fields dictionary keys are the name of the field. For models trained with labels, this is the training-time label of the field. For models trained without labels, a unique name is generated for each field.

fields: Dict[str, CustomFormModelField]

form_type

Type of form this submodel recognizes.

form_type: str

model_id

Model identifier of the submodel.

model_id: str