I am trying to perform spelling correction using TextBlob. Following is the sample code
enter code here
%%time
import textblob
from textblob import TextBlob
import progressbar
from time import sleep
bar = progressbar.ProgressBar(maxval=10000, widgets=[progressbar.Bar('=', '[', ']'), ' ',
progressbar.Percentage()])
bar.start()
index = 0
for text in corpus['text_final']:
bar.update(index)
#print(str(index))
corpus['text_final'][index] = TextBlob(text).correct()
index = index + 1
sleep(0.01)
bar.finish()
My corpus includes 2500 statements of average 25 words, and it has already taken 1.5 hours and it still 46% complete.
Does anyone have any suggestions to do it faster? Please suggest