enable_native_pdf_parsing – a config option for the parser
DocAI has a limit on the amount of documents per batch, that’s why split abatch into mini-batches. Parsing is an async long-running operation
on Google Cloud and results are stored in a output GCS bucket.
get_results(operations: List[Operation]) → List[DocAIParsingResults][source]¶
is_running(operations: List[Operation]) → bool[source]¶
lazy_parse(blob: Blob) → Iterator[Document][source]¶
Parses a blob lazily.
Parameters
blobs – a Blob to parse
This is a long-running operations! A recommended way is to batchdocuments together and use batch_parse method.
operations_from_names(operation_names: List[str]) → List[Operation][source]¶
Initializes Long-Running Operations from their names.
parse(blob: Blob) → List[Document]¶
Eagerly parse the blob into a document or documents.
This is a convenience method for interactive development environment.
Production applications should favor the lazy_parse method instead.
Subclasses should generally not over-ride this parse method.
Parameters
blob – Blob instance
Returns
List of documents
parse_from_results(results: List[DocAIParsingResults]) → Iterator[Document][source]¶
Examples using DocAIParser¶
docai.md