PipelineResult#

class scikitplot.corpus.PipelineResult(input_path, output_path, format, documents, n_read, n_omitted, n_embedded, elapsed_seconds)[source]#

Immutable summary of a single pipeline run.

Parameters:
input_pathstr

Input source identifier (file path, URL, or batch label).

output_pathpathlib.Path or None

Path to the exported file, or None when no export was requested (output_path=None in the pipeline call).

documentslist of CorpusDocument

All documents produced (after chunking, filtering, and optional embedding). Empty list if the source yielded no usable text.

n_readint

Total raw chunks yielded by the reader before filtering.

n_omittedint

Chunks dropped by the filter.

n_embeddedint

Documents that received an embedding vector (0 when embedding is disabled).

elapsed_secondsfloat

Wall-clock time for the entire run, in seconds.

formatExportFormat or None

Format used for export, or None when no export was done.

Parameters:

Notes

n_read - n_omitted == len(documents) is an invariant maintained by the pipeline.

Examples

>>> result.n_read
512
>>> result.elapsed_seconds
3.14
>>> len(result.documents)
487
documents: tuple[CorpusDocument, ...][source]#

All documents produced by the pipeline run.

Stored as an immutable tuple to enforce the frozen-dataclass contract. Use list(result.documents) if a mutable copy is needed. len(result.documents) == result.n_documents.

elapsed_seconds: float[source]#
format: ExportFormat | None[source]#
input_path: str[source]#
property n_documents: int#

Number of documents in the result.

n_embedded: int[source]#
n_omitted: int[source]#
n_read: int[source]#
output_path: Path | None[source]#