code: def _get_ngrams(n, text):
      ngram_set = set()
      text_length = len(text)
      max_index_ngram_start = text_length - n
      for i in range(max_index_ngram_start + 1):
          ngram_set.add(tuple(text[i : i + n]))
      return ngram_set
  
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 1 for calling a global function with example usage: _get_ngrams(n, text) and returns: ngram_set