simulstream.metrics.stats.NormalizedErasure

class simulstream.metrics.stats.NormalizedErasure

Bases: Stats

Compute the Normalized Erasure metric.

This measures the amount of flickering in retranslation, as defined in `Arivazhagan et al., “Re-translation versus Streaming for Simultaneous Translation”

It is defined as the ratio:

\[\text{Normalized Erasure} = \frac{\text{# Deleted Tokens}}{\text{# Final Generated Tokens}}\]
__init__()

Methods

__init__()

compute(log_reader)

Compute the value of the statistic.

description()

The human-readable explanation of the statistic.

name()

The unique name of the statistic.

compute(log_reader: LogReader) float

Compute the value of the statistic.

Parameters:

log_reader (LogReader) – Reader object encapsulating log data.

Returns:

The computed value of the statistic.

Return type:

float

description() str

The human-readable explanation of the statistic.

name() str

The unique name of the statistic.