def rouge_l_sentence_level(eval_sentences, ref_sentences):
    'Computes ROUGE-L (sentence level) of two collections of sentences.\n\n  Source: https://www.microsoft.com/en-us/research/publication/\n  rouge-a-package-for-automatic-evaluation-of-summaries/\n\n  Calculated according to:\n  R_lcs = LCS(X,Y)/m\n  P_lcs = LCS(X,Y)/n\n  F_lcs = ((1 + beta^2)*R_lcs*P_lcs) / (R_lcs + (beta^2) * P_lcs)\n\n  where:\n  X = reference summary\n  Y = Candidate summary\n  m = length of reference summary\n  n = length of candidate summary\n\n  Args:\n    eval_sentences: The sentences that have been picked by the summarizer\n    ref_sentences: The sentences from the reference set\n\n  Returns:\n    A float: F_lcs\n  '
    f1_scores = []
    for (eval_sentence, ref_sentence) in zip(eval_sentences, ref_sentences):
        m = float(len(ref_sentence))
        n = float(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)
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
def rouge_l_sentence_level(eval_sentences, ref_sentences):
    'Computes ROUGE-L (sentence level) of two collections of sentences.\n\n  Source: https://www.microsoft.com/en-us/research/publication/\n  rouge-a-package-for-automatic-evaluation-of-summaries/\n\n  Calculated according to:\n  R_lcs = LCS(X,Y)/m\n  P_lcs = LCS(X,Y)/n\n  F_lcs = ((1 + beta^2)*R_lcs*P_lcs) / (R_lcs + (beta^2) * P_lcs)\n\n  where:\n  X = reference summary\n  Y = Candidate summary\n  m = length of reference summary\n  n = length of candidate summary\n\n  Args:\n    eval_sentences: The sentences that have been picked by the summarizer\n    ref_sentences: The sentences from the reference set\n\n  Returns:\n    A float: F_lcs\n  '
    f1_scores = []
    for (eval_sentence, ref_sentence) in zip(eval_sentences, ref_sentences):
        m = float(len(ref_sentence))
        n = float(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)