class_docstr: Computes ROUGE Scores.
class_docstr_tok: ["Computes","ROUGE","Scores","."]
docstr: Initializes ROUGE Combiner.
  
  Args:
    rouge_type: ROUGE type to calculate.
    key: MetricKey for extract_output().
    eval_config: Eval config.
    model_name: The model for which to compute these metrics.
    output_name: The output name for which to compute these metrics.
    use_stemmer: Bool indicating whether Porter stemmer should be used to
      strip word suffixes to improve matching. This arg is used in the
      DefaultTokenizer, but other tokenizers might or might not choose to use
      this.
    split_summaries: Whether to add newlines between sentences for rougeLsum.
    tokenizer: Tokenizer object which has a tokenize() method.
docstr_tok: ["Initializes","ROUGE","Combiner",".","Args",":","rouge_type",":","ROUGE","type","to","calculate",".","key",":","MetricKey","for","extract_output","(",")",".","eval_config",":","Eval","config",".","model_name",":","The","model","for","which","to","compute","these","metrics",".","output_name",":","The","output","name","for","which","to","compute","these","metrics",".","use_stemmer",":","Bool","indicating","whether","Porter","stemmer","should","be","used","to","strip","word","suffixes","to","improve","matching",".","This","arg","is","used","in","the","DefaultTokenizer",",","but","other","tokenizers","might","or","might","not","choose","to","use","this",".","split_summaries",":","Whether","to","add","newlines","between","sentences","for","rougeLsum",".","tokenizer",":","Tokenizer","object","which","has","a","tokenize","(",")","method","."]
code: def __init__(
      self,
      rouge_type: str,
      key: metric_types.MetricKey,
      eval_config: config_pb2.EvalConfig,
      model_name: str,
      output_name: str,
      use_stemmer: bool,
      split_summaries: bool,
      tokenizer: tokenizers.Tokenizer,
  ):
      """Initializes ROUGE Combiner.
  
      Args:
        rouge_type: ROUGE type to calculate.
        key: MetricKey for extract_output().
        eval_config: Eval config.
        model_name: The model for which to compute these metrics.
        output_name: The output name for which to compute these metrics.
        use_stemmer: Bool indicating whether Porter stemmer should be used to
          strip word suffixes to improve matching. This arg is used in the
          DefaultTokenizer, but other tokenizers might or might not choose to use
          this.
        split_summaries: Whether to add newlines between sentences for rougeLsum.
        tokenizer: Tokenizer object which has a tokenize() method.
      """
      self._use_nltks_recommended_sentence_tokenizer = (
          split_summaries and rouge_type == "rougeLsum"
      )
      self.rouge_type = rouge_type
      self.key = key
      self.eval_config = eval_config
      self.model_name = model_name
      self.output_name = output_name
      self.scorer = rouge_scorer.RougeScorer(
          rouge_types=[rouge_type],
          use_stemmer=use_stemmer,
          split_summaries=split_summaries,
          tokenizer=tokenizer,
      )
  
imports: import dataclasses
  from typing import Dict, Iterable, Optional
  from absl import logging
  import apache_beam
  import nltk
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.metrics import metric_util
  from tensorflow_model_analysis.proto import config_pb2
  from rouge_score import rouge_scorer
  from rouge_score import scoring
  from rouge_score import tokenizers
label_desc: Use image node_id 1 to create a new RougeCombiner object from inherited base classes: beam with example: obj = RougeCombiner(rouge_type, key, eval_config, model_name, output_name, use_stemmer, split_summaries, tokenizer)