how to remve the spelling mistakes using nltk code example
Example 1: how can I corect word spelling by use of nltk?
from spellchecker import SpellChecker
spell = SpellChecker()
misspelled = spell.unknown(['something', 'is', 'hapenning', 'here'])
for word in misspelled:
print(spell.correction(word))
print(spell.candidates(word))
Example 2: how can I corect word spelling by use of nltk?
from textblob import TextBlob
data = "Natural language is a cantral part of our day to day life, and it's so antresting to work on any problem related to langages."
output = TextBlob(data).correct()
print(output)