class_docstr: Base text recognition postprocessor.
  
  Args:
      dictionary (dict or :obj:`Dictionary`): The config for `Dictionary` or
          the instance of `Dictionary`.
      max_seq_len (int): max_seq_len (int): Maximum sequence length. The
          sequence is usually generated from decoder. Defaults to 40.
      ignore_chars (list[str]): A list of characters to be ignored from the
          final results. Postprocessor will skip over these characters when
          converting raw indexes to characters. Apart from single characters,
          each item can be one of the following reversed keywords: 'padding',
          'end' and 'unknown', which refer to their corresponding special
          tokens in the dictionary.
docstr: Convert outputs to strings and scores.
  
  Args:
      probs (torch.Tensor): Batched character probabilities, the model's
          softmaxed output in size: :math:`(N, T, C)`.
      data_samples (list[TextRecogDataSample]): The list of
          TextRecogDataSample.
  
  Returns:
      list(TextRecogDataSample): The list of TextRecogDataSample. It
      usually contain ``pred_text`` information.
code: def __call__(
      self,
      probs: torch.Tensor,
      data_samples: Sequence[TextRecogDataSample],
  ) -> Sequence[TextRecogDataSample]:
      """Convert outputs to strings and scores.
  
      Args:
          probs (torch.Tensor): Batched character probabilities, the model's
              softmaxed output in size: :math:`(N, T, C)`.
          data_samples (list[TextRecogDataSample]): The list of
              TextRecogDataSample.
  
      Returns:
          list(TextRecogDataSample): The list of TextRecogDataSample. It
          usually contain ``pred_text`` information.
      """
      batch_size = probs.size(0)
  
      for idx in range(batch_size):
          index, score = self.get_single_prediction(
              probs[idx, :, :], data_samples[idx]
          )
          text = self.dictionary.idx2str(index)
          pred_text = LabelData()
          pred_text.score = score
          pred_text.item = text
          data_samples[idx].pred_text = pred_text
      return data_samples
  
file_path: mmocr/mmocr/models/textrecog/postprocessors/base.py
imports: import warnings
  from typing import Dict, Optional, Sequence, Tuple, Union
  import mmengine
  import torch
  from mmengine.structures import LabelData
  from mmocr.models.common.dictionary import Dictionary
  from mmocr.registry import TASK_UTILS
  from mmocr.structures import TextRecogDataSample
label_desc: Use image node_id 3 for calling the BaseTextRecogPostprocessor obj's underlying member method code with example usage: obj.__call__(probs, data_samples) and returns: data_samples