Skip to main content

Chrf

Metric
DashAI.back.metrics.translation.Chrf

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

CHRF (Character n-gram F-score) is a metric used for evaluating the quality of machine-translated text by comparing it to reference translations at the character level.

References

Methods

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

Defined on Chrf

Calculate the CHRF 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 CHRF score ranging between 0 and 1.

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