class_docstr: A constraint on chrF (n-gram F-score) difference.
  
  Args:
      max_chrf (int): Max n-gram F-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","chrF","(","n-gram","F-score",")","difference",".","Args",":","max_chrf","(","int",")",":","Max","n-gram","F-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 __init__(self, max_chrf, compare_against_original=True):
      super().__init__(compare_against_original)
      if not isinstance(max_chrf, int):
          raise TypeError("max_chrf must be an int")
      self.max_chrf = max_chrf
  
imports: import nltk.translate.chrf_score
  from textattack.constraints import Constraint
label_desc: Use image node_id 1 to create a new chrF object from inherited base classes: Constraint with example: obj = chrF(max_chrf, compare_against_original)