Shortcuts

ChrF Score

Module Interface

torchmetrics.CHRFScore[source]

alias of torchmetrics.text._deprecated._CHRFScore

Functional Interface

torchmetrics.functional.chrf_score(preds, target, n_char_order=6, n_word_order=2, beta=2.0, lowercase=False, whitespace=False, return_sentence_level_score=False)[source]

Wrapper for deprecated import.

>>> preds = ['the cat is on the mat']
>>> target = [['there is a cat on the mat', 'a cat is on the mat']]
>>> _chrf_score(preds, target)
tensor(0.8640)
Return type

Union[Tensor, Tuple[Tensor, Tensor]]