class_docstr: Text classification evaluator.
  This text classification evaluator can currently be loaded from [`evaluator`] using the default task name
  `text-classification` or with a `"sentiment-analysis"` alias.
  Methods in this class assume a data format compatible with the [`~transformers.TextClassificationPipeline`] - a single textual
  feature as input and a categorical label as output.
code: def predictions_processor(self, predictions, label_mapping):
      predictions = [
          label_mapping[element["label"]]
          if label_mapping is not None
          else element["label"]
          for element in predictions
      ]
      return {"predictions": predictions}
  
file_path: evaluate/src/evaluate/evaluator/text_classification.py
imports: from numbers import Number
  from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Tuple, Union
  from datasets import Dataset, load_dataset
  from typing_extensions import Literal
  from ..module import EvaluationModule
  from ..utils.file_utils import add_end_docstrings, add_start_docstrings
  from .base import EVALUATOR_COMPUTE_RETURN_DOCSTRING, EVALUTOR_COMPUTE_START_DOCSTRING, Evaluator
  from .utils import DatasetColumnPair
label_desc: Use image node_id 3 for calling the TextClassificationEvaluator obj's underlying member method code with example usage: obj.predictions_processor(predictions, label_mapping) and returns: dict