class_docstr: Symmetric Delete spelling correction algorithm.
  
  The Symmetric Delete spelling correction algorithm reduces the complexity of
  edit candidate generation and dictionary lookup for a given
  Damerau-Levenshtein distance. It is six orders of magnitude faster (than the
  standard approach with deletes + transposes + replaces + inserts) and
  language independent.
  
  Pretrained models can be loaded with :meth:`.pretrained` of the companion
  object:
  
  >>> spell = SymmetricDeleteModel.pretrained() \
  ...     .setInputCols(["token"]) \
  ...     .setOutputCol("spell")
  
  
  The default model is ``"spellcheck_sd"``, if no name is provided. For
  available pretrained models please see the `Models Hub
  <https://sparknlp.org/models?task=Spell+Check>`__.
  
  ====================== ======================
  Input Annotation types Output Annotation type
  ====================== ======================
  ``TOKEN``              ``TOKEN``
  ====================== ======================
  
  Parameters
  ----------
  None
  
  References
  ----------
  Inspired by `SymSpell <https://github.com/wolfgarbe/SymSpell>`__.
  
  Examples
  --------
  >>> import sparknlp
  >>> from sparknlp.base import *
  >>> from sparknlp.annotator import *
  >>> from pyspark.ml import Pipeline
  >>> documentAssembler = DocumentAssembler() \
  ...     .setInputCol("text") \
  ...     .setOutputCol("document")
  >>> tokenizer = Tokenizer() \
  ...     .setInputCols(["document"]) \
  ...     .setOutputCol("token")
  >>> spellChecker = SymmetricDeleteModel.pretrained() \
  ...     .setInputCols(["token"]) \
  ...     .setOutputCol("spell")
  >>> pipeline = Pipeline().setStages([
  ...     documentAssembler,
  ...     tokenizer,
  ...     spellChecker
  ... ])
  >>> data = spark.createDataFrame([["spmetimes i wrrite wordz erong."]]).toDF("text")
  >>> result = pipeline.fit(data).transform(data)
  >>> result.select("spell.result").show(truncate=False)
  +--------------------------------------+
  |result                                |
  +--------------------------------------+
  |[sometimes, i, write, words, wrong, .]|
  +--------------------------------------+
  
  See Also
  --------
  NorvigSweetingModel : for an alternative approach to spell checking
  ContextSpellCheckerModel : for a DL based approach
class_docstr_tok: ["Symmetric","Delete","spelling","correction","algorithm",".","The","Symmetric","Delete","spelling","correction","algorithm","reduces","the","complexity","of","edit","candidate","generation","and","dictionary","lookup","for","a","given","Damerau-Levenshtein","distance",".","It","is","six","orders","of","magnitude","faster","(","than","the","standard","approach","with","deletes","+","transposes","+","replaces","+","inserts",")","and","language","independent",".","Pretrained","models","can","be","loaded","with",":","meth",":","`",".pretrained","`","of","the","companion","object",":",">",">",">","spell","=","SymmetricDeleteModel.pretrained","(",")","\\","...",".setInputCols","(","[","``","token","''","]",")","\\","...",".setOutputCol","(","``","spell","''",")","The","default","model","is","``","``","spellcheck_sd","''","``",",","if","no","name","is","provided",".","For","available","pretrained","models","please","see","the","`","Models","Hub","<","https",":","\/\/sparknlp.org\/models","?","task=Spell+Check",">","`","__",".","======================","======================","Input","Annotation","types","Output","Annotation","type","======================","======================","``","TOKEN","``","``","TOKEN","``","======================","======================","Parameters","--","--","--","--","--","None","References","--","--","--","--","--","Inspired","by","`","SymSpell","<","https",":","\/\/github.com\/wolfgarbe\/SymSpell",">","`","__",".","Examples","--","--","--","--",">",">",">","import","sparknlp",">",">",">","from","sparknlp.base","import","*",">",">",">","from","sparknlp.annotator","import","*",">",">",">","from","pyspark.ml","import","Pipeline",">",">",">","documentAssembler","=","DocumentAssembler","(",")","\\","...",".setInputCol","(","``","text","''",")","\\","...",".setOutputCol","(","``","document","''",")",">",">",">","tokenizer","=","Tokenizer","(",")","\\","...",".setInputCols","(","[","``","document","''","]",")","\\","...",".setOutputCol","(","``","token","''",")",">",">",">","spellChecker","=","SymmetricDeleteModel.pretrained","(",")","\\","...",".setInputCols","(","[","``","token","''","]",")","\\","...",".setOutputCol","(","``","spell","''",")",">",">",">","pipeline","=","Pipeline","(",")",".setStages","(","[","...","documentAssembler",",","...","tokenizer",",","...","spellChecker","...","]",")",">",">",">","data","=","spark.createDataFrame","(","[","[","``","spmetimes","i","wrrite","wordz","erong",".","``","]","]",")",".toDF","(","``","text","''",")",">",">",">","result","=","pipeline.fit","(","data",")",".transform","(","data",")",">",">",">","result.select","(","``","spell.result","''",")",".show","(","truncate=False",")","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","|result","|","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","|","[","sometimes",",","i",",","write",",","words",",","wrong",",",".","]","|","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","See","Also","--","--","--","--","NorvigSweetingModel",":","for","an","alternative","approach","to","spell","checking","ContextSpellCheckerModel",":","for","a","DL","based","approach"]
docstr: Downloads and loads a pretrained model.
  
  Parameters
  ----------
  name : str, optional
      Name of the pretrained model, by default "spellcheck_sd"
  lang : str, optional
      Language of the pretrained model, by default "en"
  remote_loc : str, optional
      Optional remote address of the resource, by default None. Will use
      Spark NLPs repositories otherwise.
  
  Returns
  -------
  SymmetricDeleteModel
      The restored model
docstr_tok: ["Downloads","and","loads","a","pretrained","model",".","Parameters","--","--","--","--","--","name",":","str",",","optional","Name","of","the","pretrained","model",",","by","default","``","spellcheck_sd","''","lang",":","str",",","optional","Language","of","the","pretrained","model",",","by","default","``","en","''","remote_loc",":","str",",","optional","Optional","remote","address","of","the","resource",",","by","default","None",".","Will","use","Spark","NLPs","repositories","otherwise",".","Returns","--","--","--","-","SymmetricDeleteModel","The","restored","model"]
code: def pretrained(name="spellcheck_sd", lang="en", remote_loc=None):
      """Downloads and loads a pretrained model.
  
      Parameters
      ----------
      name : str, optional
          Name of the pretrained model, by default "spellcheck_sd"
      lang : str, optional
          Language of the pretrained model, by default "en"
      remote_loc : str, optional
          Optional remote address of the resource, by default None. Will use
          Spark NLPs repositories otherwise.
  
      Returns
      -------
      SymmetricDeleteModel
          The restored model
      """
      from sparknlp.pretrained import ResourceDownloader
  
      return ResourceDownloader.downloadModel(
          SymmetricDeleteModel, name, lang, remote_loc
      )
  
file_path: spark-nlp/python/sparknlp/annotator/spell_check/symmetric_delete.py
imports: from sparknlp.common import *
label_desc: Use image node_id 2 for calling the SymmetricDeleteModel obj's underlying member method code with example usage: obj.pretrained(name, lang, remote_loc) and returns: ResourceDownloader