class_docstr: This Named Entity recognition annotator allows to train generic NER model
  based on Neural Networks.
  
  The architecture of the neural network is a Char CNNs - BiLSTM - CRF that
  achieves state-of-the-art in most datasets.
  
  For instantiated/pretrained models, see :class:`.NerDLModel`.
  
  The training data should be a labeled Spark Dataset, in the format of
  :class:`.CoNLL` 2003 IOB with `Annotation` type columns. The data should
  have columns of type ``DOCUMENT, TOKEN, WORD_EMBEDDINGS`` and an additional
  label column of annotator type ``NAMED_ENTITY``.
  
  Excluding the label, this can be done with for example:
  
  - a SentenceDetector,
  - a Tokenizer and
  - a WordEmbeddingsModel (any embeddings can be chosen, e.g. BertEmbeddings
    for BERT based embeddings).
  
  Setting a test dataset to monitor model metrics can be done with
  ``.setTestDataset``. The method expects a path to a parquet file containing a
  dataframe that has the same required columns as the training dataframe. The
  pre-processing steps for the training dataframe should also be applied to the test
  dataframe. The following example will show how to create the test dataset with a
  CoNLL dataset:
  
  >>> documentAssembler = DocumentAssembler() \
  ...     .setInputCol("text") \
  ...     .setOutputCol("document")
  >>> embeddings = WordEmbeddingsModel \
  ...     .pretrained() \
  ...     .setInputCols(["document", "token"]) \
  ...     .setOutputCol("embeddings")
  >>> preProcessingPipeline = Pipeline().setStages([documentAssembler, embeddings])
  >>> conll = CoNLL()
  >>> (train, test) = conll \
  ...     .readDataset(spark, "src/test/resources/conll2003/eng.train") \
  ...     .randomSplit([0.8, 0.2])
  >>> preProcessingPipeline \
  ...     .fit(test) \
  ...     .transform(test)
  ...     .write \
  ...     .mode("overwrite") \
  ...     .parquet("test_data")
  >>> tagger = NerDLApproach() \
  ...     .setInputCols(["document", "token", "embeddings"]) \
  ...     .setLabelColumn("label") \
  ...     .setOutputCol("ner") \
  ...     .setTestDataset("test_data")
  
  For extended examples of usage, see the `Examples <https://github.com/JohnSnowLabs/spark-nlp/blob/master/examples/python/training/english/dl-ner>`__.
  
  ==================================== ======================
  Input Annotation types               Output Annotation type
  ==================================== ======================
  ``DOCUMENT, TOKEN, WORD_EMBEDDINGS`` ``NAMED_ENTITY``
  ==================================== ======================
  
  Parameters
  ----------
  labelColumn
      Column with label per each token
  entities
      Entities to recognize
  minEpochs
      Minimum number of epochs to train, by default 0
  maxEpochs
      Maximum number of epochs to train, by default 50
  verbose
      Level of verbosity during training, by default 2
  randomSeed
      Random seed
  lr
      Learning Rate, by default 0.001
  po
      Learning rate decay coefficient. Real Learning Rage = lr / (1 + po *
      epoch), by default 0.005
  batchSize
      Batch size, by default 8
  dropout
      Dropout coefficient, by default 0.5
  graphFolder
      Folder path that contain external graph files
  configProtoBytes
      ConfigProto from tensorflow, serialized into byte array.
  useContrib
      whether to use contrib LSTM Cells. Not compatible with Windows. Might
      slightly improve accuracy
  validationSplit
      Choose the proportion of training dataset to be validated against the
      model on each Epoch. The value should be between 0.0 and 1.0 and by
      default it is 0.0 and off, by default 0.0
  evaluationLogExtended
      Whether logs for validation to be extended, by default False.
  testDataset
      Path to a parquet file of a test dataset. If set, it is used to calculate
      statistics on it during training.
  includeConfidence
      whether to include confidence scores in annotation metadata, by default
      False
  includeAllConfidenceScores
      whether to include all confidence scores in annotation metadata or just
      the score of the predicted tag, by default False
  enableOutputLogs
      Whether to use stdout in addition to Spark logs, by default False
  outputLogsPath
      Folder path to save training logs
  enableMemoryOptimizer
      Whether to optimize for large datasets or not. Enabling this option can
      slow down training, by default False
  useBestModel
      Whether to restore and use the model that has achieved the best performance
      at the end of the training.
  bestModelMetric
      Whether to check F1 Micro-average or F1 Macro-average as a final metric for the best model
  
  Examples
  --------
  >>> import sparknlp
  >>> from sparknlp.base import *
  >>> from sparknlp.annotator import *
  >>> from sparknlp.training import *
  >>> from pyspark.ml import Pipeline
  
  This CoNLL dataset already includes a sentence, token and label
  column with their respective annotator types. If a custom dataset is used,
  these need to be defined with for example:
  
  >>> documentAssembler = DocumentAssembler() \
  ...     .setInputCol("text") \
  ...     .setOutputCol("document")
  >>> sentence = SentenceDetector() \
  ...     .setInputCols(["document"]) \
  ...     .setOutputCol("sentence")
  >>> tokenizer = Tokenizer() \
  ...     .setInputCols(["sentence"]) \
  ...     .setOutputCol("token")
  
  Then the training can start
  
  >>> embeddings = BertEmbeddings.pretrained() \
  ...     .setInputCols(["sentence", "token"]) \
  ...     .setOutputCol("embeddings")
  >>> nerTagger = NerDLApproach() \
  ...     .setInputCols(["sentence", "token", "embeddings"]) \
  ...     .setLabelColumn("label") \
  ...     .setOutputCol("ner") \
  ...     .setMaxEpochs(1) \
  ...     .setRandomSeed(0) \
  ...     .setVerbose(0)
  >>> pipeline = Pipeline().setStages([
  ...     embeddings,
  ...     nerTagger
  ... ])
  
  We use the sentences, tokens, and labels from the CoNLL dataset.
  
  >>> conll = CoNLL()
  >>> trainingData = conll.readDataset(spark, "src/test/resources/conll2003/eng.train")
  >>> pipelineModel = pipeline.fit(trainingData)
  
  See Also
  --------
  NerCrfApproach : for a generic CRF approach
  NerConverter : to further process the results
code: def __init__(self):
      super(NerDLApproach, self).__init__(
          classname="com.johnsnowlabs.nlp.annotators.ner.dl.NerDLApproach"
      )
      uc = False if sys.platform == "win32" else True
      self._setDefault(
          minEpochs=0,
          maxEpochs=50,
          lr=float(0.001),
          po=float(0.005),
          batchSize=8,
          dropout=float(0.5),
          verbose=2,
          useContrib=uc,
          validationSplit=float(0.0),
          evaluationLogExtended=False,
          includeConfidence=False,
          includeAllConfidenceScores=False,
          enableOutputLogs=False,
          enableMemoryOptimizer=False,
          useBestModel=False,
          bestModelMetric="f1_micro",
      )
  
imports: import sys
  from sparknlp.annotator.param import EvaluationDLParams
  from sparknlp.common import *
  from sparknlp.annotator.ner.ner_approach import NerApproach
label_desc: Use image node_id 14 to create a new NerDLApproach object from inherited base classes: AnnotatorApproach, NerApproach, EvaluationDLParams with example: obj = NerDLApproach()