简体   繁体   中英

how do I translate English Into bangla words correctly in python?

I have some English words that i want to translate into bangala language. As i am using

`'from translate import Translator'` 

this library and my output is like this - 在此处输入图片说明

code is as follows

[![enter image description here][2]][2]

wb = xlrd.open_workbook(resource+"/input.xlsx")
sheet = wb.sheet_by_index(0)
sheet.cell_value(0, 0)

for i in range(sheet.nrows):
   row_input = sheet.cell_value(i, 0)
   detect_language = TextBlob(row_input)
   print(row_input , "is",  detect_language.detect_language())
   save=translator.translate(row_input)
   print(save)

Google provides Translator API using which you can convert text to any many languages.

https://cloud.google.com/translate/docs/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM