Quickstart: Find and correct misspelled words
masterTo use pyspellchecker, import SpellChecker, identify misspelled words using .unknown(), and then retrieve corrections using .correction() or a list of possibilities using .candidates().
from spellchecker import SpellChecker
spell = SpellChecker()
# find those words that may be misspelled
misspelled = spell.unknown(['something', 'is', 'hapenning', 'here'])
for word in misspelled:
# Get the one `most likely` answer
print(spell.correction(word))
# Get a list of `likely` options
print(spell.candidates(word))