Created
October 8, 2020 08:35
-
-
Save nikhilcheke/f277cd38bde0360952fa910f40918479 to your computer and use it in GitHub Desktop.
Sample spell corrector using pyspellchecker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from spellchecker import SpellChecker | |
spell = SpellChecker() | |
# find those words that may be misspelled | |
misspelled = spell.unknown(['this', 'is', 'pythen', 'code']) | |
for word in misspelled: | |
print("Misspelled word: "+word+"\nCorrected word: "+spell.correction(word)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment