class_docstr: Test class for `ROUGEScore` metric.
class_docstr_tok: ["Test","class","for","`","ROUGEScore","`","metric","."]
docstr: Test functional implementation of metric.
docstr_tok: ["Test","functional","implementation","of","metric","."]
code: def test_rouge_score_functional(
      self, preds, targets, pl_rouge_metric_key, use_stemmer, accumulate
  ):
      """Test functional implementation of metric."""
      metric_args = {
          "use_stemmer": use_stemmer,
          "accumulate": accumulate,
      }
  
      rouge_level, metric = pl_rouge_metric_key.split("_")
      rouge_metric = partial(
          _compute_rouge_score,
          use_stemmer=use_stemmer,
          rouge_level=rouge_level,
          metric=metric,
          accumulate=accumulate,
      )
      self.run_functional_metric_test(
          preds,
          targets,
          metric_functional=rouge_score,
          reference_metric=rouge_metric,
          metric_args=metric_args,
          key=pl_rouge_metric_key,
      )
  
imports: import re
  from functools import partial
  from typing import Callable, Sequence, Union
  import pytest
  import torch
  from torch import Tensor
  from torchmetrics.functional.text.rouge import rouge_score
  from torchmetrics.text.rouge import ROUGEScore
  from torchmetrics.utilities.imports import _NLTK_AVAILABLE, _ROUGE_SCORE_AVAILABLE
  from typing_extensions import Literal
  from unittests.text.helpers import TextTester, skip_on_connection_issues
  from unittests.text.inputs import _Input, _inputs_multiple_references, _inputs_single_sentence_single_reference
label_desc: Use image node_id 2 for calling the TestROUGEScore obj's underlying member method code with example usage: obj.test_rouge_score_functional(preds, targets, pl_rouge_metric_key, use_stemmer, accumulate) without return types