DocumentParagraph Class

A paragraph object generally consisting of contiguous lines with common alignment and spacing.

New in version 2023-07-31: The formulaBlock role.

Inheritance
builtins.object
DocumentParagraph

Constructor

DocumentParagraph(**kwargs: Any)

Methods

from_dict

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

to_dict

Returns a dict representation of DocumentParagraph.

from_dict

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

from_dict(data: Dict) -> DocumentParagraph

Parameters

Name Description
data
Required

A dictionary in the shape of DocumentParagraph.

Returns

Type Description

DocumentParagraph

to_dict

Returns a dict representation of DocumentParagraph.

to_dict() -> Dict

Returns

Type Description

dict

Attributes

bounding_regions

Bounding regions covering the paragraph.

bounding_regions: List[BoundingRegion] | None

content

Concatenated content of the paragraph in reading order.

content: str

role

"pageHeader", "pageFooter", "pageNumber", "title", "sectionHeading", "footnote", "formulaBlock".

role: str | None

spans

Location of the paragraph in the reading order concatenated content.

spans: List[DocumentSpan]