import enchant
import wx
from enchant.checker import SpellChecker
from enchant.checker.wxSpellCheckerDialog import wxSpellCheckerDialog
from enchant.checker.CmdLineChecker import CmdLineChecker
a = "Ceci est un text avec beuacuop d'ereurs et pas snychro"
chkr = enchant.checker.SpellChecker("fr_FR")
chkr.set_text(a)
cmdln = CmdLineChecker()
cmdln.set_checker(chkr)
b = cmdln.run()
c = chkr.get_text() # returns corrected text
print c
How do I get c
to return the corrected text without using 0
manually from cmdlinechecker
?
The program should run through the string containing the uncorrected text, correct it, and save it in a variable to export into a MySQL DB.
Works exactly as I was intending to have it work. Add Filters and corrects all small text automatically enabling you to perform keyword searches etc...
Took me 13hrs to figure out ;(