class_docstr: An example for training/inference.
class_docstr_tok: ["An","example","for","training\/inference","."]
docstr: Get a readable dict that summarizes the attributes of an InputExample.
docstr_tok: ["Get","a","readable","dict","that","summarizes","the","attributes","of","an","InputExample","."]
code: def readable_summary(self):
      """Get a readable dict that summarizes the attributes of an InputExample."""
      seq_length = sum(self.utterance_mask)
      utt_toks = self._tokenizer.ids_to_tokens(
          self.utterance_ids[:seq_length]
      )
      utt_tok_mask_pairs = list(
          zip(utt_toks, self.utterance_segment[:seq_length])
      )
      active_intent = (
          self.service_schema.get_intent_from_id(self.intent_id)
          if self.intent_status == STATUS_ACTIVE
          else ""
      )
      slot_values_in_state = {}
      if self.categorical_slot_status == STATUS_ACTIVE:
          slot_values_in_state[
              self.service_schema.get_categorical_slot_from_id(
                  self.categorical_slot_id
              )
          ] = self.service_schema.get_categorical_slot_value_from_id(
              self.categorical_slot_id, self.categorical_slot_value_id
          )
      elif self.categorical_slot_status == STATUS_DONTCARE:
          slot_values_in_state[
              self.service_schema.get_categorical_slot_from_id(
                  self.categorical_slot_id
              )
          ] = STR_DONTCARE
      if self.noncategorical_slot_status == STATUS_ACTIVE:
          slot = self.service_schema.get_non_categorical_slot_from_id(
              self.noncategorical_slot_id
          )
          start_id = self.noncategorical_slot_value_start[slot]
          end_id = self.noncategorical_slot_value_end[slot]
          # Token list is consisted of the subwords that may start with "##". We
          # remove "##" to reconstruct the original value. Note that it's not a
          # strict restoration of the original string. It's primarily used for
          # debugging.
          # ex. ["san", "j", "##ose"] --> "san jose"
          readable_value = " ".join(
              utt_toks[start_id : end_id + 1]
          ).replace(" ##", "")
          slot_values_in_state[slot] = readable_value
      elif self.noncategorical_slot_status == STATUS_DONTCARE:
          slot = self.service_schema.get_non_categorical_slot_from_id(
              self.noncategorical_slot_id
          )
          slot_values_in_state[slot] = STR_DONTCARE
  
      summary_dict = {
          "utt_tok_mask_pairs": utt_tok_mask_pairs,
          "utt_len": seq_length,
          "categorical_slot_id": self.categorical_slot_id,
          "noncategorical_slot_id": self.noncategorical_slot_id,
          "intent_id": self.intent_id,
          "service_name": self.service_schema.service_name,
          "active_intent": active_intent,
          "slot_values_in_state": slot_values_in_state,
      }
      return summary_dict
  
file_path: NeMo/nemo/collections/nlp/data/dialogue/input_example/sgd_input_example.py
imports: from typing import List
  from nemo.collections.nlp.data.dialogue.input_example.input_example import DialogueInputExample
  from nemo.utils import logging
label_desc: Use image node_id 2 for calling the SGDInputExample obj's underlying member method code with example usage: obj.readable_summary() and returns: summary_dict