class_docstr: Trains a Symmetric Delete spelling correction algorithm. Retrieves tokens
  and utilizes distance metrics to compute possible derived words.
  
  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.
  
  A dictionary of correct spellings must be provided with :meth:`.setDictionary` in
  the form of a text file, where each word is parsed by a regex pattern.
  
  For instantiated/pretrained models, see :class:`.SymmetricDeleteModel`.
  
  ====================== ======================
  Input Annotation types Output Annotation type
  ====================== ======================
  ``TOKEN``              ``TOKEN``
  ====================== ======================
  
  Parameters
  ----------
  dictionary
      folder or file with text that teaches about the language
  maxEditDistance
      max edit distance characters to derive strings from a word, by default 3
  frequencyThreshold
      minimum frequency of words to be considered from training, by default 0
  deletesThreshold
      minimum frequency of corrections a word needs to have to be considered
      from training, by default 0
  
  References
  ----------
  Inspired by `SymSpell <https://github.com/wolfgarbe/SymSpell>`__.
  
  Examples
  --------
  In this example, the dictionary ``"words.txt"`` has the form of::
  
      ...
      gummy
      gummic
      gummier
      gummiest
      gummiferous
      ...
  
  This dictionary is then set to be the basis of the spell checker.
  
  >>> 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 = SymmetricDeleteApproach() \
  ...     .setInputCols(["token"]) \
  ...     .setOutputCol("spell") \
  ...     .setDictionary("src/test/resources/spell/words.txt")
  >>> pipeline = Pipeline().setStages([
  ...     documentAssembler,
  ...     tokenizer,
  ...     spellChecker
  ... ])
  >>> pipelineModel = pipeline.fit(trainingData)
  
  See Also
  --------
  NorvigSweetingApproach : for an alternative approach to spell checking
  ContextSpellCheckerApproach : for a DL based approach
class_docstr_tok: ["Trains","a","Symmetric","Delete","spelling","correction","algorithm",".","Retrieves","tokens","and","utilizes","distance","metrics","to","compute","possible","derived","words",".","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",".","A","dictionary","of","correct","spellings","must","be","provided","with",":","meth",":","`",".setDictionary","`","in","the","form","of","a","text","file",",","where","each","word","is","parsed","by","a","regex","pattern",".","For","instantiated\/pretrained","models",",","see",":","class",":","`",".SymmetricDeleteModel","`",".","======================","======================","Input","Annotation","types","Output","Annotation","type","======================","======================","``","TOKEN","``","``","TOKEN","``","======================","======================","Parameters","--","--","--","--","--","dictionary","folder","or","file","with","text","that","teaches","about","the","language","maxEditDistance","max","edit","distance","characters","to","derive","strings","from","a","word",",","by","default","3","frequencyThreshold","minimum","frequency","of","words","to","be","considered","from","training",",","by","default","0","deletesThreshold","minimum","frequency","of","corrections","a","word","needs","to","have","to","be","considered","from","training",",","by","default","0","References","--","--","--","--","--","Inspired","by","`","SymSpell","<","https",":","\/\/github.com\/wolfgarbe\/SymSpell",">","`","__",".","Examples","--","--","--","--","In","this","example",",","the","dictionary","``","``","words.txt","''","``","has","the","form","of",":",":","...","gummy","gummic","gummier","gummiest","gummiferous","...","This","dictionary","is","then","set","to","be","the","basis","of","the","spell","checker",".",">",">",">","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","=","SymmetricDeleteApproach","(",")","\\","...",".setInputCols","(","[","``","token","''","]",")","\\","...",".setOutputCol","(","``","spell","''",")","\\","...",".setDictionary","(","``","src\/test\/resources\/spell\/words.txt","''",")",">",">",">","pipeline","=","Pipeline","(",")",".setStages","(","[","...","documentAssembler",",","...","tokenizer",",","...","spellChecker","...","]",")",">",">",">","pipelineModel","=","pipeline.fit","(","trainingData",")","See","Also","--","--","--","--","NorvigSweetingApproach",":","for","an","alternative","approach","to","spell","checking","ContextSpellCheckerApproach",":","for","a","DL","based","approach"]
code: def _create_model(self, java_model):
      return SymmetricDeleteModel(java_model=java_model)
  
file_path: spark-nlp/python/sparknlp/annotator/spell_check/symmetric_delete.py
imports: from sparknlp.common import *
label_desc: Use image node_id 6 for calling the SymmetricDeleteApproach obj's underlying member method code with example usage: obj._create_model(java_model) and returns: SymmetricDeleteModel