class_docstr: Language Identification and Detection by using CNN and RNN architectures
  in TensorFlow.
  
  ``LanguageDetectorDL`` is an annotator that detects the language of
  documents or sentences depending on the inputCols. The models are trained on
  large datasets such as Wikipedia and Tatoeba. Depending on the language
  (how similar the characters are), the LanguageDetectorDL works best with
  text longer than 140 characters. The output is a language code in
  `Wiki Code style <https://en.wikipedia.org/wiki/List_of_Wikipedias>`__.
  
  Pretrained models can be loaded with :meth:`.pretrained` of the companion
  object:
  
  >>> languageDetector = LanguageDetectorDL.pretrained() \
  ...     .setInputCols(["sentence"]) \
  ...     .setOutputCol("language")
  
  The default model is ``"ld_wiki_tatoeba_cnn_21"``, default language is
  ``"xx"`` (meaning multi-lingual), if no values are provided.
  
  For available pretrained models please see the `Models Hub <https://sparknlp.org/models?task=Language+Detection>`__.
  
  For extended examples of usage, see the `Examples <https://github.com/JohnSnowLabs/spark-nlp/blob/master/examples/python/annotation/text/english/language-detection/Language_Detection_and_Indentification.ipynb>`__.
  
  ====================== ======================
  Input Annotation types Output Annotation type
  ====================== ======================
  ``DOCUMENT``           ``LANGUAGE``
  ====================== ======================
  
  Parameters
  ----------
  configProtoBytes
      ConfigProto from tensorflow, serialized into byte array.
  threshold
      The minimum threshold for the final result otheriwse it will be either
      neutral or the value set in thresholdLabel, by default 0.5
  thresholdLabel
      In case the score is less than threshold, what should be the label, by
      default Unknown
  coalesceSentences
      If sets to true the output of all sentences will be averaged to one
      output instead of one output per sentence, by default True.
  languages
     The languages used to trained the model
  
  Examples
  --------
  >>> import sparknlp
  >>> from sparknlp.base import *
  >>> from sparknlp.annotator import *
  >>> from pyspark.ml import Pipeline
  >>> documentAssembler = DocumentAssembler() \
  ...     .setInputCol("text") \
  ...     .setOutputCol("document")
  >>> languageDetector = LanguageDetectorDL.pretrained() \
  ...     .setInputCols("document") \
  ...     .setOutputCol("language")
  >>> pipeline = Pipeline() \
  ...     .setStages([
  ...       documentAssembler,
  ...       languageDetector
  ...     ])
  >>> data = spark.createDataFrame([
  ...     ["Spark NLP is an open-source text processing library for advanced natural language processing for the Python, Java and Scala programming languages."],
  ...     ["Spark NLP est une bibliothèque de traitement de texte open source pour le traitement avancé du langage naturel pour les langages de programmation Python, Java et Scala."],
  ...     ["Spark NLP ist eine Open-Source-Textverarbeitungsbibliothek für fortgeschrittene natürliche Sprachverarbeitung für die Programmiersprachen Python, Java und Scala."]
  ... ]).toDF("text")
  >>> result = pipeline.fit(data).transform(data)
  >>> result.select("language.result").show(truncate=False)
  +------+
  |result|
  +------+
  |[en]  |
  |[fr]  |
  |[de]  |
  +------+
