class_docstr: `Calculate Rouge Score`_, used for automatic summarization.
  
  This implementation should imitate the behaviour of the ``rouge-score`` package `Python ROUGE Implementation`
  
  As input to ``forward`` and ``update`` the metric accepts the following input:
  
  - ``preds`` (:class:`~Sequence`): An iterable of predicted sentences or a single predicted sentence
  - ``target`` (:class:`~Sequence`): An iterable of target sentences
    or an iterable of interables of target sentences
    or a single target sentence
  
  As output of ``forward`` and ``compute`` the metric returns the following output:
  
  - ``rouge`` (:class:`~Dict`): A dictionary of tensor rouge scores for each input str rouge key
  
  Args:
      use_stemmer: Use Porter stemmer to strip word suffixes to improve matching.
      normalizer: A user's own normalizer function.
          If this is ``None``, replacing any non-alpha-numeric characters with spaces is default.
          This function must take a ``str`` and return a ``str``.
      tokenizer:
          A user's own tokenizer function. If this is ``None``, splitting by spaces is default
          This function must take a ``str`` and return ``Sequence[str]``
      accumulate:
          Useful in case of multi-reference rouge score.
  
          - ``avg`` takes the avg of all references with respect to predictions
          - ``best`` takes the best fmeasure score obtained between prediction and multiple corresponding references.
  
      rouge_keys: A list of rouge types to calculate.
          Keys that are allowed are ``rougeL``, ``rougeLsum``, and ``rouge1`` through ``rouge9``.
      kwargs: Additional keyword arguments, see :ref:`Metric kwargs` for more info.
  
  Example:
      >>> from torchmetrics.text.rouge import ROUGEScore
      >>> preds = "My name is John"
      >>> target = "Is your name John"
      >>> rouge = ROUGEScore()
      >>> from pprint import pprint
      >>> pprint(rouge(preds, target))
      {'rouge1_fmeasure': tensor(0.7500),
       'rouge1_precision': tensor(0.7500),
       'rouge1_recall': tensor(0.7500),
       'rouge2_fmeasure': tensor(0.),
       'rouge2_precision': tensor(0.),
       'rouge2_recall': tensor(0.),
       'rougeL_fmeasure': tensor(0.5000),
       'rougeL_precision': tensor(0.5000),
       'rougeL_recall': tensor(0.5000),
       'rougeLsum_fmeasure': tensor(0.5000),
       'rougeLsum_precision': tensor(0.5000),
       'rougeLsum_recall': tensor(0.5000)}
  
  
  Raises:
      ValueError:
          If the python packages ``nltk`` is not installed.
      ValueError:
          If any of the ``rouge_keys`` does not belong to the allowed set of keys.
docstr: Return a unique hash for the specific instance of this metric.
docstr_tok: ["Return","a","unique","hash","for","the","specific","instance","of","this","metric","."]
code: def __hash__(self) -> int:
      """Return a unique hash for the specific instance of this metric."""
      # override to hash list objects.
      # this is a bug in the upstream pytorch release.
      hash_vals = [self.__class__.__name__]
      for key in self._defaults:
          value = getattr(self, key)
          if isinstance(value, list):
              value = tuple(value)
          hash_vals.append(value)
  
      return hash(tuple(hash_vals))
  
file_path: torchmetrics/src/torchmetrics/text/rouge.py
imports: from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
  from torch import Tensor
  from typing_extensions import Literal
  from torchmetrics import Metric
  from torchmetrics.functional.text.rouge import ALLOWED_ACCUMULATE_VALUES, ALLOWED_ROUGE_KEYS, _rouge_score_compute, _rouge_score_update
  from torchmetrics.utilities.imports import _MATPLOTLIB_AVAILABLE, _NLTK_AVAILABLE
  from torchmetrics.utilities.plot import _AX_TYPE, _PLOT_OUT_TYPE
label_desc: Use image node_id 4 for calling the ROUGEScore obj's underlying member method code with example usage: obj.__hash__() and returns: hash