class_docstr: SentimentDL, an annotator for multi-class sentiment analysis.
  
  In natural language processing, sentiment analysis is the task of
  classifying the affective state or subjective view of a text. A common
  example is if either a product review or tweet can be interpreted positively
  or negatively.
  
  This is the instantiated model of the :class:`.SentimentDLApproach`. For
  training your own model, please see the documentation of that class.
  
  Pretrained models can be loaded with :meth:`.pretrained` of the companion
  object:
  
  >>> sentiment = SentimentDLModel.pretrained() \
  ...     .setInputCols(["sentence_embeddings"]) \
  ...     .setOutputCol("sentiment")
  
  
  The default model is ``"sentimentdl_use_imdb"``, if no name is provided. It
  is english sentiment analysis trained on the IMDB dataset. For available
  pretrained models please see the `Models Hub
  <https://sparknlp.org/models?task=Sentiment+Analysis>`__.
  
  For extended examples of usage, see the `Examples
  <https://github.com/JohnSnowLabs/spark-nlp/blob/master/examples/python/training/english/classification/SentimentDL_train_multiclass_sentiment_classifier.ipynb>`__.
  
  ======================= ======================
  Input Annotation types  Output Annotation type
  ======================= ======================
  ``SENTENCE_EMBEDDINGS`` ``CATEGORY``
  ======================= ======================
  
  Parameters
  ----------
  configProtoBytes
      ConfigProto from tensorflow, serialized into byte array.
  threshold
      The minimum threshold for the final result otheriwse it will be neutral,
      by default 0.6
  thresholdLabel
      In case the score is less than threshold, what should be the label.
      Default is neutral, by default "neutral"
  classes
      Tags used to trained this SentimentDLModel
  
  Examples
  --------
  >>> import sparknlp
  >>> from sparknlp.base import *
  >>> from sparknlp.annotator import *
  >>> from pyspark.ml import Pipeline
  >>> documentAssembler = DocumentAssembler() \
  ...     .setInputCol("text") \
  ...     .setOutputCol("document")
  >>> useEmbeddings = UniversalSentenceEncoder.pretrained() \
  ...     .setInputCols(["document"]) \
  ...     .setOutputCol("sentence_embeddings")
  >>> sentiment = SentimentDLModel.pretrained("sentimentdl_use_twitter") \
  ...     .setInputCols(["sentence_embeddings"]) \
  ...     .setThreshold(0.7) \
  ...     .setOutputCol("sentiment")
  >>> pipeline = Pipeline().setStages([
  ...     documentAssembler,
  ...     useEmbeddings,
  ...     sentiment
  ... ])
  >>> data = spark.createDataFrame([
  ...     ["Wow, the new video is awesome!"],
  ...     ["bruh what a damn waste of time"]
  ... ]).toDF("text")
  >>> result = pipeline.fit(data).transform(data)
  >>> result.select("text", "sentiment.result").show(truncate=False)
  +------------------------------+----------+
  |text                          |result    |
  +------------------------------+----------+
  |Wow, the new video is awesome!|[positive]|
  |bruh what a damn waste of time|[negative]|
  +------------------------------+----------+
