title: Spelling mistakes - Pyenchant
body: <p>I tried using python library for spell-check,correcting and replacing.</p>
  
  <p>For some complex spelling correction, I need to have a second opinion and to see replaced word underlined or strike through.</p>
  
  <p>Even if the file output is in rtf format, it is ok. How to solve it?</p>
  
  <p>Efforts so far.</p>
  
  <pre><code>import enchant
      from enchant.checker import SpellChecker
      chkr = SpellChecker("en_UK","en_US")
      spacedfile = "This is a setence. It has speeelinng mistake."
      chkr.set_text(spacedfile)
      for err in chkr:
          sug = err.suggest()[0]
          err.replace(sug)
      Spellchecked = chkr.get_text()
      print Spellchecked
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>This is a sentence. It has spelling mistake.
  </code></pre>
  
  <p>Expected outcome:</p>
  
  <pre><code>This is a **sntence** sentence. It has **speeelinng** spelling mistake."
  </code></pre>