class_docstr: Label Encoder for the named entity recognition task.
class_docstr_tok: ["Label","Encoder","for","the","named","entity","recognition","task","."]
code: def __init__(
      self, config: DictConfig, entity_map: Optional[dict] = None
  ):
      self.entity_map = entity_map
      self.config = config
      model_config = config.model.ner_text
      self.ner_special_tags = OmegaConf.to_object(
          model_config.special_tags
      )
      self.prefix = config.model.names[0]
      self.b_prefix = "B-"
      self.i_prefix = "I-"
  
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 1 to create a new NerLabelEncoder object  with example: obj = NerLabelEncoder(config, entity_map)