class_docstr: Label Encoder for the named entity recognition task.
class_docstr_tok: ["Label","Encoder","for","the","named","entity","recognition","task","."]
docstr: Inverse Transform NER model predictions into human readable dictionary annotations
  which have the same format as the original annotations.
  
  Parameters
  ----------
  y
      NER model predictions.
  
  Returns
  -------
  pred_label_only
      Predictions which only have labels.
  pred_with_offset
      Predictions with both labels and the position (character offset) of the corresponding words.
docstr_tok: ["Inverse","Transform","NER","model","predictions","into","human","readable","dictionary","annotations","which","have","the","same","format","as","the","original","annotations",".","Parameters","--","--","--","--","--","y","NER","model","predictions",".","Returns","--","--","--","-","pred_label_only","Predictions","which","only","have","labels",".","pred_with_offset","Predictions","with","both","labels","and","the","position","(","character","offset",")","of","the","corresponding","words","."]
code: def inverse_transform(self, y: List):
      """
      Inverse Transform NER model predictions into human readable dictionary annotations
      which have the same format as the original annotations.
  
      Parameters
      ----------
      y
          NER model predictions.
  
      Returns
      -------
      pred_label_only
          Predictions which only have labels.
      pred_with_offset
          Predictions with both labels and the position (character offset) of the corresponding words.
      """
      pred_label_only, pred_with_offset, pred_with_proba = [], [], []
      for token_preds, offsets, pred_proba in y:
          temp_pred, temp_offset, temp_proba = [], [], []
          for token_pred, offset, probability in zip(
              token_preds, offsets, pred_proba
          ):
              inverse_pred_label = self.inverse_entity_map[token_pred]
              temp_pred.append(inverse_pred_label)
              temp_proba.append(
                  {
                      ENTITY_GROUP: inverse_pred_label,
                      START_OFFSET: offset[0],
                      END_OFFSET: offset[1],
                      PROBABILITY: {
                          e: p
                          for e, p in zip(
                              list(self.entity_map.keys())[1:],
                              probability[1:],
                          )
                      },
                  }
              )
              if inverse_pred_label not in self.ner_special_tags:
                  temp_offset.append(
                      {
                          ENTITY_GROUP: inverse_pred_label,
                          START_OFFSET: offset[0],
                          END_OFFSET: offset[1],
                      }
                  )
          pred_label_only.append(temp_pred)
          pred_with_offset.append(temp_offset)
          pred_with_proba.append(temp_proba)
      return pred_label_only, pred_with_offset, pred_with_proba
  
imports: import json
  import logging
  import re
  from typing import Any, Dict, List, Optional, Union
  import jsonschema
  import numpy
  import pandas
  from omegaconf import DictConfig, OmegaConf
  from sklearn.preprocessing import LabelEncoder
  from ..constants import AUTOMM, END_OFFSET, ENTITY_GROUP, NER_ANNOTATION, PROBABILITY, START_OFFSET
label_desc: Use image node_id 6 for calling the NerLabelEncoder obj's underlying member method code with example usage: obj.inverse_transform(y) and returns: pred_label_only,  pred_with_offset,  pred_with_proba