def get_metrics(predictions, prediction_len, labels, label_len,
                vocab, use_bpe=False, predict_mode=False):
  """Rouge-metrics.

  Args:
    predictions: prediction to be evaluated.
    prediction_len: lengths of the predictions.
    labels: reference sentences.
    label_len: lengths of the references.
    vocab: vocabulary.
    use_bpe: to use BPE or not.
    predict_mode: set to true to print predictions.

  Returns:
    Rouge-metrics
  """
  rouge_1_m = rouge_n_metric(
      predictions, prediction_len, labels, label_len, 1,
      vocab=vocab, use_bpe=use_bpe, predict_mode=predict_mode)
  rouge_2_m = rouge_n_metric(
      predictions, prediction_len, labels, label_len, 2,
      vocab=vocab, use_bpe=use_bpe)
  rouge_l_m = rouge_l_metric(
      predictions, prediction_len, labels, label_len,
      vocab=vocab, use_bpe=use_bpe)
  return {
      "rouge_1": rouge_1_m,
      "rouge_2": rouge_2_m,
      "rouge_l": rouge_l_m
  }
Rouge-metrics.

  Args:
    predictions: prediction to be evaluated.
    prediction_len: lengths of the predictions.
    labels: reference sentences.
    label_len: lengths of the references.
    vocab: vocabulary.
    use_bpe: to use BPE or not.
    predict_mode: set to true to print predictions.

  Returns:
    Rouge-metrics
  
language/labs/exemplar_decoding/utils/rouge_utils.py