Module Output¶
This page explains the output of each module.
Document Analyzer¶
The Document Analyzer Module outputs the following variables as a tuple.
| Variable Name | Type | Description |
|---|---|---|
| results | DocumentAnalyzerSchema |
Module output results |
| ocr_vis | np.ndarray | None |
Visualization of the output of the AI-OCR (Only when visualize=True) |
| layout_vis | np.ndarray | None |
Visualization of the output of the Layout Analyzer (Only when visualize=True) |
The specification for the DocumentAnalyzerSchema that the results variable conforms to is as follows:
DocumentAnalyzerSchema
No Additional Propsobject
#
- Additional properties are not allowed
preprocess
Preprocessing information of the document
RequiredanyOf
#
paragraphs
List of detected paragraphs
Requiredarray
#
ParagraphSchema
No Additional Propsobject
#
- Additional properties are not allowed
box
Bounding box of the paragraph in the format [x1, y1, x2, y2]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
direction
Text direction, e.g., ['horizontal' or 'vertical']
RequiredanyOf
#
role
Role of the paragraph, e.g., ['section_headings', 'page_header', 'page_footer', 'list_item', 'caption', 'inline_formula', 'display_formula', 'index',])
RequiredanyOf
#
indent_level
Indentation level of the list_item
anyOf
#
- Default:
None
tables
List of detected tables
Requiredarray
#
TableStructureRecognizerSchema
No Additional Propsobject
#
- Additional properties are not allowed
box
Bounding box of the table in the format [x1, y1, x2, y2]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
rows
List of table lines representing rows
Requiredarray
#
TableLineSchema
No Additional Propsobject
#
- Additional properties are not allowed
box
Bounding box of the table line in the format [x1, y1, x2, y2]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
score
Confidence score of the table line detection
Requirednumber
#
cols
List of table lines representing columns
Requiredarray
#
TableLineSchema
No Additional Propsobject
#
- Additional properties are not allowed
box
Bounding box of the table line in the format [x1, y1, x2, y2]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
score
Confidence score of the table line detection
Requirednumber
#
spans
List of table lines representing spans
Requiredarray
#
TableLineSchema
No Additional Propsobject
#
- Additional properties are not allowed
box
Bounding box of the table line in the format [x1, y1, x2, y2]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
score
Confidence score of the table line detection
Requirednumber
#
cells
List of table cells
Requiredarray
#
TableCellSchema
No Additional Propsobject
#
- Additional properties are not allowed
col_span
Number of columns spanned by the cell
Requiredinteger
#
row_span
Number of rows spanned by the cell
Requiredinteger
#
box
Bounding box of the cell in the format [x1, y1, x2, y2]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
contents
Text content of the cell
RequiredanyOf
#
words
List of recognized words
Requiredarray
#
WordPrediction
No Additional Propsobject
#
- Additional properties are not allowed
points
Bounding box of the word in the format [[x1, y1], [x2, y2], [x3, y3], [x4, y4]]
Requiredarray
#
direction
Text direction, e.g., 'horizontal' or 'vertical'
Requiredstring
#
rec_score
Confidence score of the word recognition
Requirednumber
#
det_score
Confidence score of the word detection
Requirednumber
#
figures
List of detected figures
Requiredarray
#
FigureSchema
No Additional Propsobject
#
- Additional properties are not allowed
box
Bounding box of the figure in the format [x1, y1, x2, y2]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
paragraphs
List of paragraphs associated with the figure
Requiredarray
#
ParagraphSchema
No Additional Propsobject
#
- Additional properties are not allowed
box
Bounding box of the paragraph in the format [x1, y1, x2, y2]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
direction
Text direction, e.g., ['horizontal' or 'vertical']
RequiredanyOf
#
role
Role of the paragraph, e.g., ['section_headings', 'page_header', 'page_footer', 'list_item', 'caption', 'inline_formula', 'display_formula', 'index',])
RequiredanyOf
#
indent_level
Indentation level of the list_item
anyOf
#
- Default:
None
role
Role of the figure, e.g., ['picture', 'logo', 'code', 'seal']
RequiredanyOf
#
direction
Text direction, e.g., ['horizontal' or 'vertical']
RequiredanyOf
#
decode
Decoded contents of the code, if applicable
anyOf
#
- Default:
None
AI-OCR¶
The AI-OCR module outputs the following variables as a tuple.
| Variable Name | Type | Description |
|---|---|---|
| results | OCRSchema |
Module output results |
| ocr_vis | np.ndarray | None |
Visualization of the output of the AI-OCR (Only when visualize=True) |
The specification for the OCRSchema that the results variable conforms to is as follows:
OCRSchema
No Additional Propsobject
#
- Additional properties are not allowed
words
List of recognized words with their bounding boxes, content, direction, and scores
Requiredarray
#
WordPrediction
No Additional Propsobject
#
- Additional properties are not allowed
points
Bounding box of the word in the format [[x1, y1], [x2, y2], [x3, y3], [x4, y4]]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
direction
Text direction, e.g., 'horizontal' or 'vertical'
Requiredstring
#
rec_score
Confidence score of the word recognition
Requirednumber
#
det_score
Confidence score of the word detection
Requirednumber
#
Layout Analyzer¶
The Layout Analyzer module outputs the following variables as a tuple.
| Variable Name | Type | Description |
|---|---|---|
| results | LayoutAnalyzerSchema |
Module output results |
| layout_vis | np.ndarray | None |
Visualization of the output of the Layout Analyzer (Only when visualize=True) |
The specification for the LayoutAnalyzerSchema that the results variable conforms to is as follows:
LayoutAnalyzerSchema
No Additional Propsobject
#
- Additional properties are not allowed
paragraphs
List of detected paragraphs
Requiredarray
#
Element
No Additional Propsobject
#
- Additional properties are not allowed
box
Bounding box of the layout element in the format [x1, y1, x2, y2]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
score
Confidence score of the layout element detection
Requirednumber
#
role
Role of the element, e.g., ['section_headings', 'page_header', 'page_footer', 'list_item', 'caption', 'inline_formula', 'display_formula', 'index']
RequiredanyOf
#
tables
List of detected tables
Requiredarray
#
TableStructureRecognizerSchema
No Additional Propsobject
#
- Additional properties are not allowed
box
Bounding box of the table in the format [x1, y1, x2, y2]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
rows
List of table lines representing rows
Requiredarray
#
TableLineSchema
No Additional Propsobject
#
- Additional properties are not allowed
box
Bounding box of the table line in the format [x1, y1, x2, y2]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
score
Confidence score of the table line detection
Requirednumber
#
cols
List of table lines representing columns
Requiredarray
#
TableLineSchema
No Additional Propsobject
#
- Additional properties are not allowed
box
Bounding box of the table line in the format [x1, y1, x2, y2]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
score
Confidence score of the table line detection
Requirednumber
#
spans
List of table lines representing spans
Requiredarray
#
TableLineSchema
No Additional Propsobject
#
- Additional properties are not allowed
box
Bounding box of the table line in the format [x1, y1, x2, y2]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
score
Confidence score of the table line detection
Requirednumber
#
cells
List of table cells
Requiredarray
#
TableCellSchema
No Additional Propsobject
#
- Additional properties are not allowed
col_span
Number of columns spanned by the cell
Requiredinteger
#
box
Bounding box of the cell in the format [x1, y1, x2, y2]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
figures
List of detected figures
Requiredarray
#
Element
No Additional Propsobject
#
- Additional properties are not allowed
id
Unique identifier of the layout element
RequiredanyOf
#
box
Bounding box of the layout element in the format [x1, y1, x2, y2]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
score
Confidence score of the layout element detection
Requirednumber
#
role
Role of the element, e.g., ['section_headings', 'page_header', 'page_footer', 'list_item', 'caption', 'inline_formula', 'display_formula', 'index']
RequiredanyOf
#
Table Semantic Parser¶
The Table Semantic Parser module outputs the following variables as a tuple.
| Variable Name | Type | Description |
|---|---|---|
| results | TableSemanticParserSchema |
Module output results |
| vis_layout | np.ndarray | None |
Visualization of the output of the TableSemanticParser (Only when visualize=True) |
| vis_ocr | np.ndarray | None |
Visualization of the output of the AI-OCR (Only when visualize=True) |
The specification for the TableSemanticParserSchema that the results variable conforms to is as follows:
TableSemanticParserSchema
No Additional Propsobject
#
- Additional properties are not allowed
tables
List of tables with semantic information
Requiredarray
#
TableSemanticContentsSchema
No Additional Propsobject
#
- Additional properties are not allowed
style
Border style of the table, e.g., ['border', 'borderless']
Requiredstring
#
box
Bounding box [x1, y1, x2, y2]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
cells
Cells keyed by cell_id
Requiredobject
#
- Additional properties must match the nested schema
Additional property
No Additional Propsobject
#
- Additional properties are not allowed
role
Role of the cell, e.g., ['cell', 'header', 'empty', 'group']
RequiredanyOf
#
box
Bounding box of the cell in the format [x1, y1, x2, y2]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
col_span
Number of columns spanned by the cell
RequiredanyOf
#
kv_items
Key-value items extracted from the table
Requiredarray
#
KvItemSchema
No Additional Propsobject
#
- Additional properties are not allowed
box
Bounding box of the key-value item in the format [x1, y1, x2, y2]
anyOf
#
- Default:
None
grids
Grid representation of the table
Requiredarray
#
TableGridSchema
No Additional Propsobject
#
- Additional properties are not allowed
box
Bounding box of the table grid in the format [x1, y1, x2, y2]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
col_headers
2D array representing the column header cell ids
Requiredarray
#
ArrayItem
array
#
data
2D array representing the table grid data with cell ids
Requiredarray
#
ArrayItem
array
#
paragraphs
List of recognized paragraphs in the document
Requiredarray
#
Element
No Additional Propsobject
#
- Additional properties are not allowed
box
Bounding box of the layout element in the format [x1, y1, x2, y2]
Requiredarray
#
- Minimum items:
4 - Maximum items:
4
score
Confidence score of the layout element detection
Requirednumber
#
role
Role of the element, e.g., ['section_headings', 'page_header', 'page_footer', 'list_item', 'caption', 'inline_formula', 'display_formula', 'index']
RequiredanyOf
#
words
List of recognized words in the document
Requiredarray
#
WordPrediction
No Additional Propsobject
#
- Additional properties are not allowed
points
Bounding box of the word in the format [[x1, y1], [x2, y2], [x3, y3], [x4, y4]]
Requiredarray
#
direction
Text direction, e.g., 'horizontal' or 'vertical'
Requiredstring
#
rec_score
Confidence score of the word recognition
Requirednumber
#
det_score
Confidence score of the word detection
Requirednumber
#
Auto-generated from JSON Schema files.