docstr: convert text-label into text-index.
          
docstr_tok: ["convert","text-label","into","text-index","."]
code: def decode_label(self, batch):
      """convert text-label into text-index."""
      structure_idx = batch[1]
      gt_bbox_list = batch[2]
      shape_list = batch[-1]
      ignored_tokens = self.get_ignored_tokens()
      end_idx = self.dict[self.end_str]
  
      structure_batch_list = []
      bbox_batch_list = []
      batch_size = len(structure_idx)
      for batch_idx in range(batch_size):
          structure_list = []
          bbox_list = []
          for idx in range(len(structure_idx[batch_idx])):
              char_idx = int(structure_idx[batch_idx][idx])
              if idx > 0 and char_idx == end_idx:
                  break
              if char_idx in ignored_tokens:
                  continue
              structure_list.append(self.character[char_idx])
  
              bbox = gt_bbox_list[batch_idx][idx]
              if bbox.sum() != 0:
                  bbox = self._bbox_decode(bbox, shape_list[batch_idx])
                  bbox_list.append(bbox)
          structure_batch_list.append(structure_list)
          bbox_batch_list.append(bbox_list)
      result = {
          "bbox_batch_list": bbox_batch_list,
          "structure_batch_list": structure_batch_list,
      }
      return result
  
file_path: PaddleOCR/ppocr/postprocess/table_postprocess.py
imports: import numpy
  import paddle
  from .rec_postprocess import AttnLabelDecode
label_desc: Use image node_id 4 for calling the TableLabelDecode obj's underlying member method code with example usage: obj.decode_label(batch) and returns: result