code: def rouge_n(evaluated_sentences, reference_sentences, n=2):
      """
      Computes ROUGE-N of two text collections of sentences.
      Sourece: http://research.microsoft.com/en-us/um/people/cyl/download/
      papers/rouge-working-note-v1.3.1.pdf
  
      :param evaluated_sentences:
          The sentences that have been picked by the summarizer
      :param reference_sentences:
          The sentences from the reference set
      :param n: Size of ngram.  Defaults to 2.
      :returns:
          float 0 <= ROUGE-N <= 1, where 0 means no overlap and 1 means
          exactly the same.
      :raises ValueError: raises exception if a param has len <= 0
      """
      if len(evaluated_sentences) <= 0 or len(reference_sentences) <= 0:
          raise (
              ValueError(
                  "Collections must contain at least 1 sentence."
              )
          )
  
      evaluated_ngrams = _get_word_ngrams(n, evaluated_sentences)
      reference_ngrams = _get_word_ngrams(n, reference_sentences)
      reference_count = len(reference_ngrams)
  
      # Gets the overlapping ngrams between evaluated and reference
      overlapping_ngrams = evaluated_ngrams.intersection(
          reference_ngrams
      )
      overlapping_count = len(overlapping_ngrams)
  
      return overlapping_count / reference_count
  
file_path: sumy/sumy/evaluation/rouge.py
imports: from __future__ import absolute_import
  from __future__ import division, print_function, unicode_literals
  from ..models.dom import Sentence
label_desc: Use image node_id 8 for calling a global function with example usage: rouge_n(evaluated_sentences, reference_sentences, n) and returns: unknown