Shortcuts

ChrF Score

Module Interface

torchmetrics.CHRFScore[source]

alias of _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']]
:rtype: :py:data:`~typing.Union`\[:py:class:`~torch.Tensor`, :py:data:`~typing.Tuple`\[:py:class:`~torch.Tensor`, :py:class:`~torch.Tensor`]]
>>> _chrf_score(preds, target)
tensor(0.8640)