Ter
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
TerCalculate 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]
BaseMetricGet metadata values for the current metric.
Returns
- Dict[str, Any]
- Dictionary with the metadata