Invoice Splitter V1
Sample Code:
#
# Install the Python client library by running:
# pip install mindee
#
from mindee.v1 import Client, product, AsyncPredictResponse
from mindee import PathInput
# Init a new client
mindee_client = Client(api_key="my-api-key")
# Load a file from disk
input_doc = PathInput("/path/to/the/file.ext")
# Load a file from disk and enqueue it.
result: AsyncPredictResponse = mindee_client.enqueue_and_parse(
product.InvoiceSplitterV1,
input_doc,
)
# Print a brief summary of the parsed data
print(result.document)
- class InvoiceSplitterV1(raw_prediction)
Invoice Splitter API version 1 inference prediction.
- Parameters:
raw_prediction (dict[str, Any])
- static get_endpoint_info(klass)
Retrieves the endpoint information for an Inference.
Should never retrieve info for CustomV1, as a custom endpoint should be created to use CustomV1.
- Parameters:
klass (
type[Inference]) – product subclass to access endpoint information.- Return type:
dict[str,str]
- endpoint_name: str | None = 'invoice_splitter'
Name of the endpoint.
- endpoint_version: str | None = '1'
Version of the endpoint.
- is_rotation_applied: bool | None
Whether the document has had any rotation applied to it.
- page_id: int | None
Optional page id for page-level predictions.
- pages: list[Page[InvoiceSplitterV1Document]]
Page-level prediction(s).
- prediction: InvoiceSplitterV1Document
Document-level prediction.
- class InvoiceSplitterV1Document(raw_prediction, page_id=None)
Invoice Splitter API version 1.4 document data.
- Parameters:
raw_prediction (dict[str, Any])
page_id (int | None)
- invoice_page_groups: list[InvoiceSplitterV1InvoicePageGroup]
List of page groups. Each group represents a single invoice within a multi-invoice document.
- class InvoiceSplitterV1InvoicePageGroup(raw_prediction, page_id=None)
List of page groups. Each group represents a single invoice within a multi-invoice document.
- Parameters:
raw_prediction (dict[str, Any])
page_id (int | None)
- to_table_line()
Output in a format suitable for inclusion in an rST table.
- Return type:
str
- bounding_box: Quadrilateral | None
A right rectangle containing the word in the document.
- confidence: float
The confidence score.
- page_indexes: list[int]
List of page indexes that belong to the same invoice (group).
- page_n: int
The document page on which the information was found.