class_docstr: Model wrapper for Named Entity Recognition
class_docstr_tok: ["Model","wrapper","for","Named","Entity","Recognition"]
code: def decoding(self, output, stored_info):
      output_ids, pairing_decisions, typing_decisions = (
          output["output_ids"].tolist(),
          output["pairing"],
          output["typing"],
      )
      subtoken_map = stored_info["subtoken_map"]
  
      mapping = self.get_mapping_to_input_sequence(output_ids)
      entities, start_ind = [], []
      # reconstructing mention_indices and antecedent_indices
      for i in range(len(output_ids)):
          if output_ids[i] == self.tz.pad_token_id:
              break
          if output_ids[i] == self.mention_start_id:
              start_ind.append(i)
          if output_ids[i] == self.mention_end_id:
              this_type = int(typing_decisions[i])
  
              entity = (
                  subtoken_map[
                      mapping[start_ind[pairing_decisions[i]]]
                  ],
                  subtoken_map[mapping[i]],
                  this_type,
              )
              entities.append(entity)
  
      result_dict = {
          "predicted_entities": entities,
          "predicted_relations": [],
      }
      return result_dict
  
file_path: DeepKE/src/deepke/triple_extraction/ASP/models/model_ner.py
imports: import sys
  import os
  import torch
  import torch.nn
  import logging
  from transformers import T5Tokenizer
  from .t5_ner import T5NER
label_desc: Use image node_id 7 for calling the NERModel obj's underlying member method code with example usage: obj.decoding(output, stored_info) and returns: result_dict