class_docstr: ClassifierDL for generic Multi-class Text Classification.
  
  ClassifierDL uses the state-of-the-art Universal Sentence Encoder as an
  input for text classifications. The ClassifierDL annotator uses a deep
  learning model (DNNs) we have built inside TensorFlow and supports up to
  100 classes.
  
  This is the instantiated model of the :class:`.ClassifierDLApproach`.
  For training your own model, please see the documentation of that class.
  
  Pretrained models can be loaded with :meth:`.pretrained` of the companion
  object:
  
  >>> classifierDL = ClassifierDLModel.pretrained() \
  ...     .setInputCols(["sentence_embeddings"]) \
  ...     .setOutputCol("classification")
  
  The default model is ``"classifierdl_use_trec6"``, if no name is provided.
  It uses embeddings from the UniversalSentenceEncoder and is trained on the
  `TREC-6 <https://deepai.org/dataset/trec-6#:~:text=The%20TREC%20dataset%20is%20dataset,50%20has%20finer%2Dgrained%20labels>`__
  dataset.
  
  For available pretrained models please see the
  `Models Hub <https://sparknlp.org/models?task=Text+Classification>`__.
  
  For extended examples of usage, see the
  `Examples <https://github.com/JohnSnowLabs/spark-nlp/blob/master/examples/python/training/english/classification/ClassifierDL_Train_multi_class_news_category_classifier.ipynb>`__.
  
  ======================= ======================
  Input Annotation types  Output Annotation type
  ======================= ======================
  ``SENTENCE_EMBEDDINGS`` ``CATEGORY``
  ======================= ======================
  
  Parameters
  ----------
  configProtoBytes
      ConfigProto from tensorflow, serialized into byte array.
  classes
      Get the tags used to trained this ClassifierDLModel
  
  Examples
  --------
  >>> import sparknlp
  >>> from sparknlp.base import *
  >>> from sparknlp.annotator import *
  >>> from pyspark.ml import Pipeline
  >>> documentAssembler = DocumentAssembler() \
  ...     .setInputCol("text") \
  ...     .setOutputCol("document")
  >>> sentence = SentenceDetector() \
  ...     .setInputCols("document") \
  ...     .setOutputCol("sentence")
  >>> useEmbeddings = UniversalSentenceEncoder.pretrained() \
  ...     .setInputCols("document") \
  ...     .setOutputCol("sentence_embeddings")
  >>> sarcasmDL = ClassifierDLModel.pretrained("classifierdl_use_sarcasm") \
  ...     .setInputCols("sentence_embeddings") \
  ...     .setOutputCol("sarcasm")
  >>> pipeline = Pipeline() \
  ...     .setStages([
  ...       documentAssembler,
  ...       sentence,
  ...       useEmbeddings,
  ...       sarcasmDL
  ...     ])
  >>> data = spark.createDataFrame([
  ...     ["I'm ready!"],
  ...     ["If I could put into words how much I love waking up at 6 am on Mondays I would."]
  ... ]).toDF("text")
  >>> result = pipeline.fit(data).transform(data)
  >>> result.selectExpr("explode(arrays_zip(sentence, sarcasm)) as out") \
  ...     .selectExpr("out.sentence.result as sentence", "out.sarcasm.result as sarcasm") \
  ...     .show(truncate=False)
  +-------------------------------------------------------------------------------+-------+
  |sentence                                                                       |sarcasm|
  +-------------------------------------------------------------------------------+-------+
  |I'm ready!                                                                     |normal |
  |If I could put into words how much I love waking up at 6 am on Mondays I would.|sarcasm|
  +-------------------------------------------------------------------------------+-------+
  
  See Also
  --------
  MultiClassifierDLModel : for multi-class classification
  SentimentDLModel : for sentiment analysis
