class_docstr: Determines if two sentences have a swapped word that has a similar
  probability according to a language model.
  
  Args:
      max_log_prob_diff (float): the maximum decrease in log-probability
          in swapped words from `x` to `x_adv`
      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_log_prob_diff=None, compare_against_original=True
  ):
      if max_log_prob_diff is None:
          raise ValueError("Must set max_log_prob_diff")
      self.max_log_prob_diff = max_log_prob_diff
      super().__init__(compare_against_original)
  
file_path: TextAttack/textattack/constraints/grammaticality/language_models/language_model_constraint.py
imports: from abc import ABC, abstractmethod
  from textattack.constraints import Constraint
label_desc: Use image node_id 1 to create a new LanguageModelConstraint object from inherited base classes: Constraint, ABC with example: obj = LanguageModelConstraint(max_log_prob_diff, compare_against_original)