(self, target_text, prediction_text)
return results
Calculates repetition scores in target_text and prediction_text.

    Args:
      target_text: target text that may contain repetitions.
      prediction_text: prediction text that may contain repetitions.

    Returns:
      A dict mapping each repetition type to a RepetitionScore object.
    Raises:
      ValueError: If an invalid repetition type is encountered.
Calculates repetition scores in target_text and prediction_text.
Calculates repetition scores in target_text and prediction_text .
def score(self, target_text, prediction_text) -> Dict[Text, RepetitionScore]:
    """Calculates repetition scores in target_text and prediction_text.

    Args:
      target_text: target text that may contain repetitions.
      prediction_text: prediction text that may contain repetitions.

    Returns:
      A dict mapping each repetition type to a RepetitionScore object.
    Raises:
      ValueError: If an invalid repetition type is encountered.
    """
    target_results = self._score_single(target_text)
    prediction_results = self._score_single(prediction_text)
    results = dict()
    for k in target_results:
      results[k] = RepetitionScore(
          target_ratio=target_results[k],
          prediction_ratio=prediction_results[k])
    return results
def score ( self , target_text , prediction_text ) -> Dict [ Text , RepetitionScore ] : target_results = self . _score_single ( target_text ) prediction_results = self . _score_single ( prediction_text ) results = dict ( ) for k in target_results : results [ k ] = RepetitionScore ( target_ratio = target_results [ k ] , prediction_ratio = prediction_results [ k ] ) return results