Monday, November 18, 2024
Google search engine
HomeLanguagesPython | TextBlob.Word.spellcheck() method

Python | TextBlob.Word.spellcheck() method

With the help of TextBlob.Word.spellcheck() method, we can check the word if that word have spelling mistake by using TextBlob.Word.spellcheck() method.

Syntax : TextBlob.Word.spellcheck()
Return : Return the word with correctness accuracy.

Example #1 :
In this example we can say that by using TextBlob.Word.spellcheck() method, we are able to get the accuracy of word whether it is correct or not.




# import Word
from textblob import Word
  
gfg = Word("Facility")
  
# using Word.spellcheck() method
print(gfg.spellcheck())


Output :

[(‘Facility’, 1.0)]

Example #2 :




# import Word
from textblob import Word
  
gfg = Word("Prediction")
  
# using Word.spellcheck() method
print(gfg.spellcheck())


Output :

[(‘Prediction’, 1.0)]

Dominic Rubhabha-Wardslaus
Dominic Rubhabha-Wardslaushttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Recent Comments