class_docstr: Bleu Evaluator. Now, we support metrics `'self-bleu'`.
      
class_docstr_tok: ["Bleu","Evaluator",".","Now",",","we","support","metrics","`","'self-bleu","'","`","."]
code: def __init__(self, config):
      super(SelfBleuEvaluator, self).__init__(config)
      self.max_ngrams = config["self_bleu_max_ngrams"]
      self.ngrams = [
          "self-bleu-{}".format(n)
          for n in range(1, self.max_ngrams + 1)
      ]
      self._generate_weights()
  
imports: from fast_bleu import SelfBLEU
  from .abstract_evaluator import AbstractEvaluator
label_desc: Use image node_id 1 to create a new SelfBleuEvaluator object from inherited base classes: AbstractEvaluator with example: obj = SelfBleuEvaluator(config)