我可以在Python中使用Google Transliteration吗? [英] Can I use Google Transliteration in Python?
问题描述
我知道Google允许从英语到几种语言的音译(www.google.com/transliterate).
I am aware that Google allows transliteration from English to several languages (www.google.com/transliterate).
我有一个英语单词列表.我想将每个单词音译(不 翻译)到孟加拉语(Google支持的语言)-以Unicode单词列表的形式获取输出.
I have an English word-list. I would like to transliterate (not translate) every word to Bengali (a language Google supports) - to obtain output in the form of a Unicode word-list.
是否可以在Python中使用音译API来做到这一点?
Is there a way to use the transliteration API in Python to do this?
推荐答案
这是入门文档:如果只需要使用一次,那么使用示例代码在浏览器中执行音译可能是最简单的.
If you only need to use it one time, it's probably easiest to use the example code to perform your transliteration in a browser.
如果您可以弄清楚实际的请求(不难,可以在浏览器的开发人员工具中观察它们),则可以使用requests
模块重新实现该功能(只需通过
If you can figure out the actual requests to make (shouldn't be hard, you can observe them in your browser's developer tools), you can re-implement that using the requests
module (just get it with pip
).
这篇关于我可以在Python中使用Google Transliteration吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!