class_docstr: Trains annotator, that retrieves tokens and makes corrections automatically if
  not found in an English dictionary, based on the algorithm by Peter Norvig.
  
  The algorithm is based on a Bayesian approach to spell checking: Given the word we
  look in the provided dictionary to choose the word with the highest probability
  to be the correct one.
  
  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:`.NorvigSweetingModel`.
  
  ====================== ======================
  Input Annotation types Output Annotation type
  ====================== ======================
  ``TOKEN``              ``TOKEN``
  ====================== ======================
  
  Parameters
  ----------
  dictionary
      Dictionary needs 'tokenPattern' regex in dictionary for separating words
  caseSensitive
      Whether to ignore case sensitivity, by default False
  doubleVariants
      Whether to use more expensive spell checker, by default False
  
      Increase search at cost of performance. Enables extra check for word
      combinations.
  shortCircuit
      Whether to use faster mode, by default False
  
      Increase performance at cost of accuracy. Faster but less accurate.
  frequencyPriority
      Applies frequency over hamming in intersections, when false hamming
      takes priority, by default True
  wordSizeIgnore
      Minimum size of word before ignoring, by default 3
  dupsLimit
      Maximum duplicate of characters in a word to consider, by default 2
  reductLimit
      Word reductions limit, by default 3
  intersections
      Hamming intersections to attempt, by default 10
  vowelSwapLimit
      Vowel swap attempts, by default 6
  
  References
  ----------
  
  Inspired by the spell checker by Peter Norvig:
  `How to Write a Spelling Corrector <https://norvig.com/spell-correct.html>`__
  
  Examples
  --------
  >>> import sparknlp
  >>> from sparknlp.base import *
  >>> from sparknlp.annotator import *
  >>> from pyspark.ml import Pipeline
  
  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.
  
  >>> documentAssembler = DocumentAssembler() \
  ...     .setInputCol("text") \
  ...     .setOutputCol("document")
  >>> tokenizer = Tokenizer() \
  ...     .setInputCols(["document"]) \
  ...     .setOutputCol("token")
  >>> spellChecker = NorvigSweetingApproach() \
  ...     .setInputCols(["token"]) \
  ...     .setOutputCol("spell") \
  ...     .setDictionary("src/test/resources/spell/words.txt")
  >>> pipeline = Pipeline().setStages([
  ...     documentAssembler,
  ...     tokenizer,
  ...     spellChecker
  ... ])
  >>> pipelineModel = pipeline.fit(trainingData)
  
  See Also
  --------
  SymmetricDeleteApproach : for an alternative approach to spell checking
  ContextSpellCheckerApproach : for a DL based approach
docstr: Sets whether to ignore case sensitivity, by default False.
  
  Parameters
  ----------
  value : bool
      Whether to ignore case sensitivity
docstr_tok: ["Sets","whether","to","ignore","case","sensitivity",",","by","default","False",".","Parameters","--","--","--","--","--","value",":","bool","Whether","to","ignore","case","sensitivity"]
code: def setCaseSensitive(self, value):
      """Sets whether to ignore case sensitivity, by default False.
  
      Parameters
      ----------
      value : bool
          Whether to ignore case sensitivity
      """
      return self._set(caseSensitive=value)
  
file_path: spark-nlp/python/sparknlp/annotator/spell_check/norvig_sweeting.py
imports: from sparknlp.common import *
label_desc: Use image node_id 3 for calling the NorvigSweetingApproach obj's underlying member method code with example usage: obj.setCaseSensitive(value) and returns: self