Reputation: 89
I'm trying to apply spelling correction to some tweets.
I have tried the following code:
train.text.apply(lambda x: " ".join([TextBlob(i).correct() for i in x.split()]))
However, I get an error. Could you please advise? Thanks in advance!
Upvotes: 1
Views: 978
Reputation: 111
Could you try to update this code with
train.apply(lambda x: " ".join([TextBlob(i).correct() for i in x['text'].split()]))
Hope this helps!!
Upvotes: 1