Class BleuSpec (1.59.0)

BleuSpec(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Spec for bleu score metric - calculates the precision of n-grams in the prediction as compared to reference - returns a score ranging between 0 to 1.

Attribute

Name Description
use_effective_order bool
Optional. Whether to use_effective_order to compute bleu score.

Methods

BleuSpec

BleuSpec(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Spec for bleu score metric - calculates the precision of n-grams in the prediction as compared to reference - returns a score ranging between 0 to 1.