simulstream.metrics.stats.NormalizedErasure

class simulstream.metrics.stats.NormalizedErasure

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}}\]