class_docstr: A constraint on BLEU score difference.
  
  Args:
      max_bleu_score (int): Maximum BLEU score allowed.
      compare_against_original (bool):  If `True`, compare new `x_adv` against the original `x`.
          Otherwise, compare it against the previous `x_adv`.
class_docstr_tok: ["A","constraint","on","BLEU","score","difference",".","Args",":","max_bleu_score","(","int",")",":","Maximum","BLEU","score","allowed",".","compare_against_original","(","bool",")",":","If","`","True","`",",","compare","new","`","x_adv","`","against","the","original","`","x","`",".","Otherwise",",","compare","it","against","the","previous","`","x_adv","`","."]
code: def _check_constraint(self, transformed_text, reference_text):
      ref = reference_text.words
      hyp = transformed_text.words
      bleu_score = nltk.translate.bleu_score.sentence_bleu([ref], hyp)
      return bleu_score <= self.max_bleu_score
  
imports: import nltk
  from textattack.constraints import Constraint
label_desc: Use image node_id 2 for calling the BLEU obj's underlying member method code with example usage: obj._check_constraint(transformed_text, reference_text) and returns: unknown