compass.pipeline.extraction.DocumentExtraction#

class DocumentExtraction(workflow)[source]#

Bases: object

Workflow object that follows a fixed extraction pipeline

Methods

extract_from_docs(docs)

Filter and extract data from a set of docs

Attributes

max_docs_to_parse

Maximum number of documents to parse

property max_docs_to_parse#

Maximum number of documents to parse

Type:

int or None

async extract_from_docs(docs)[source]#

Filter and extract data from a set of docs

Parameters:

docs (Iterable) – The documents to filter and extract structured data from.

Returns:

compass.extraction.context.ExtractionContext or None – The context containing extracted structured data and other relevant information, or None if no data was extracted.