code: def wsc_simple(prediction, example=None, is_target=False):
      """Sees whether we predicted the referent or not."""
      if is_target:
          return example["label"]
  
      determiners = {
          "a",
          "an",
          "few",
          "her",
          "his",
          "each",
          "every",
          "many",
          "much",
          "my",
          "our",
          "some",
          "that",
          "the",
          "their",
          "these",
          "this",
          "those",
          "which",
          "whose",
          "your",
      }
  
      def clean(s):
          """Ignore capitalization and determiners."""
          s = tf.compat.as_text(s).strip().lower()
          return " ".join(
              [w for w in s.split(" ") if w not in determiners]
          )
  
      prediction = clean(prediction)
      if not prediction:
          # We don't want an empty prediction to accidentally return 0 and spuriously
          # match the label.
          return -1
  
      # We aren't using the label but rather using the extracted referent so that we
      # can see if the prediction is equivalent to the referent.
      referent = clean(example["targets_pretokenized"])
  
      if ("'" in prediction) != ("'" in referent):
          # Make sure we don't mark cases where the prediction is "Bob" and the
          # referent is "Bob's hat" as predicting the referent.
          predicted_referent = False
      else:
          prediction_words = set(prediction.split(" "))
          referent_words = set(referent.split(" "))
  
          # Handle cases where the prediction is "fuzzy bunny" and the referent is
          # "bunny".
          predicted_referent = prediction_words.issubset(
              referent_words
          ) or referent_words.issubset(prediction_words)
  
      return int(predicted_referent)
  
file_path: text-to-text-transfer-transformer/t5/data/postprocessors.py
imports: import tensorflow.compat.v2
label_desc: Use image node_id 8 for calling a global function with example usage: wsc_simple(prediction, example, is_target) and returns: int, example, str, unknown