After using a TextBlob spell corrector, the sentence in each row becomes separated by comma.
from textblob import TextBlob
list = df['sentence'].tolist()
def TBSpellCorrector(sentence):
b = TextBlob(sentence)
return b.correct()
df['corrected_sentence']=df['sentence'].apply(TBSpellCorrector)
Result:
sentence corrected_sentence
132 on fre (o, n,, f, i, r, e)
35 beautful (b, e, a, u, t, i, f, u, l)
I need to concatenate the sentence separated by comma.
Expected Output
sentence corrected_sentence corrected_sentence2
132 on fre (o, n,, f, i, r, e) on fire
35 beautful (b, e, a, u, t, i, f, u, l) beautiful