Я пытаюсь выполнить правописание с помощью TextBlob. Ниже приведен пример кода
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()
В моем корпусе содержится 2500 операторов, в среднем 25 слов, и это заняло 1,5 часа, а его заполнение составило 46%.
Есть ли у кого-нибудь предложения сделать это быстрее? Пожалуйста, предложите