class_docstr_tok: ["ClassifierDL","for","generic","Multi-class","Text","Classification",".","ClassifierDL","uses","the","state-of-the-art","Universal","Sentence","Encoder","as","an","input","for","text","classifications",".","The","ClassifierDL","annotator","uses","a","deep","learning","model","(","DNNs",")","we","have","built","inside","TensorFlow","and","supports","up","to","100","classes",".","This","is","the","instantiated","model","of","the",":","class",":","`",".ClassifierDLApproach","`",".","For","training","your","own","model",",","please","see","the","documentation","of","that","class",".","Pretrained","models","can","be","loaded","with",":","meth",":","`",".pretrained","`","of","the","companion","object",":",">",">",">","classifierDL","=","ClassifierDLModel.pretrained","(",")","\\","...",".setInputCols","(","[","``","sentence_embeddings","''","]",")","\\","...",".setOutputCol","(","``","classification","''",")","The","default","model","is","``","``","classifierdl_use_trec6","''","``",",","if","no","name","is","provided",".","It","uses","embeddings","from","the","UniversalSentenceEncoder","and","is","trained","on","the","`","TREC-6","<","https",":","\/\/deepai.org\/dataset\/trec-6","#",":","~",":","text=The","%","20TREC","%","20dataset","%","20is","%","20dataset,50","%","20has","%","20finer","%","2Dgrained","%","20labels",">","`","__","dataset",".","For","available","pretrained","models","please","see","the","`","Models","Hub","<","https",":","\/\/sparknlp.org\/models","?","task=Text+Classification",">","`","__",".","For","extended","examples","of","usage",",","see","the","`","Examples","<","https",":","\/\/github.com\/JohnSnowLabs\/spark-nlp\/blob\/master\/examples\/python\/training\/english\/classification\/ClassifierDL_Train_multi_class_news_category_classifier.ipynb",">","`","__",".","=======================","======================","Input","Annotation","types","Output","Annotation","type","=======================","======================","``","SENTENCE_EMBEDDINGS","``","``","CATEGORY","``","=======================","======================","Parameters","--","--","--","--","--","configProtoBytes","ConfigProto","from","tensorflow",",","serialized","into","byte","array",".","classes","Get","the","tags","used","to","trained","this","ClassifierDLModel","Examples","--","--","--","--",">",">",">","import","sparknlp",">",">",">","from","sparknlp.base","import","*",">",">",">","from","sparknlp.annotator","import","*",">",">",">","from","pyspark.ml","import","Pipeline",">",">",">","documentAssembler","=","DocumentAssembler","(",")","\\","...",".setInputCol","(","``","text","''",")","\\","...",".setOutputCol","(","``","document","''",")",">",">",">","sentence","=","SentenceDetector","(",")","\\","...",".setInputCols","(","``","document","''",")","\\","...",".setOutputCol","(","``","sentence","''",")",">",">",">","useEmbeddings","=","UniversalSentenceEncoder.pretrained","(",")","\\","...",".setInputCols","(","``","document","''",")","\\","...",".setOutputCol","(","``","sentence_embeddings","''",")",">",">",">","sarcasmDL","=","ClassifierDLModel.pretrained","(","``","classifierdl_use_sarcasm","''",")","\\","...",".setInputCols","(","``","sentence_embeddings","''",")","\\","...",".setOutputCol","(","``","sarcasm","''",")",">",">",">","pipeline","=","Pipeline","(",")","\\","...",".setStages","(","[","...","documentAssembler",",","...","sentence",",","...","useEmbeddings",",","...","sarcasmDL","...","]",")",">",">",">","data","=","spark.createDataFrame","(","[","...","[","``","I","'m","ready","!","``","]",",","...","[","``","If","I","could","put","into","words","how","much","I","love","waking","up","at","6","am","on","Mondays","I","would",".","''","]","...","]",")",".toDF","(","``","text","''",")",">",">",">","result","=","pipeline.fit","(","data",")",".transform","(","data",")",">",">",">","result.selectExpr","(","``","explode","(","arrays_zip","(","sentence",",","sarcasm",")",")","as","out","''",")","\\","...",".selectExpr","(","``","out.sentence.result","as","sentence","''",",","``","out.sarcasm.result","as","sarcasm","''",")","\\","...",".show","(","truncate=False",")","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","-+","|sentence","|sarcasm|","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","-+","|I","'m","ready","!","|normal","|","|If","I","could","put","into","words","how","much","I","love","waking","up","at","6","am","on","Mondays","I","would.|sarcasm|","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","-+","--","--","--","-+","See","Also","--","--","--","--","MultiClassifierDLModel",":","for","multi-class","classification","SentimentDLModel",":","for","sentiment","analysis"]
code: def __init__(
      self,
      classname="com.johnsnowlabs.nlp.annotators.classifier.dl.ClassifierDLModel",
      java_model=None,
  ):
      super(ClassifierDLModel, self).__init__(
          classname=classname, java_model=java_model
      )
  
file_path: spark-nlp/python/sparknlp/annotator/classifier_dl/classifier_dl.py
imports: from sparknlp.annotator.param import EvaluationDLParams, ClassifierEncoder
  from sparknlp.base import DocumentAssembler
  from sparknlp.common import *
label_desc: Use image node_id 1 to create a new ClassifierDLModel object from inherited base classes: AnnotatorModel, HasStorageRef, HasEngine with example: obj = ClassifierDLModel(classname, java_model)