FormWord Class

Represents a word recognized from the input document.

New in version v2.1: Support for to_dict and from_dict methods

Inheritance
azure.ai.formrecognizer._models.FormElement
FormWord

Constructor

FormWord(**kwargs)

Variables

text
str

The text content of the word.

bounding_box
list[Point]

A list of 4 points representing the quadrilateral bounding box that outlines the text. The points are listed in clockwise order: top-left, top-right, bottom-right, bottom-left. Units are in pixels for images and inches for PDF.

confidence
float

Measures the degree of certainty of the recognition result. Value is between [0.0, 1.0].

page_number
int

The 1-based number of the page in which this content is present.

kind
str

For FormWord, this is "word".

Methods

from_dict

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

to_dict

Returns a dict representation of FormWord.

from_dict

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

from_dict(data: dict) -> azure.ai.formrecognizer._models.FormWord

Parameters

data
dict
Required

A dictionary in the shape of FormWord.

data
Required

Returns

FormWord

Return type

to_dict

Returns a dict representation of FormWord.

to_dict() -> dict

Returns

dict

Return type