flow_inference.voyant_export.VoyantExporter
- class flow_inference.voyant_export.VoyantExporter(text_column_prefix='inference_', document_id_column='filename', line_id_column='line_id', include_line_ids=False)[source]
Create Voyant-compatible ZIP archives from inference result DataFrames.
The exporter selects the latest inference column, groups recognized text by document ID, optionally prefixes lines with their line IDs, and writes one
.txtfile per document into a ZIP archive.- Parameters:
- __init__(text_column_prefix='inference_', document_id_column='filename', line_id_column='line_id', include_line_ids=False)[source]
Initialize the Voyant exporter.
- Parameters:
Methods
__init__([text_column_prefix, ...])Initialize the Voyant exporter.
export(df, zip_path)Create a Voyant-compatible ZIP archive from inference results.
from_huggingface(dataset_name, split, ...[, ...])Download a Hugging Face dataset split and export it as a Voyant ZIP.