class_docstr: Test class for `CHRFScore` metric.
class_docstr_tok: ["Test","class","for","`","CHRFScore","`","metric","."]
docstr: Test functional implementation of metric.
docstr_tok: ["Test","functional","implementation","of","metric","."]
code: def test_chrf_score_functional(
      self,
      preds,
      targets,
      char_order,
      word_order,
      lowercase,
      whitespace,
  ):
      """Test functional implementation of metric."""
      metric_args = {
          "n_char_order": char_order,
          "n_word_order": word_order,
          "lowercase": lowercase,
          "whitespace": whitespace,
      }
      nltk_metric = partial(
          _sacrebleu_chrf_fn,
          char_order=char_order,
          word_order=word_order,
          lowercase=lowercase,
          whitespace=whitespace,
      )
  
      self.run_functional_metric_test(
          preds,
          targets,
          metric_functional=chrf_score,
          reference_metric=nltk_metric,
          metric_args=metric_args,
      )
  
file_path: torchmetrics/tests/unittests/text/test_chrf.py
imports: from functools import partial
  from typing import Sequence
  import pytest
  from torch import Tensor, tensor
  from torchmetrics.functional.text.chrf import chrf_score
  from torchmetrics.text.chrf import CHRFScore
  from torchmetrics.utilities.imports import _SACREBLEU_AVAILABLE
  from unittests.text.helpers import TextTester
  from unittests.text.inputs import _inputs_multiple_references, _inputs_single_sentence_multiple_references
label_desc: Use image node_id 2 for calling the TestCHRFScore obj's underlying member method code with example usage: obj.test_chrf_score_functional(preds, targets, char_order, word_order, lowercase, whitespace) without return types