class_docstr: Uses languagetool to determine if two sentences have the same number of
  grammatical erors. (https://languagetool.org/)
  
  Args:
      grammar_error_threshold (int): the number of additional errors permitted in `x_adv`
          relative to `x`
      compare_against_original (bool): If `True`, compare against the original text.
          Otherwise, compare against the most recent text.
      language: language to use for languagetool (available choices: https://dev.languagetool.org/languages)
code: def get_errors(self, attacked_text, use_cache=False):
      text = attacked_text.text
      if use_cache:
          if text not in self.grammar_error_cache:
              self.grammar_error_cache[text] = len(
                  self.lang_tool.check(text)
              )
          return self.grammar_error_cache[text]
      else:
          return len(self.lang_tool.check(text))
  
file_path: TextAttack/textattack/constraints/grammaticality/language_tool.py
imports: import language_tool_python
  from textattack.constraints import Constraint
label_desc: Use image node_id 2 for calling the LanguageTool obj's underlying member method code with example usage: obj.get_errors(attacked_text, use_cache) and returns: self, len