Python – Spelling checker using Enchant
Enchant is a module in Python, which is used to check the spelling of a word, gives suggestions to correct words. Also, gives antonym and synonym of words. It checks whether a word exists in the dictionary or not.
Enchant can also be used to check the spelling of words. The check() method returns True if the passed word is present in the language dictionary, else it returns False. This functionality of the check() method can be used to spell check words.
The suggest() method is used to suggest the correct spelling of the incorrectly spelled word.
The misspelled words are : ['cmputr', 'watr', 'wrte'] Suggestion for cmputr : ['computer'] Suggestion for watr : ['wart', 'watt', 'wat', 'war', 'water', 'wat r'] Suggestion for wrte : ['rte', 'write', 'wrote', 'wert', 'wite', 'w rte']
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course