class_docstr: A constraint on BERT-Score difference.
  
  Args:
      min_bert_score (float), minimum threshold value for BERT-Score
      model_name (str), name of model to use for scoring
      num_layers (int), number of hidden layers in the model
      score_type (str), Pick one of following three choices
  
          -(1) ``precision`` : match words from candidate text to reference text
          -(2) ``recall`` :  match words from reference text to candidate text
          -(3) ``f1``: harmonic mean of precision and recall (recommended)
  
      compare_against_original (bool):
          If ``True``, compare new ``x_adv`` against the original ``x``.
          Otherwise, compare it against the previous ``x_adv``.
docstr: Returns the metric similarity between the embedding of the starting
  text and the transformed text.
  
  Args:
      starting_text: The ``AttackedText``to use as a starting point.
      transformed_text: A transformed ``AttackedText``
  
  Returns:
      The similarity between the starting and transformed text using BERTScore metric.
code: def _sim_score(self, starting_text, transformed_text):
      """Returns the metric similarity between the embedding of the starting
      text and the transformed text.
  
      Args:
          starting_text: The ``AttackedText``to use as a starting point.
          transformed_text: A transformed ``AttackedText``
  
      Returns:
          The similarity between the starting and transformed text using BERTScore metric.
      """
      cand = transformed_text.text
      ref = starting_text.text
      result = self._bert_scorer.score([cand], [ref])
      return result[BERTScore.SCORE_TYPE2IDX[self.score_type]].item()
  
file_path: TextAttack/textattack/constraints/semantics/bert_score.py
imports: import bert_score
  from textattack.constraints import Constraint
  from textattack.shared import utils
label_desc: Use image node_id 2 for calling the BERTScore obj's underlying member method code with example usage: obj._sim_score(starting_text, transformed_text) and returns: result