class_docstr: A pre-built TFEstimator that takes the hidden state of the final encoder layer of BERT
  for named entity recognition based on SoftMax classification.
  Note that cased BERT models are recommended for NER.
  
  :param num_entities: Positive int. The number of entity labels to be classified.
  :param bert_config_file: The path to the json file for BERT configurations.
  :param init_checkpoint: The path to the initial checkpoint of the pre-trained BERT model if any.
                          Default is None.
  :param use_one_hot_embeddings: Boolean. Whether to use one-hot for word embeddings.
                                 Default is False.
  :param optimizer: The optimizer used to train the estimator. It should be an instance of
                    tf.train.Optimizer.
                    Default is None if no training is involved.
  :param model_dir: The output directory for model checkpoints to be written if any.
                    Default is None.
class_docstr_tok: ["A","pre-built","TFEstimator","that","takes","the","hidden","state","of","the","final","encoder","layer","of","BERT","for","named","entity","recognition","based","on","SoftMax","classification",".","Note","that","cased","BERT","models","are","recommended","for","NER",".",":","param","num_entities",":","Positive","int",".","The","number","of","entity","labels","to","be","classified",".",":","param","bert_config_file",":","The","path","to","the","json","file","for","BERT","configurations",".",":","param","init_checkpoint",":","The","path","to","the","initial","checkpoint","of","the","pre-trained","BERT","model","if","any",".","Default","is","None",".",":","param","use_one_hot_embeddings",":","Boolean",".","Whether","to","use","one-hot","for","word","embeddings",".","Default","is","False",".",":","param","optimizer",":","The","optimizer","used","to","train","the","estimator",".","It","should","be","an","instance","of","tf.train.Optimizer",".","Default","is","None","if","no","training","is","involved",".",":","param","model_dir",":","The","output","directory","for","model","checkpoints","to","be","written","if","any",".","Default","is","None","."]
code: def __init__(
      self,
      num_entities,
      bert_config_file,
      init_checkpoint=None,
      use_one_hot_embeddings=False,
      optimizer=None,
      model_dir=None,
  ):
      super(BERTNER, self).__init__(
          model_fn=make_bert_ner_model_fn(optimizer),
          bert_config_file=bert_config_file,
          init_checkpoint=init_checkpoint,
          use_one_hot_embeddings=use_one_hot_embeddings,
          model_dir=model_dir,
          num_entities=num_entities,
      )
  
imports: from bigdl.orca.tfpark.text.estimator import *
  from bigdl.dllib.utils.log4Error import invalidInputError
label_desc: Use image node_id 1 to create a new BERTNER object from inherited base classes: BERTBaseEstimator with example: obj = BERTNER(num_entities, bert_config_file, init_checkpoint, use_one_hot_embeddings, optimizer, model_dir)