class_docstr: Trains an annotator that detects sentence boundaries using a deep
  learning approach.
  
  Currently, only the CNN model is supported for training, but in the future
  the architecture of the model can be set with :meth:`.setModel`.
  
  For pretrained models see :class:`.SentenceDetectorDLModel`.
  
  Each extracted sentence can be returned in an Array or exploded to separate
  rows, if ``explodeSentences`` is set to ``True``.
  
  ====================== ======================
  Input Annotation types Output Annotation type
  ====================== ======================
  ``DOCUMENT``           ``DOCUMENT``
  ====================== ======================
  
  Parameters
  ----------
  modelArchitecture
      Model architecture (CNN)
  impossiblePenultimates
      Impossible penultimates - list of strings which a sentence can't end
      with
  validationSplit
      Choose the proportion of training dataset to be validated against the
      model on each
  epochsNumber
      Number of epochs for the optimization process
  outputLogsPath
      Path to folder where logs will be saved. If no path is specified, no
      logs are generated
  explodeSentences
      Whether to explode each sentence into a different row, for better
      parallelization. Defaults to False.
  
  References
  ----------
  The default model ``"cnn"`` is based on the paper `Deep-EOS: General-Purpose
  Neural Networks for Sentence Boundary Detection (2020, Stefan Schweter,
  Sajawel Ahmed)
  <https://konvens.org/proceedings/2019/papers/KONVENS2019_paper_41.pdf>`__
  using a CNN architecture. We also modified the original implementation a
  little bit to cover broken sentences and some impossible end of line chars.
  
  Examples
  --------
  The training process needs data, where each data point is a sentence.
  In this example the ``train.txt`` file has the form of::
  
      ...
      Slightly more moderate language would make our present situation – namely the lack of progress – a little easier.
      His political successors now have great responsibilities to history and to the heritage of values bequeathed to them by Nelson Mandela.
      ...
  
  where each line is one sentence.
  
  Training can then be started like so:
  
  >>> import sparknlp
  >>> from sparknlp.base import *
  >>> from sparknlp.annotator import *
  >>> from pyspark.ml import Pipeline
  >>> trainingData = spark.read.text("train.txt").toDF("text")
  >>> documentAssembler = DocumentAssembler() \
  ...     .setInputCol("text") \
  ...     .setOutputCol("document")
  >>> sentenceDetector = SentenceDetectorDLApproach() \
  ...     .setInputCols(["document"]) \
  ...     .setOutputCol("sentences") \
  ...     .setEpochsNumber(100)
  >>> pipeline = Pipeline().setStages([documentAssembler, sentenceDetector])
  >>> model = pipeline.fit(trainingData)
code: def __init__(
      self,
      classname="com.johnsnowlabs.nlp.annotators.sentence_detector_dl.SentenceDetectorDLApproach",
  ):
      super(SentenceDetectorDLApproach, self).__init__(
          classname=classname
      )
  
imports: from sparknlp.common import *
label_desc: Use image node_id 8 to create a new SentenceDetectorDLApproach object from inherited base classes: AnnotatorApproach with example: obj = SentenceDetectorDLApproach(classname)