code: def rouge_l_sentence_level(eval_sentences, ref_sentences):
      """Computes ROUGE-L (sentence level) of two collections of sentences.
  
      Source: https://www.microsoft.com/en-us/research/publication/
      rouge-a-package-for-automatic-evaluation-of-summaries/
  
      Calculated according to:
      R_lcs = LCS(X,Y)/m
      P_lcs = LCS(X,Y)/n
      F_lcs = ((1 + beta^2)*R_lcs*P_lcs) / (R_lcs + (beta^2) * P_lcs)
  
      where:
      X = reference summary
      Y = Candidate summary
      m = length of reference summary
      n = length of candidate summary
  
      Args:
        eval_sentences: The sentences that have been picked by the summarizer
        ref_sentences: The sentences from the reference set
  
      Returns:
        A float: F_lcs
      """
  
      f1_scores = []
      for eval_sentence, ref_sentence in zip(
          eval_sentences, ref_sentences
      ):
          m = len(ref_sentence)
          n = len(eval_sentence)
          lcs = _len_lcs(eval_sentence, ref_sentence)
          f1_scores.append(_f_lcs(lcs, m, n))
      return np.mean(f1_scores, dtype=np.float32)
  
file_path: tensor2tensor/tensor2tensor/utils/rouge.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 4 for calling a global function with example usage: rouge_l_sentence_level(eval_sentences, ref_sentences) and returns: np