Skip to main content

Ter

Metric
DashAI.back.metrics.translation.Ter

A class for calculating TER scores between source and target sentences.

TER (Translation Edit Rate, also called Translation Error Rate) is a metric to quantify the edit operations requiered to match a reference translation.

References

Methods

score(source_sentences: 'DashAIDataset', target_sentences: 'np.ndarray') -> float

Defined on Ter

Calculate the TER score between source and target sentences.

Parameters

source_sentences : DashAIDataset
Sentences in the original language.
target_sentences : ndarray
Sentences in the target language.

Returns

float
The calculated score.

get_metadata(cls: 'BaseMetric') -> Dict[str, Any]

Defined on BaseMetric

Get metadata values for the current metric.

Returns

Dict[str, Any]
Dictionary with the metadata

Compatible with