Open Rahulsunny11 opened 3 years ago
I don’t know what the structure of twitter data is, can you show it?
this is how it looks.. here full_text column has tweets in multiple languages, I want to translate to english
full_text = XXXX
translator = google_translator(url_suffix="com",timeout=5)
translate_text = translator.translate(full_text,lang_tgt='en')
Just set lang_tgt=‘en’.
thanks will try and let you know if there is an issue
this is working fine but I am having trouble in applying this on whole columns from the above I want to create a new translated column named 'text'
I tried following code `df["English"] = ""
for index, row in df.iterrows(): translator = google_translator(url_suffix="com",timeout=5) eng_text = translator.translate(row["full_text"], lang_tgt="en") row["English"] = eng_text`
@Rahulsunny11 what did you end up doing. Im running into many problems trying to translate a dataframe with 10000 rows that are in 7 languages into english. Can you help me with the leads that helped you? Thank you
@Rahulsunny11 what did you end up doing. Im running into many problems trying to translate a dataframe with 10000 rows that are in 7 languages into english. Can you help me with the leads that helped you? Thank you
Hi @brendachirata apologies for late reply. I have tried everything but didn't succeed in translating using any library, So now I am using google translator(https://translate.google.co.in/?sl=auto&tl=en&op=docs) to translate text.
Thanks
Hi, thanks for this amazing library I am working on twitter data.. it has column named full_text where text is available in multiple languages I want to translate all rows into english langugae thanks