Skip to content

results

results

Classes:

Name Description
AnonymizerResult

Result returned by full anonymization runs.

PreviewResult

Result returned by preview runs.

AnonymizerResult(dataframe, trace_dataframe, resolved_text_column, failed_records, replace_method=None, rewrite_config=None, entity_labels=None, data_summary=None) dataclass

Bases: _DisplayMixin

Result returned by full anonymization runs.

Attributes:

Name Type Description
dataframe DataFrame

User-facing columns only (text, replaced/rewritten text, scores).

trace_dataframe DataFrame

Full pipeline trace including all internal columns.

resolved_text_column str

Name of the user-facing text column. Equals the user's requested text_column unless the reader had to rename it to avoid colliding with an Anonymizer output column, in which case it is the post-rename identifier (e.g. "final_entities__input").

failed_records list[FailedRecord]

Records that failed during pipeline processing.

replace_method ReplaceMethod | None

The replace strategy that produced this result. Set by run() / preview(); consumed by evaluate() to dispatch the right judges. None on results that were constructed by hand or loaded from a pre-strategy-tracking format.

rewrite_config PrivacyGoal | None

The privacy goal that produced this result when rewrite mode was used. Set by run() / preview(); consumed by evaluate() to dispatch the rewrite judges. Mutually exclusive with replace_method.

data_summary str | None

Optional dataset context supplied with the original input. Preserved for evaluate() so entity-coverage judging uses the same context as detection.

PreviewResult(dataframe, trace_dataframe, resolved_text_column, failed_records, preview_num_records, replace_method=None, rewrite_config=None, entity_labels=None, data_summary=None) dataclass

Bases: _DisplayMixin

Result returned by preview runs.

Attributes:

Name Type Description
dataframe DataFrame

User-facing columns only (text, replaced/rewritten text, scores).

trace_dataframe DataFrame

Full pipeline trace including all internal columns.

resolved_text_column str

Name of the user-facing text column. Equals the user's requested text_column unless the reader had to rename it to avoid colliding with an Anonymizer output column, in which case it is the post-rename identifier (e.g. "final_entities__input").

failed_records list[FailedRecord]

Records that failed during pipeline processing.

preview_num_records int

Number of records requested for the preview.

replace_method ReplaceMethod | None

The replace strategy that produced this preview. Set by preview(); consumed by evaluate() to dispatch the right judges. None on results that were constructed by hand or loaded from a pre-strategy-tracking format.

rewrite_config PrivacyGoal | None

The privacy goal that produced this preview when rewrite mode was used. Set by preview(); consumed by evaluate() to dispatch the rewrite judges. Mutually exclusive with replace_method.

data_summary str | None

Optional dataset context supplied with the original input. Preserved for evaluate() so entity-coverage judging uses the same context as detection.