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
Nonewhen no export was requested (output_path=Nonein 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
Nonewhen no export was done.
- Parameters:
input_path (str)
output_path (Path | None)
format (ExportFormat | None)
documents (tuple[CorpusDocument, ...])
n_read (int)
n_omitted (int)
n_embedded (int)
elapsed_seconds (float)
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
tupleto enforce the frozen-dataclass contract. Uselist(result.documents)if a mutable copy is needed.len(result.documents) == result.n_documents.
- format: ExportFormat | None[source]#