class_docstr: Unique Evaluator. Now, we support metrics `'unique'`.
      
class_docstr_tok: ["Unique","Evaluator",".","Now",",","we","support","metrics","`","'unique","'","`","."]
code: def _calc_metrics_info(self, generate_corpus, reference_corpus=None):
      results = {}
      ngrams_all = [Counter() for _ in range(self.unique_max_ngrams)]
  
      for gen in generate_corpus.tokens:
          ngrams = []
          for i in range(self.unique_max_ngrams):
              ngrams.append(gen[i:])
              ngram = Counter(zip(*ngrams))
              ngrams_all[i].update(ngram)
  
      for i in range(self.unique_max_ngrams):
          results[f"unique-{i+1}"] = (
              sum(filter(lambda x: x == 1, ngrams_all[i].values()))
              / sum(ngrams_all[i].values())
              * 100
          )
  
      return results
  
imports: from collections import Counter
  from .abstract_evaluator import AbstractEvaluator
label_desc: Use image node_id 2 for calling the UniqueEvaluator obj's underlying member method code with example usage: obj._calc_metrics_info(generate_corpus, reference_corpus) and returns: results