class_docstr_tok: ["Language","Identification","and","Detection","by","using","CNN","and","RNN","architectures","in","TensorFlow",".","``","LanguageDetectorDL","``","is","an","annotator","that","detects","the","language","of","documents","or","sentences","depending","on","the","inputCols",".","The","models","are","trained","on","large","datasets","such","as","Wikipedia","and","Tatoeba",".","Depending","on","the","language","(","how","similar","the","characters","are",")",",","the","LanguageDetectorDL","works","best","with","text","longer","than","140","characters",".","The","output","is","a","language","code","in","`","Wiki","Code","style","<","https",":","\/\/en.wikipedia.org\/wiki\/List_of_Wikipedias",">","`","__",".","Pretrained","models","can","be","loaded","with",":","meth",":","`",".pretrained","`","of","the","companion","object",":",">",">",">","languageDetector","=","LanguageDetectorDL.pretrained","(",")","\\","...",".setInputCols","(","[","``","sentence","''","]",")","\\","...",".setOutputCol","(","``","language","''",")","The","default","model","is","``","``","ld_wiki_tatoeba_cnn_21","''","``",",","default","language","is","``","``","xx","''","``","(","meaning","multi-lingual",")",",","if","no","values","are","provided",".","For","available","pretrained","models","please","see","the","`","Models","Hub","<","https",":","\/\/sparknlp.org\/models","?","task=Language+Detection",">","`","__",".","For","extended","examples","of","usage",",","see","the","`","Examples","<","https",":","\/\/github.com\/JohnSnowLabs\/spark-nlp\/blob\/master\/examples\/python\/annotation\/text\/english\/language-detection\/Language_Detection_and_Indentification.ipynb",">","`","__",".","======================","======================","Input","Annotation","types","Output","Annotation","type","======================","======================","``","DOCUMENT","``","``","LANGUAGE","``","======================","======================","Parameters","--","--","--","--","--","configProtoBytes","ConfigProto","from","tensorflow",",","serialized","into","byte","array",".","threshold","The","minimum","threshold","for","the","final","result","otheriwse","it","will","be","either","neutral","or","the","value","set","in","thresholdLabel",",","by","default","0.5","thresholdLabel","In","case","the","score","is","less","than","threshold",",","what","should","be","the","label",",","by","default","Unknown","coalesceSentences","If","sets","to","true","the","output","of","all","sentences","will","be","averaged","to","one","output","instead","of","one","output","per","sentence",",","by","default","True",".","languages","The","languages","used","to","trained","the","model","Examples","--","--","--","--",">",">",">","import","sparknlp",">",">",">","from","sparknlp.base","import","*",">",">",">","from","sparknlp.annotator","import","*",">",">",">","from","pyspark.ml","import","Pipeline",">",">",">","documentAssembler","=","DocumentAssembler","(",")","\\","...",".setInputCol","(","``","text","''",")","\\","...",".setOutputCol","(","``","document","''",")",">",">",">","languageDetector","=","LanguageDetectorDL.pretrained","(",")","\\","...",".setInputCols","(","``","document","''",")","\\","...",".setOutputCol","(","``","language","''",")",">",">",">","pipeline","=","Pipeline","(",")","\\","...",".setStages","(","[","...","documentAssembler",",","...","languageDetector","...","]",")",">",">",">","data","=","spark.createDataFrame","(","[","...","[","``","Spark","NLP","is","an","open-source","text","processing","library","for","advanced","natural","language","processing","for","the","Python",",","Java","and","Scala","programming","languages",".","``","]",",","...","[","``","Spark","NLP","est","une","biblioth\u00e8que","de","traitement","de","texte","open","source","pour","le","traitement","avanc\u00e9","du","langage","naturel","pour","les","langages","de","programmation","Python",",","Java","et","Scala",".","``","]",",","...","[","``","Spark","NLP","ist","eine","Open-Source-Textverarbeitungsbibliothek","f\u00fcr","fortgeschrittene","nat\u00fcrliche","Sprachverarbeitung","f\u00fcr","die","Programmiersprachen","Python",",","Java","und","Scala",".","''","]","...","]",")",".toDF","(","``","text","''",")",">",">",">","result","=","pipeline.fit","(","data",")",".transform","(","data",")",">",">",">","result.select","(","``","language.result","''",")",".show","(","truncate=False",")","+","--","--","--","+","|result|","+","--","--","--","+","|","[","en","]","|","|","[","fr","]","|","|","[","de","]","|","+","--","--","--","+"]
docstr: Sets configProto from tensorflow, serialized into byte array.
  
  Parameters
  ----------
  b : List[int]
      ConfigProto from tensorflow, serialized into byte array
docstr_tok: ["Sets","configProto","from","tensorflow",",","serialized","into","byte","array",".","Parameters","--","--","--","--","--","b",":","List","[","int","]","ConfigProto","from","tensorflow",",","serialized","into","byte","array"]
code: def setConfigProtoBytes(self, b):
      """Sets configProto from tensorflow, serialized into byte array.
  
      Parameters
      ----------
      b : List[int]
          ConfigProto from tensorflow, serialized into byte array
      """
      return self._set(configProtoBytes=b)
  
file_path: spark-nlp/python/sparknlp/annotator/ld_dl/language_detector_dl.py
imports: from sparknlp.common import *
label_desc: Use image node_id 2 for calling the LanguageDetectorDL obj's underlying member method code with example usage: obj.setConfigProtoBytes(b) and returns: self