#!/usr/bin/env python
# coding: utf-8
# In[ ]:
pip install textblob
# # Spelling Correction with Python
# In[28]:
from textblob import TextBlob
def Convert(string):
li = list(string.split())
return li
str1 = input("Enter your word : ")
words=Convert(str1)
corrected_words = []
for i in words:
corrected_words.append(TextBlob(i))
print("Wrong words :", words)
print("Corrected Words are :")
for i in corrected_words:
print(i.correct(), end=" ")
#clcoding.com
# In[ ]:
0 Comments:
Post a Comment