Textblob language translation

43 Views Asked by At
from textblob import TextBlob

trans = TextBlob("text")

translated_text = trans.translate(to='en')

print("Translated text:", translated_text)

While running this code, I'm getting error like this:

translated_text = trans.translate(from_lang="ml",to='en')
AttributeError: 'TextBlob' object has no attribute 'translate'

Any solution for this ?

0

There are 0 best solutions below