class_docstr_tok: ["SentimentDL",",","an","annotator","for","multi-class","sentiment","analysis",".","In","natural","language","processing",",","sentiment","analysis","is","the","task","of","classifying","the","affective","state","or","subjective","view","of","a","text",".","A","common","example","is","if","either","a","product","review","or","tweet","can","be","interpreted","positively","or","negatively",".","This","is","the","instantiated","model","of","the",":","class",":","`",".SentimentDLApproach","`",".","For","training","your","own","model",",","please","see","the","documentation","of","that","class",".","Pretrained","models","can","be","loaded","with",":","meth",":","`",".pretrained","`","of","the","companion","object",":",">",">",">","sentiment","=","SentimentDLModel.pretrained","(",")","\\","...",".setInputCols","(","[","``","sentence_embeddings","''","]",")","\\","...",".setOutputCol","(","``","sentiment","''",")","The","default","model","is","``","``","sentimentdl_use_imdb","''","``",",","if","no","name","is","provided",".","It","is","english","sentiment","analysis","trained","on","the","IMDB","dataset",".","For","available","pretrained","models","please","see","the","`","Models","Hub","<","https",":","\/\/sparknlp.org\/models","?","task=Sentiment+Analysis",">","`","__",".","For","extended","examples","of","usage",",","see","the","`","Examples","<","https",":","\/\/github.com\/JohnSnowLabs\/spark-nlp\/blob\/master\/examples\/python\/training\/english\/classification\/SentimentDL_train_multiclass_sentiment_classifier.ipynb",">","`","__",".","=======================","======================","Input","Annotation","types","Output","Annotation","type","=======================","======================","``","SENTENCE_EMBEDDINGS","``","``","CATEGORY","``","=======================","======================","Parameters","--","--","--","--","--","configProtoBytes","ConfigProto","from","tensorflow",",","serialized","into","byte","array",".","threshold","The","minimum","threshold","for","the","final","result","otheriwse","it","will","be","neutral",",","by","default","0.6","thresholdLabel","In","case","the","score","is","less","than","threshold",",","what","should","be","the","label",".","Default","is","neutral",",","by","default","``","neutral","''","classes","Tags","used","to","trained","this","SentimentDLModel","Examples","--","--","--","--",">",">",">","import","sparknlp",">",">",">","from","sparknlp.base","import","*",">",">",">","from","sparknlp.annotator","import","*",">",">",">","from","pyspark.ml","import","Pipeline",">",">",">","documentAssembler","=","DocumentAssembler","(",")","\\","...",".setInputCol","(","``","text","''",")","\\","...",".setOutputCol","(","``","document","''",")",">",">",">","useEmbeddings","=","UniversalSentenceEncoder.pretrained","(",")","\\","...",".setInputCols","(","[","``","document","''","]",")","\\","...",".setOutputCol","(","``","sentence_embeddings","''",")",">",">",">","sentiment","=","SentimentDLModel.pretrained","(","``","sentimentdl_use_twitter","''",")","\\","...",".setInputCols","(","[","``","sentence_embeddings","''","]",")","\\","...",".setThreshold","(","0.7",")","\\","...",".setOutputCol","(","``","sentiment","''",")",">",">",">","pipeline","=","Pipeline","(",")",".setStages","(","[","...","documentAssembler",",","...","useEmbeddings",",","...","sentiment","...","]",")",">",">",">","data","=","spark.createDataFrame","(","[","...","[","``","Wow",",","the","new","video","is","awesome","!","``","]",",","...","[","``","bruh","what","a","damn","waste","of","time","''","]","...","]",")",".toDF","(","``","text","''",")",">",">",">","result","=","pipeline.fit","(","data",")",".transform","(","data",")",">",">",">","result.select","(","``","text","''",",","``","sentiment.result","''",")",".show","(","truncate=False",")","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","+","|text","|result","|","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","+","|Wow",",","the","new","video","is","awesome","!","|","[","positive","]","|","|bruh","what","a","damn","waste","of","time|","[","negative","]","|","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","+"]
docstr: Sets what the label should be, if the score is less than threshold,
  by default "neutral".
  
  Parameters
  ----------
  p : str
      The label, if the score is less than threshold
docstr_tok: ["Sets","what","the","label","should","be",",","if","the","score","is","less","than","threshold",",","by","default","``","neutral","''",".","Parameters","--","--","--","--","--","p",":","str","The","label",",","if","the","score","is","less","than","threshold"]
code: def setThresholdLabel(self, p):
      """Sets what the label should be, if the score is less than threshold,
      by default "neutral".
  
      Parameters
      ----------
      p : str
          The label, if the score is less than threshold
      """
      return self._set(thresholdLabel=p)
  
file_path: spark-nlp/python/sparknlp/annotator/classifier_dl/sentiment_dl.py
imports: from sparknlp.annotator.param import EvaluationDLParams, ClassifierEncoder
  from sparknlp.common import *
label_desc: Use image node_id 4 for calling the SentimentDLModel obj's underlying member method code with example usage: obj.setThresholdLabel(p) and returns: self