How to correct text and return the corrected text automatically with PyEnchant

后端 未结 3 447
忘了有多久
忘了有多久 2021-01-13 10:20
import enchant
import wx
from enchant.checker import SpellChecker
from enchant.checker.wxSpellCheckerDialog import wxSpellCheckerDialog
from enchant.checker.CmdLineC         


        
3条回答
  •  -上瘾入骨i
    2021-01-13 10:48

    Actually I am not familiar with python and the libraries you describe but the general approach to correct text is using a dictionary approach. This means in other words, that you check if a word is included in a French dictionary (or a list of French words) and if it is the case, the word is correct, otherwise use the word from the dictionary.

提交回复
热议问题