class_docstr: Bleu Evaluator. Now, we support metrics `'self-bleu'`.
      
class_docstr_tok: ["Bleu","Evaluator",".","Now",",","we","support","metrics","`","'self-bleu","'","`","."]
code: def _generate_weights(self):
      self.ngram_weights = []
      for n in range(1, self.max_ngrams + 1):
          weights = [0.0] * self.max_ngrams
          weights[:n] = [1.0 / n] * n
          self.ngram_weights.append(weights)
  
imports: from fast_bleu import SelfBLEU
  from .abstract_evaluator import AbstractEvaluator
label_desc: Use image node_id 2 for calling the SelfBleuEvaluator obj's underlying member method code with example usage: obj._generate_weights() without return types